|  |  |  | @ -2,10 +2,11 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 	<lay-container fluid="true" class="content-box"> | 
			
		
	
		
			
				
					|  |  |  |  | 		<FormulaView :teamId="dataInfoObj.FTeamID" :halfId="dataInfoObj.FMaterialHalfIDs"></FormulaView> | 
			
		
	
		
			
				
					|  |  |  |  | 		<lay-layer area="90%" v-model="showFreezingColumnSettingBox" title="固定列设置" :end="closeFreezingSetting"> | 
			
		
	
		
			
				
					|  |  |  |  | 			<FreezingColumnSetting v-if="showFreezingColumnSettingBox" :columns="originalColumns" :freezingColumns="freezingColumnSetting" @cancelClick="setFreezingColumnsSetting"></FreezingColumnSetting> | 
			
		
	
		
			
				
					|  |  |  |  | 			<FreezingColumnSetting v-if="showFreezingColumnSettingBox" :columns="originalColumns" | 
			
		
	
		
			
				
					|  |  |  |  | 				:freezingColumns="freezingColumnSetting" @cancelClick="setFreezingColumnsSetting"></FreezingColumnSetting> | 
			
		
	
		
			
				
					|  |  |  |  | 		</lay-layer> | 
			
		
	
		
			
				
					|  |  |  |  | 		<lay-table id="dataTable" v-if="dataColumn.length>0" height="320px" :columns="dataColumn" | 
			
		
	
		
			
				
					|  |  |  |  | 				   :data-source="dataList" :cellStyle="cellStyle" :cellClassName="cellClassName"> | 
			
		
	
		
			
				
					|  |  |  |  | 		<lay-table id="dataTable" v-if="dataColumn.length > 0" height="320px" :columns="dataColumn" :data-source="dataList" | 
			
		
	
		
			
				
					|  |  |  |  | 			:cellStyle="cellStyle" :cellClassName="cellClassName"> | 
			
		
	
		
			
				
					|  |  |  |  | 			<template v-slot:toolbar v-if="dataInfoObj.FCanEdit != 2"> | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-button size="sm" @click="saveBatch" type="primary" :disabled="editColumn.length === 0">保存 | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-button> | 
			
		
	
	
		
			
				
					|  |  |  | @ -15,7 +16,8 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-input :class="this.isShow ? 'isShow' : 'isHidden'" v-model="inputDescValue" :readonly="true"> | 
			
		
	
		
			
				
					|  |  |  |  | 					<template #prepend>描述:</template> | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-input> | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-button size="sm" type="primary" style="float:right;" :disabled="editColumn.length===0" @click="_clickFreezingColumnSetting()">固定项 | 
			
		
	
		
			
				
					|  |  |  |  | 				<lay-button size="sm" type="primary" style="float:right;" :disabled="editColumn.length === 0" | 
			
		
	
		
			
				
					|  |  |  |  | 					@click="_clickFreezingColumnSetting()">固定项 | 
			
		
	
		
			
				
					|  |  |  |  | 				</lay-button> | 
			
		
	
		
			
				
					|  |  |  |  | 			</template> | 
			
		
	
		
			
				
					|  |  |  |  | 			<template v-for="item in editColumn" v-slot:[item.key]="{ data }"> | 
			
		
	
	
		
			
				
					|  |  |  | @ -50,6 +52,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 	min-height: 740px; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | .row-select td { | 
			
		
	
		
			
				
					|  |  |  |  | 	overflow: inherit; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | @ -70,14 +73,17 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 	border-color: #009688 !important; | 
			
		
	
		
			
				
					|  |  |  |  | 	color: #009688; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | .isShow { | 
			
		
	
		
			
				
					|  |  |  |  | 	width: 370px; | 
			
		
	
		
			
				
					|  |  |  |  | 	height: 30px; | 
			
		
	
		
			
				
					|  |  |  |  | 	border: none; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | .isHidden { | 
			
		
	
		
			
				
					|  |  |  |  | 	display: none; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | .isBomHidden { | 
			
		
	
		
			
				
					|  |  |  |  | 	display: none; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | @ -126,7 +132,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 			[] | 
			
		
	
		
			
				
					|  |  |  |  | 		]); | 
			
		
	
		
			
				
					|  |  |  |  | 		const cellStyle = function (row, column, rowIndex, columnIndex) { | 
			
		
	
		
			
				
					|  |  |  |  | 				let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246) !important;" : "" | 
			
		
	
		
			
				
					|  |  |  |  | 			let back = column.table == "TFS_ViewMaterial" ? "background:rgb(246, 246, 246)" : "" | 
			
		
	
		
			
				
					|  |  |  |  | 			return back; | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		const cellClassName = function (row, column, rowIndex, columnIndex) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -195,7 +201,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 				teamId: this.dataInfoObj.FTeamID, | 
			
		
	
		
			
				
					|  |  |  |  | 				viewType: this.dataInfoObj.FViewType | 
			
		
	
		
			
				
					|  |  |  |  | 			}); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			if (this.dataInfoObj.FViewType == 1) { | 
			
		
	
		
			
				
					|  |  |  |  | 				this.inputCodeValue = _data.rows[0].HalfCode; | 
			
		
	
		
			
				
					|  |  |  |  | 				this.inputDescValue = _data.rows[0].HalfDesc; | 
			
		
	
	
		
			
				
					|  |  |  | @ -208,6 +213,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 			this.typeList[1] = _data.types.filter(s => s.FDepth != 1) || []; | 
			
		
	
		
			
				
					|  |  |  |  | 			let dataColumn = _data.columns || []; | 
			
		
	
		
			
				
					|  |  |  |  | 			let editColumn = dataColumn.filter(it => { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 				let b = false; | 
			
		
	
		
			
				
					|  |  |  |  | 				if (this.dataInfoObj.FCanEdit != 2) { | 
			
		
	
		
			
				
					|  |  |  |  | 					if (it.fieldType == 7) b = this.userPower[1].indexOf(it.id) >= 0; | 
			
		
	
	
		
			
				
					|  |  |  | @ -241,8 +247,29 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 				// 	dataColumn = [...tempColumn1, ...tempColumn2]; | 
			
		
	
		
			
				
					|  |  |  |  | 				// } | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 			let columnsList = []; | 
			
		
	
		
			
				
					|  |  |  |  | 			let col7 = dataColumn.filter(s => s.fieldType == 7) || []; | 
			
		
	
		
			
				
					|  |  |  |  | 				_data.rows.forEach((item) => { | 
			
		
	
		
			
				
					|  |  |  |  | 			debugger | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			_data.rows.forEach((item, i) => { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 				columnsList = _data.columns.map(function (items) { | 
			
		
	
		
			
				
					|  |  |  |  | 					let str = _data.infos[i][items.key + "Type"]; | 
			
		
	
		
			
				
					|  |  |  |  | 					if (typeof (str) != "undefined") { | 
			
		
	
		
			
				
					|  |  |  |  | 						switch (str) { | 
			
		
	
		
			
				
					|  |  |  |  | 							case "1": | 
			
		
	
		
			
				
					|  |  |  |  | 								return items.cellClass = items.cellClass + " one"; | 
			
		
	
		
			
				
					|  |  |  |  | 							case "2": | 
			
		
	
		
			
				
					|  |  |  |  | 								return items.cellClass = items.cellClass + " twe"; | 
			
		
	
		
			
				
					|  |  |  |  | 							case "3": | 
			
		
	
		
			
				
					|  |  |  |  | 								return items.cellClass = items.cellClass + " three"; | 
			
		
	
		
			
				
					|  |  |  |  | 							case "4": | 
			
		
	
		
			
				
					|  |  |  |  | 								return items.cellClass = items.cellClass + " four"; | 
			
		
	
		
			
				
					|  |  |  |  | 						} | 
			
		
	
		
			
				
					|  |  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 					return items; | 
			
		
	
		
			
				
					|  |  |  |  | 				}) | 
			
		
	
		
			
				
					|  |  |  |  | 				let k3Code = item.FBaseMaterialDesc; | 
			
		
	
		
			
				
					|  |  |  |  | 				if (k3Code.indexOf("@") > 0) { | 
			
		
	
		
			
				
					|  |  |  |  | 					item.FK3Code = k3Code.substr(0, k3Code.indexOf("@")); | 
			
		
	
	
		
			
				
					|  |  |  | @ -267,10 +294,14 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 			}); | 
			
		
	
		
			
				
					|  |  |  |  | 			let saveId = this.dataInfoObj.FViewType + "_" + this.dataInfoObj.FID; | 
			
		
	
		
			
				
					|  |  |  |  | 			localStorage.setItem('EditView' + saveId, JSON.stringify(_data.rows)); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			this.editColumn = editColumn; | 
			
		
	
		
			
				
					|  |  |  |  | 			this.dataList = _data.rows; | 
			
		
	
		
			
				
					|  |  |  |  | 			this.dataColumn = dataColumn; | 
			
		
	
		
			
				
					|  |  |  |  | 			this.originalColumns = this.deepCopy(dataColumn); | 
			
		
	
		
			
				
					|  |  |  |  | 			debugger | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			setTimeout(function () { | 
			
		
	
		
			
				
					|  |  |  |  | 				layer.close(idx); | 
			
		
	
	
		
			
				
					|  |  |  | @ -289,6 +320,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 						"FDataID": data.FTypeID2, | 
			
		
	
		
			
				
					|  |  |  |  | 						"FType": 1 | 
			
		
	
		
			
				
					|  |  |  |  | 					}) || null; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 					if (result != null && result.FID) { | 
			
		
	
		
			
				
					|  |  |  |  | 						let col7 = this.dataColumn.filter(s => s.fieldType == 7) || []; | 
			
		
	
		
			
				
					|  |  |  |  | 						col7.forEach((item) => { | 
			
		
	
	
		
			
				
					|  |  |  | @ -296,6 +328,26 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 								data[item.key] = result[item.key] || data[item.key] || ""; | 
			
		
	
		
			
				
					|  |  |  |  | 							} | 
			
		
	
		
			
				
					|  |  |  |  | 						}); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 						this.dataColumn.map(function (item) { | 
			
		
	
		
			
				
					|  |  |  |  | 							debugger | 
			
		
	
		
			
				
					|  |  |  |  | 							let str = result[item.key + "Type"]; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 							if (typeof (str) != "undefined") { | 
			
		
	
		
			
				
					|  |  |  |  | 								switch (str) { | 
			
		
	
		
			
				
					|  |  |  |  | 									case "1": | 
			
		
	
		
			
				
					|  |  |  |  | 										return item.cellClass = item.cellClass.split(" ")[0] + " one"; | 
			
		
	
		
			
				
					|  |  |  |  | 									case "2": | 
			
		
	
		
			
				
					|  |  |  |  | 										return item.cellClass = item.cellClass.split(" ")[0] + " twe"; | 
			
		
	
		
			
				
					|  |  |  |  | 									case "3": | 
			
		
	
		
			
				
					|  |  |  |  | 										return item.cellClass = item.cellClass.split(" ")[0] + " three"; | 
			
		
	
		
			
				
					|  |  |  |  | 									case "4": | 
			
		
	
		
			
				
					|  |  |  |  | 										return item.cellClass = item.cellClass.split(" ")[0] + " four"; | 
			
		
	
		
			
				
					|  |  |  |  | 								} | 
			
		
	
		
			
				
					|  |  |  |  | 							} | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 							return item; | 
			
		
	
		
			
				
					|  |  |  |  | 						}) | 
			
		
	
		
			
				
					|  |  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
	
		
			
				
					|  |  |  | 
 |