| 
					
				 | 
			
			
				@@ -1,7 +1,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <!-- 任务处理中心 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="production"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <template v-if="!detailsVisible && !outsourceVisible && !checkVisible && !preCheckVisible && !purchaseVisible && !printLabelVisible"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <template v-if="!detailsVisible && !outsourceVisible && !checkVisible && !preCheckVisible && !purchaseVisible && !printLabelVisible && !addOrUpdateVisible"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-header style="font-size: large;text-align: center">任务处理中心</el-header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -210,6 +210,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <crafts-detail v-if="craftsVisible" ref="craftsDetail"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 打印标签 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <print-label v-if="printLabelVisible" ref="printLabel" @onChose="onChose" @addOne="addOneClick"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- 弹窗, 新增 / 修改 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :options-type="optionsType" @refreshDataList="getDataList" @onChose="onChose"></add-or-update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -223,8 +225,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import SchedulingPurchase from '@/views/modules/production/scheduling-purchase' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import SchedulingCommission from '@/views/modules/production/scheduling-commission' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import CraftsDetail from '@/views/modules/tech/crafts-detail-dialog' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import {downloadUrl} from '@/api/file' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import {downloadUrl} from '@/api/file' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import PrintLabel from '@/views/modules/production/components/print-label.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import AddOrUpdate from '@/views/modules/sale/purchase-add-or-update' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { getDictList } from '@/api/dict' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'scheduling', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     components: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -235,7 +239,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       PurchaseAddOrUpdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       SchedulingPreCheck, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       SchedulingCheck, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      Detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      Detail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      AddOrUpdate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // Outsource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -247,6 +252,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         purchaseVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         craftsVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         printLabelVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        addOrUpdateVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageIndex: 1, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -303,10 +309,12 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         multipleSelection: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         selectedRows:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         batchIncomeBtnDisabled: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        batchBtnDisabled: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        batchBtnDisabled: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        optionsType: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     created () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getTypeList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.getDataList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     methods: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -321,6 +329,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.selectedRows = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.batchIncomeBtnDisabled = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.batchBtnDisabled = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.addOrUpdateVisible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       // 获取采购类别字典 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getTypeList () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getDictList({type: 'purchase_type'}).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.optionsType = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryPage () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -502,9 +519,24 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.purchaseVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let list = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.selectedRows.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          list.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            detailId:Math.round(Math.random() * 1000000), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            materialName: item.materialName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            specification:item.productSpec, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            purchaseType: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cnt:item.cnt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            unitName:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            deadline:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            batchNumber:item.batchNumber, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            notes:'' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.addOrUpdateVisible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$refs.purchase.init(this.selectedRows) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$refs.addOrUpdate.init(0, null, null, list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       //批量转委外 
			 |