|  |  |  | @ -18,6 +18,8 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-button> | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-button size="sm" @click="downView" type="primary">导出视图 | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-button> | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-button size="sm" @click="upSAP" type="primary">物料上传 | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-button> | 
			
		
	
		
			
				
					|  |  |  |  | 			</template> | 
			
		
	
		
			
				
					|  |  |  |  | 			<template v-for="item in editColumn" v-slot:[item.key]="{ data }"> | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-select v-if="item.key == 'FTypeID1'" size="sm" v-model="data['FTypeID1']" | 
			
		
	
	
		
			
				
					|  |  |  | @ -109,6 +111,9 @@ import { | 
			
		
	
		
			
				
					|  |  |  |  | 	getInfoData, | 
			
		
	
		
			
				
					|  |  |  |  | 	GetMaterialInfoList | 
			
		
	
		
			
				
					|  |  |  |  | } from "/src/api/api/materialType"; | 
			
		
	
		
			
				
					|  |  |  |  | import { | 
			
		
	
		
			
				
					|  |  |  |  | 	uploadViewMaterial, | 
			
		
	
		
			
				
					|  |  |  |  | } from "/src/api/api/sapUpload"; | 
			
		
	
		
			
				
					|  |  |  |  | import OperateLog from "./OperateLog.vue"; | 
			
		
	
		
			
				
					|  |  |  |  | import FormulaView from "./FormulaView.vue"; | 
			
		
	
		
			
				
					|  |  |  |  | import FreezingColumnSetting from './FreezingColumnSetting.vue'; | 
			
		
	
	
		
			
				
					|  |  |  | @ -609,6 +614,38 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  | 				window.location.href = result.Data | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 		}, | 
			
		
	
		
			
				
					|  |  |  |  | 		async upSAP() { | 
			
		
	
		
			
				
					|  |  |  |  | 			let uploadList = [] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			this.dataList.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |  | 				let uploadItem = ref({}) | 
			
		
	
		
			
				
					|  |  |  |  | 				for (var key in item) { | 
			
		
	
		
			
				
					|  |  |  |  | 					let cols = this.dataColumn.filter(c => c.key == key) | 
			
		
	
		
			
				
					|  |  |  |  | 					if (cols && cols.length > 0) { | 
			
		
	
		
			
				
					|  |  |  |  | 						let keyName = cols[0]["category"] + "." + cols[0]["title"] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 						uploadItem[keyName] = item[key] | 
			
		
	
		
			
				
					|  |  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 				if (uploadItem) { | 
			
		
	
		
			
				
					|  |  |  |  | 					uploadList.push(uploadItem) | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 			}) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			if (uploadList) { | 
			
		
	
		
			
				
					|  |  |  |  | 				let idx = layer.load(2); | 
			
		
	
		
			
				
					|  |  |  |  | 				let result = await uploadViewMaterial(uploadList) | 
			
		
	
		
			
				
					|  |  |  |  | 				layer.close(idx); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 				if (result > 0) { | 
			
		
	
		
			
				
					|  |  |  |  | 					layer.msg('物料上传成功'); | 
			
		
	
		
			
				
					|  |  |  |  | 				} else { | 
			
		
	
		
			
				
					|  |  |  |  | 					layer.msg('物料上传失败'); | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 			}			 | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 			 | 
			
		
	
		
			
				
					|  |  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | </script> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |