| 
					
				 | 
			
			
				@@ -12,6 +12,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template v-for="(item, index) in dataList"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div :key="index" class="my-line"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-col :span="24" style="text-align: right;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-button v-if="!display" @click="removeOne(index)" type="danger" icon="el-icon-delete" circle style="padding: 6px"></el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-form-item label="名称" prop="materialId" :rules="{required: false, message: '名称不能为空', trigger: 'blur'}"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -31,8 +36,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   <material-type-component v-else v-model="item.materialTypeId" :type-id="item.materialTypeId"></material-type-component> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-col :span="8" style="text-align: right;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <el-button v-if="!display" @click="removeOne(index)" type="danger" icon="el-icon-delete" circle style="padding: 6px"></el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-col :span="8" style="padding-left: 20px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-form-item label="入库依据类别" prop="sourceCategory" :rules="{required: false, message: '类别不能为空', trigger: 'blur'}"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-select v-model="item.sourceCategory" placeholder="请选择"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      v-for="item in optionsSourceCategory" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :key="item.code" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :label="item.value" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :value="item.code"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-row class="my-row"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,7 +132,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataRule: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           userId: [{ required: true, message: '请选择入库申请人', trigger: 'blur' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        optionsSourceCategory: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '1', value: '采购入库'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '2', value: '生产入库'}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {code: '3', value: '委外入库'} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     methods: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,8 +174,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addOne (item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // console.log(item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // console.log(outside) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           buttonType: item ? (item.buttonType ? '1' : '0') : '0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           id: item ? item.id : '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -181,7 +198,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           userId: item ? item.userId : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           orgName: item ? item.orgName : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           unitNeedChange: item ? item.unitNeedChange : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          conversionName: item ? item.conversionName : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          conversionName: item ? item.conversionName : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          sourceCategory: item ? item.sourceCategory : '2', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          materialTypeId: item ? item.materialTypeId : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       removeOne (index) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -196,25 +215,26 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let postData = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.dataList.forEach((item) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              postData.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                amount: item.amount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              postData.push({...item, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // amount: item.amount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 applicant: this.dataForm.userId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                approver: item.approver, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                batchNumber: item.batchNumber, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                cnt: item.cnt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                materialId: item.materialId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // approver: item.approver, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // batchNumber: item.batchNumber, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // cnt: item.cnt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // materialId: item.materialId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 materialName: item.materialName ? item.materialName : item.materialId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 materialTypeId: item.materialTypeId ? item.materialTypeId : item.cateId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                notes: item.notes, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // notes: item.notes, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 orgId: this.$store.state.user.orgId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                price: item.price, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // price: item.price, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 recordCode: this.dataForm.recordCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 recordType: this.dataForm.recordType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                source: item.source, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                specifications: item.specifications, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                unitName: item.unitName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                unitNeedChange: item.unitNeedChange, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // source: item.source, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // specifications: item.specifications, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // unitName: item.unitName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // unitNeedChange: item.unitNeedChange, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 userId: this.$store.state.user.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // sourceCategory: item.sourceCategory 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             inboundBatch(postData).then(({data}) => { 
			 |