| 
					
				 | 
			
			
				@@ -10,7 +10,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template slot="footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <a-button  @click="handleCancel">关闭</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a-button type="primary"  @click="handleOk" >保存</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button type="primary"  @click="handleOk" v-if="title!=='订单操作'">保存</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class="table-page-search-wrapper"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -58,7 +58,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     </a-col>   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <a-col :md="4" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <a-form-item label="业务类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            <a-select v-model="form.type"  style='width:100%'  @change="changeType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            <a-select v-model="form.type"  style='width:100%' > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 <a-select-option value='工装'> 工装</a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 <a-select-option value='家装'> 家装</a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             </a-select> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -88,7 +88,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </a-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     <a-card :bordered="false" class="three" style="margin-bottom:1%" :loading = 'loading'> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     <a-card :bordered="false" class="three" style="margin-bottom:1%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        <div class="table-operator"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <!-- <a-button type="danger" size="small"  @click="updataProRequirment" v-if="form.type=='工装'">更新采购需求</a-button> --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-button  size="small" @click="generatePurchaseOrder" :disabled="activeKey!=='ProRequirements'||form.state=='开立'">生成采购单</a-button> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -134,6 +134,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       import projectPopup from '../../Popup/projectPopup' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       import OperatorsPopup from '../../Popup/OperatorsPopup.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       import deparmentPopup from '../../Popup/deparmentPopup.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      import alertModal from '../../../../plugins/modal' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         name: 'MRPEdit', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mixins: [JEditableTableModelMixin], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -267,11 +268,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.$set(this.form,'orgCode',data.Code) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.$set(this.form,'pkOrg',data.ID) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            changeType(prop){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(prop=='工装'){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    this.getTraRequirementsData(this.form.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             onSearchPerson(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(this.form.orgName&&this.form.orgName!==''){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     this.$refs.OperatorsPopup.visible = true 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -292,6 +288,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 madeOperationListPage.madeOperationListPurchaseList = this.$refs.ProRequirements.dataSource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 madeOperationListPage.madeOperationListResultList = this.$refs.supplyDemandBalance.dataSource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                alertModal.loading("执行中,请稍后!") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 postAction('/MRPOperationList/madeOperationList/edit', madeOperationListPage).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (res.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         this.$message.success('编辑成功!'); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -301,6 +298,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }).finally(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    alertModal.closeLoading(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // updataProRequirment(){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -312,20 +310,61 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             generatePurchaseOrder(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '确认生成采购单', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    content: '是否生成采购单?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    onOk:  ()=> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var chooseData = this.$refs.ProRequirements.ConfirmData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(chooseData.length==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    this.$message.warning('请选择要同步的数据'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        title: '确认生成采购单', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        content: '是否生成采购单?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        onOk:  ()=> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            var idArr = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            chooseData.map(item=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                idArr.push(item.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            var idString = idArr.join(',') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            alertModal.loading("执行中,请稍后!") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            getAction('/MRPOperationList/madeOperationList/syncPurchase',{ids:idString}).then(res=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                alertModal.closeLoading(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if(res.success){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.getProRequirementsData(this.form.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.$message.error(res.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.$message.error(res.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             generatetRansferOrder(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    title: '确认生成转库单', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    content: '是否生成转库单?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    onOk:  ()=> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var chooseData = this.$refs.TraRequirements.ConfirmData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(chooseData.length==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    this.$message.warning('请选择要同步的数据'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        title: '确认生成转库单', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        content: '是否生成转库单?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        onOk:  ()=> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            var idArr = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            chooseData.map(item=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                idArr.push(item.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            var idString = idArr.join(',') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            alertModal.loading("执行中,请稍后!") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            getAction('/MRPOperationList/madeOperationList/syncChange',{ids:idString}).then(res=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                alertModal.closeLoading(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if(res.success){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.getTraRequirementsData(this.form.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.$message.error(res.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    this.$message.error(res.message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |