laoyao 3 年之前
父節點
當前提交
b9da3799ad

+ 320 - 320
imcs-ui/src/lang/zh/prepare.js

@@ -1,320 +1,320 @@
-/**************** 【生产准备中心】菜单  **************/
-export default {
-	prepare: {
-		// 本模型下的共通
-		common: {
-			aduio: '审核产品',
-			tab1: '工艺',
-			tab2: '综合分析',
-			tab3: '数控程序',
-			tab4: '刀具',
-			tab5: '夹具',
-			tab6: '人员',
-			tab7: '设备',
-			tab8: '材料',
-			tcNo: '工序编号',
-			tcContent: '工序内容',
-			tcFenxi: '工序分析',
-			nodeCode: '编号',
-			eqPosion: '可执行设备(位置)',
-			selectEq: '选择设备',
-			selectSour: '选择原材料',
-			tpJgroup: '夹具',
-			pgMgr: '程序管理',
-			recordEq: '可执行设备位置',
-			zhixeThing: '执行事件',
-			dongzuo: '动作包指令',
-			failCode: '失败反馈',
-			program: 'NC程序',
-			meterial: '所需原材料',
-			quality: '人工质检',
-			robotarm: '机械手臂',
-			liuchengMgr: '流程管理',
-			editLiucheng: '编辑自动化流程',
-			selfExamine: '自测',
-			examineMatchConf: '检测配置',
-			examineRate: '检测频率',
-			ratedWorkhours: '预计执行工时',
-			stockConf: '是否操作出入库',
-			inStockPosion: '入库位置',
-			outStockPosion: '出库位置',
-			resourceInId: '入库生产资源',
-			positionInId: '入库可加工位置',
-			resourceBeginId: '起点生产资源',
-			resourceEndId: '终点生产资源',
-			positionBeginId: '起点可加工位置',
-			positionEndId: '终点可加工位置',
-			resourceOutId: '出库生产资源',
-			positionOutId: '出库可加工位置',
-			armTrayConf: '机械手臂取托盘',
-			armFixtureConf: '机械手臂取夹具',
-			armMeterialConf: '机械手臂抓取原料',
-			delayFlag: '不满足,推后执行',
-			addProgram: '设备程序',
-			toolMgr: '刀具管理',
-			szbName: '三坐标质检',
-			threeDimensionalDeviationConf: '三坐标偏置点配置',
-			randomCheckConf: '工序抽检配置',
-			meterialCodeIgnore: {
-				yes: '是',
-				no: '否'
-			},
-			positionInAsk: {
-				ask: '询问',
-				unAsk: '不询问'
-			},
-			useStatus: {
-				noUsed: '未使用',
-				used: '已使用'
-			},
-			successOpt: {
-				one: '执行下一个',
-				zero: '结束'
-			},
-			failOpt: {
-				one: '执行下一个',
-				zero: '结束'
-			},
-			toolfx: '刀具解析结果',
-			programType: {
-				type1: '整体程序',
-				type2: '独立程序',
-				type3: '组合程序'
-			},
-			idNeed: {
-				need: '需要',
-				unneed: '不需要',
-				reception: '来自上一工序'
-			},
-			testResult: {
-				ok: '通过',
-				no: '物料错误'
-			}
-		},
-		// 列表搜索表单名称
-		searchForm: {
-			name: '名称',
-			tpName: '托盘名称',
-			productName: '产品名称',
-			parts_no: '零部件编号',
-			bomAlias: '产品代号',
-			parts_name: '零件名称',
-			partsAlias: '零件代号',
-			specification: '规格',
-			models: '型  号',
-			brand: '品牌',
-			model: '规格',
-			status: '状态',
-			vision: '版本号',
-			resourceId: '设备',
-			trayId: '夹具组',
-			positionSort: '可加工位置',
-			groupPrority: '优先级',
-			pgType: '位置程序类型',
-			auditStatus: '审核状态',
-			qiyongStatus: '启用状态',
-			auditStatuss: {
-				zero: '新建零件',
-				one: '待审核',
-				two: '审核通过',
-				three: '审核不通过'
-			}
-		},
-		// 按钮的名称
-	  	buttons: {
-	  		edition: '版本管理',
-	  		viewTech: '查看工艺程序',
-	  		trayPs: '查看夹紧位置',
-	  		autoMatic: '查看自动化流程',
-	  		technoMgr: '工序管理',
-	  		technFenxi: '工序分析',
-	  		autoPg: '自动化程序管理',
-	  		setUse: '设为使用',
-	  		loadTechn: '导入工艺',
-	  		copyVision: '复制一个版本',
-	  		expandsEve: '展开产品所有节点',
-	  		audioStatus: '提交审核',
-	  		audioBtn: '审核产品',
-	  		viewTech: '查看工序分析',
-			printBtn: '打印',
-	  	},
-	  	// 列表的cell名称
-		table: {
-			// 【工具原材料管理】列表table字段名称
-			tools: {
-				no: '编号',
-				name: '名称',
-				model: '型号',
-				specification: '规格',
-				brand: '品牌',
-				tradeMark: '牌号',
-				category: '分类',
-       		    materialType: '物料类型',
-                heatNo: '原炉批号',
-				mapNo: '图号',
-				period: '周期',
-				num: '数量',
-				type: '类型',
-				clampImg: '装夹方式',
-				expiryDate: '有效期',
-				materialNo: '材料编号',
-				joinDate: '入厂日期',
-       			materialType: '物料类型',
-				status: '启用状态',
-				remark: '备注',
-				jjPosion: '可加工夹紧位置',
-				testResult: '料编码结果',
-				uniqueCode: '产品唯一编码',
-				testMeterialCode: '质检物料编码',
-				verificationResults: '校验结果'
-			},
-			// 【工艺管理-BOM】列表table字段名称
-			technology: {
-				no: '编号',
-				name: '名称',
-				model: '型号',
-				specification: '规格',
-				brand: '品牌',
-				tradeMark: '牌号',
-				category: '分类',
-				status: '启用状态'
-			},
-			// 【工艺管理-工艺】列表table字段名称
-			techno: {
-				name: '工序编号',
-				name2: '工序名称',
-				name3: '工序内容',
-				name4: '类型',
-				name5: '准备工时',
-				name6: '额定工时-min',
-				name7: '备注'
-			},
-			// 【工艺版本管理】列表table字段名称
-			tcVersion: {
-				no: '版本编号',
-				version: '版本号',
-				auditStatus: '审核状态',
-				useStatus: '产品使用',
-				createTime: '新增时间',
-				createUserName: '新增人',
-				name7: '审核时间',
-				auditUserName: '审核人',
-				remark: '审核备注'
-			},
-			// 【工艺版本管理-工艺分析-可执行设备(位置)】列表table字段名称
-			eqPosion: {
-				code: '编号',
-				name: '设备(生产资源)',
-				cncProgram: '是否需要程序',
-				prority: '优先级',
-				updateTime: '最新修改时间'
-			},
-			// 【工艺版本管理-工艺分析-托盘夹具组】列表table字段名称
-			toolGroup: {
-				groupSort: '组序',
-				groupPrority: '优先级',
-				category: '物料类型',
-				name: '物料名称',
-				no: '编号',
-				specification: '规格',
-				brand: '品牌',
-				positions: '使用加紧位置',
-				armorPic: '附件'
-			},
-			// 【工艺版本管理-工艺分析-程序】列表table字段名称
-			program: {
-				name: '设备',
-				groupSort: '托盘夹具组',
-				programType: '位置程序类型',
-				positions: '程序加工位置',
-				prority: '优先级',
-				addTime: '加工时间',
-				submittedFileName: '程序名称'
-			},
-			// 【工艺版本管理-工艺分析-质检要求】列表table字段名称
-			quality: {
-				content: '质检要求',
-				filePath: '参数文件',
-				qualityRes: '质检结果',
-				meterialCodeIgnore: '无编码确认'
-			},
-			// 【托盘管理】列表table字段名称
-			tray: {
-				no: '编号',
-				name: '名称',
-				brand: '品牌',
-				specification: '规格',
-				positionSort: '夹紧位置',
-				status: '启用状态',
-        	    tray: '可放托盘',
-                number: '可放托盘数量',
-                weight: '排序(升序)',
-                num: '数量'
-			},
-			// 【托盘管理-新增-夹紧位置】列表table字段名称
-			trayPosition: {
-				positionSort: '夹紧位',
-				size: '尺寸',
-				remark: '备注'
-			},
-			// 【设备夹具程序】列表table字段名称
-			pgAdd: {
-				positionSort: '加工位置',
-				nc: 'NC',
-				runTime: '持续时间',
-				prority: '优先级',
-				toolNums: '刀具数量'
-			},
-			// 【自动化流程】列表table字段名称
-			autoProg: {
-				prority: '权重',
-				name: '名称',
-				resourceName: '设备',
-				code: '动作包指令(报文)',
-				instructionName: '执行动作',
-				successCode: '成功反馈',
-				successOpt: '成功操作',
-				failOpt: '失败操作',
-				remark: '操作说明',
-				updateTime: '修改时间'
-			}
-		},
-		// 表单数据名称
-		form: {
-			beginPosition: '起点位置',
-			endPosition: '终点位置',
-			qualityName1: '方式',
-			qualityName2: '是否抽检',
-			qualityName3: '每隔',
-			qualityName4: '个抽检一次',
-			qualityName5: '检测设备',
-			qualityName6: '检测程序名',
-			qualityName7: '不合格直接下料',
-			threeDimensionalPrograme: '检测程序名'
-		},
-		// 表单验证规则提示信息
-		rules: {
-			name: '名称必须填写',
-			no: '编号必须填写'
-		},
-		// 提示或者显示信息
-		tips:{
-			sortTips: '排序越大越靠前',
-			mMsg: '请正确填写【所需原材料】信息!',
-			qMsg: '请正确填写【人工质检】信息!',
-			jiajuTips: '请选择【规格】!',
-			addGg: '请【新增】[规格]!',
-			inputGg: '请【填写】[规格]!',
-			selectGg: '请选择【规格】!',
-			mustSelect: '请先选择【夹具组】~',
-			friendTips: '冻结成功!',
-			jjPosionTips: '请填写【可加工夹紧位置】,再选择!',
-			saveTips: '如果要离开本页,是否保存数据,再离开?',
-			toolTips: '删除工具原材料数据后,会将工具原材料数据全部删除,确认删除?',
-			techTips: '删除工艺管理数据后,会将工艺管理数据全部删除,确认删除?',
-			techVerTips: '删除工艺版本管理数据后,会将工艺版本管理数据全部删除,确认删除?',
-			bomTips: '删除BOM管理数据后,会将BOM管理数据全部删除,确认删除?',
-			autoTips: '删除自动化流程管理数据后,会将自动化流程管理数据全部删除,确认删除?'
-		}
-	}
-}
+/**************** 【生产准备中心】菜单  **************/
+export default {
+	prepare: {
+		// 本模型下的共通
+		common: {
+			aduio: '审核产品',
+			tab1: '工艺',
+			tab2: '综合分析',
+			tab3: '数控程序',
+			tab4: '刀具',
+			tab5: '夹具',
+			tab6: '人员',
+			tab7: '设备',
+			tab8: '材料',
+			tcNo: '工序编号',
+			tcContent: '工序内容',
+			tcFenxi: '工序分析',
+			nodeCode: '编号',
+			eqPosion: '可执行设备(位置)',
+			selectEq: '选择设备',
+			selectSour: '选择原材料',
+			tpJgroup: '夹具',
+			pgMgr: '程序管理',
+			recordEq: '可执行设备位置',
+			zhixeThing: '执行事件',
+			dongzuo: '动作包指令',
+			failCode: '失败反馈',
+			program: 'NC程序',
+			meterial: '所需原材料',
+			quality: '人工质检',
+			robotarm: '机械手臂',
+			liuchengMgr: '流程管理',
+			editLiucheng: '编辑自动化流程',
+			selfExamine: '自测',
+			examineMatchConf: '检测配置',
+			examineRate: '检测频率',
+			ratedWorkhours: '预计执行工时',
+			stockConf: '是否操作出入库',
+			inStockPosion: '入库位置',
+			outStockPosion: '出库位置',
+			resourceInId: '入库生产资源',
+			positionInId: '入库可加工位置',
+			resourceBeginId: '起点生产资源',
+			resourceEndId: '终点生产资源',
+			positionBeginId: '起点可加工位置',
+			positionEndId: '终点可加工位置',
+			resourceOutId: '出库生产资源',
+			positionOutId: '出库可加工位置',
+			armTrayConf: '机械手臂取托盘',
+			armFixtureConf: '机械手臂取夹具',
+			armMeterialConf: '机械手臂抓取原料',
+			delayFlag: '不满足,推后执行',
+			addProgram: '设备程序',
+			toolMgr: '刀具管理',
+			szbName: '三坐标质检',
+			threeDimensionalDeviationConf: '三坐标偏置点配置',
+			randomCheckConf: '工序抽检配置',
+			meterialCodeIgnore: {
+				yes: '是',
+				no: '否'
+			},
+			positionInAsk: {
+				ask: '询问',
+				unAsk: '不询问'
+			},
+			useStatus: {
+				noUsed: '未使用',
+				used: '已使用'
+			},
+			successOpt: {
+				one: '执行下一个',
+				zero: '结束'
+			},
+			failOpt: {
+				one: '执行下一个',
+				zero: '结束'
+			},
+			toolfx: '刀具解析结果',
+			programType: {
+				type1: '整体程序',
+				type2: '独立程序',
+				type3: '组合程序'
+			},
+			idNeed: {
+				need: '需要',
+				unneed: '不需要',
+				reception: '来自上一工序'
+			},
+			testResult: {
+				ok: '通过',
+				no: '物料错误'
+			}
+		},
+		// 列表搜索表单名称
+		searchForm: {
+			name: '名称',
+			tpName: '托盘名称',
+			productName: '产品名称',
+			parts_no: '零部件编号',
+			bomAlias: '产品代号',
+			parts_name: '零件名称',
+			partsAlias: '零件代号',
+			specification: '规格',
+			models: '型  号',
+			brand: '品牌',
+			model: '规格',
+			status: '状态',
+			vision: '版本号',
+			resourceId: '设备',
+			trayId: '夹具组',
+			positionSort: '可加工位置',
+			groupPrority: '优先级',
+			pgType: '位置程序类型',
+			auditStatus: '审核状态',
+			qiyongStatus: '启用状态',
+			auditStatuss: {
+				zero: '新建零件',
+				one: '待审核',
+				two: '审核通过',
+				three: '审核不通过'
+			}
+		},
+		// 按钮的名称
+	  	buttons: {
+	  		edition: '版本管理',
+	  		viewTech: '查看工艺程序',
+	  		trayPs: '查看夹紧位置',
+	  		autoMatic: '查看自动化流程',
+	  		technoMgr: '工序管理',
+	  		technFenxi: '工序分析',
+	  		autoPg: '自动化程序管理',
+	  		setUse: '设为使用',
+	  		loadTechn: '导入工艺',
+	  		copyVision: '复制一个版本',
+	  		expandsEve: '展开产品所有节点',
+	  		audioStatus: '提交审核',
+	  		audioBtn: '审核产品',
+	  		viewTech: '查看工序分析',
+			printBtn: '打印',
+	  	},
+	  	// 列表的cell名称
+		table: {
+			// 【工具原材料管理】列表table字段名称
+			tools: {
+				no: '物料编码',
+				name: '物料名称',
+				model: '型号',
+				specification: '规格',
+				brand: '品牌',
+				tradeMark: '牌号',
+				category: '分类',
+                heatNo: '原炉批号',
+				mapNo: '图号',
+				period: '周期',
+				num: '工装最大使用数量',
+        factory: '生产分厂/制造商',
+				type: '类型',
+				clampImg: '装夹方式',
+				expiryDate: '有效期',
+				materialNo: '材料编号',
+				joinDate: '入库日期',
+       			materialType: '物料类型',
+				status: '启用状态',
+				remark: '备注',
+				jjPosion: '可加工夹紧位置',
+				testResult: '料编码结果',
+				uniqueCode: '产品唯一编码',
+				testMeterialCode: '质检物料编码',
+				verificationResults: '校验结果'
+			},
+			// 【工艺管理-BOM】列表table字段名称
+			technology: {
+				no: '编号',
+				name: '名称',
+				model: '型号',
+				specification: '规格',
+				brand: '品牌',
+				tradeMark: '牌号',
+				category: '分类',
+				status: '启用状态'
+			},
+			// 【工艺管理-工艺】列表table字段名称
+			techno: {
+				name: '工序编号',
+				name2: '工序名称',
+				name3: '工序内容',
+				name4: '类型',
+				name5: '准备工时',
+				name6: '额定工时-min',
+				name7: '备注'
+			},
+			// 【工艺版本管理】列表table字段名称
+			tcVersion: {
+				no: '版本编号',
+				version: '版本号',
+				auditStatus: '审核状态',
+				useStatus: '产品使用',
+				createTime: '新增时间',
+				createUserName: '新增人',
+				name7: '审核时间',
+				auditUserName: '审核人',
+				remark: '审核备注'
+			},
+			// 【工艺版本管理-工艺分析-可执行设备(位置)】列表table字段名称
+			eqPosion: {
+				code: '编号',
+				name: '设备(生产资源)',
+				cncProgram: '是否需要程序',
+				prority: '优先级',
+				updateTime: '最新修改时间'
+			},
+			// 【工艺版本管理-工艺分析-托盘夹具组】列表table字段名称
+			toolGroup: {
+				groupSort: '组序',
+				groupPrority: '优先级',
+				category: '物料类型',
+				name: '物料名称',
+				no: '编号',
+				specification: '规格',
+				brand: '品牌',
+				positions: '使用加紧位置',
+				armorPic: '附件'
+			},
+			// 【工艺版本管理-工艺分析-程序】列表table字段名称
+			program: {
+				name: '设备',
+				groupSort: '托盘夹具组',
+				programType: '位置程序类型',
+				positions: '程序加工位置',
+				prority: '优先级',
+				addTime: '加工时间',
+				submittedFileName: '程序名称'
+			},
+			// 【工艺版本管理-工艺分析-质检要求】列表table字段名称
+			quality: {
+				content: '质检要求',
+				filePath: '参数文件',
+				qualityRes: '质检结果',
+				meterialCodeIgnore: '无编码确认'
+			},
+			// 【托盘管理】列表table字段名称
+			tray: {
+				no: '编号',
+				name: '名称',
+				brand: '品牌',
+				specification: '规格',
+				positionSort: '夹紧位置',
+				status: '启用状态',
+        	    tray: '可放托盘',
+                number: '可放托盘数量',
+                weight: '排序(升序)',
+                num: '数量'
+			},
+			// 【托盘管理-新增-夹紧位置】列表table字段名称
+			trayPosition: {
+				positionSort: '夹紧位',
+				size: '尺寸',
+				remark: '备注'
+			},
+			// 【设备夹具程序】列表table字段名称
+			pgAdd: {
+				positionSort: '加工位置',
+				nc: 'NC',
+				runTime: '持续时间',
+				prority: '优先级',
+				toolNums: '刀具数量'
+			},
+			// 【自动化流程】列表table字段名称
+			autoProg: {
+				prority: '权重',
+				name: '名称',
+				resourceName: '设备',
+				code: '动作包指令(报文)',
+				instructionName: '执行动作',
+				successCode: '成功反馈',
+				successOpt: '成功操作',
+				failOpt: '失败操作',
+				remark: '操作说明',
+				updateTime: '修改时间'
+			}
+		},
+		// 表单数据名称
+		form: {
+			beginPosition: '起点位置',
+			endPosition: '终点位置',
+			qualityName1: '方式',
+			qualityName2: '是否抽检',
+			qualityName3: '每隔',
+			qualityName4: '个抽检一次',
+			qualityName5: '检测设备',
+			qualityName6: '检测程序名',
+			qualityName7: '不合格直接下料',
+			threeDimensionalPrograme: '检测程序名'
+		},
+		// 表单验证规则提示信息
+		rules: {
+			name: '名称必须填写',
+			no: '编号必须填写'
+		},
+		// 提示或者显示信息
+		tips:{
+			sortTips: '排序越大越靠前',
+			mMsg: '请正确填写【所需原材料】信息!',
+			qMsg: '请正确填写【人工质检】信息!',
+			jiajuTips: '请选择【规格】!',
+			addGg: '请【新增】[规格]!',
+			inputGg: '请【填写】[规格]!',
+			selectGg: '请选择【规格】!',
+			mustSelect: '请先选择【夹具组】~',
+			friendTips: '冻结成功!',
+			jjPosionTips: '请填写【可加工夹紧位置】,再选择!',
+			saveTips: '如果要离开本页,是否保存数据,再离开?',
+			toolTips: '删除工具原材料数据后,会将工具原材料数据全部删除,确认删除?',
+			techTips: '删除工艺管理数据后,会将工艺管理数据全部删除,确认删除?',
+			techVerTips: '删除工艺版本管理数据后,会将工艺版本管理数据全部删除,确认删除?',
+			bomTips: '删除BOM管理数据后,会将BOM管理数据全部删除,确认删除?',
+			autoTips: '删除自动化流程管理数据后,会将自动化流程管理数据全部删除,确认删除?'
+		}
+	}
+}

+ 462 - 464
imcs-ui/src/views/zuihou/prepareProductMgr/frockMgr/Index.vue

@@ -1,464 +1,462 @@
-<template>
-  <div class="app-container">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span>
-    		<span>{{$t("prepare.searchForm.name")}}:</span>
-    		<el-input v-model="queryParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("prepare.searchForm.brand")}}:</span>
-    		<el-select style="width:150px;" :placeholder='$t("common.pleaseSelect")' v-model="brand.key" value size="medium">
-          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_BRAND" />
-        </el-select>
-    	</span>
-    	<span style="margin-left: 15px;" v-show="false">
-    		<span>{{$t("prepare.searchForm.model")}}:</span>
-    		<el-input v-model="queryParams.model.model" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("prepare.searchForm.status")}}:</span>
-    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
-        	<el-option
-			      v-for="item in audioStatus"
-			      :key="item.value"
-			      :label="item.label"
-			      :value="item.value">
-			    </el-option>
-      	</el-select>
-    	</span>
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-    	<el-col>
-    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['frock:add']" @click="add">{{ $t("common.add") }}</el-button>
-	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['frock:update']" @click="editOne">
-	        {{ $t("common.edit") }}
-	      </el-button>
-	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['frock:delete']" @click="batchDelete">
-	        {{ $t("table.delete") }}
-	      </el-button>
-	      <!-- 设置可存放托盘 -->
-	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['frock:set']" @click="trayOne" v-show="false">
-	        {{ $t("lineSide.common.trayBtn") }}
-	      </el-button>
-    	</el-col>
-    </el-row>
-
-		<!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-	      <template slot-scope="scope">
-	        <div>
-	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-	        </div>
-	      </template>
-      </el-table-column>
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <!--<el-table-column prop="model" :label='$t("prepare.table.tools.model")' :show-overflow-tooltip="true" width="150px"></el-table-column>-->
-	  
-	  <el-table-column prop="mapNo" :label='$t("prepare.table.tools.mapNo")' :show-overflow-tooltip="true" width="100px"></el-table-column>
-      <el-table-column prop="period" :label="$t('prepare.table.tools.period')+' (月)'" align="center" :show-overflow-tooltip="true" width="80px"></el-table-column>
-      <el-table-column prop="expiryDate" :label="$t('prepare.table.tools.expiryDate')+' (月)'" align="center" :show-overflow-tooltip="true" width="100px"></el-table-column>
-	  <el-table-column prop="joinDate" :label='$t("prepare.table.tools.joinDate")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-
-      <!--<el-table-column prop="specification" :label='$t("prepare.table.tools.specification")' :show-overflow-tooltip="true" width="250px"></el-table-column>-->
-      <el-table-column prop="brand.data" :label='$t("prepare.table.tools.brand")' align="center" :show-overflow-tooltip="true" width="120px"></el-table-column>
-      <el-table-column prop="category.data" :label='$t("prepare.table.tools.category")' align="center" :show-overflow-tooltip="true" width="120px"></el-table-column>
-      <el-table-column prop="num" :label='$t("prepare.table.tools.num")' :show-overflow-tooltip="true" align="center" width="70px"></el-table-column>
-	  <el-table-column prop="status" :label='$t("prepare.table.tools.status")' align="center" width="100px">
-      	<template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="100px"
-      >
-        <template slot-scope="{ row }">
-        	<!--<el-tooltip class="item" content="查看详情" effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-view table-operation"
-	            style="color: #87d068;"
-	            @click="view(row)"
-	          />
-          </el-tooltip>-->
-          <el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-edit table-operation"
-	            style="color: #2db7f5;"
-	            @click="edit(row)"
-	          />
-          </el-tooltip>
-          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-delete table-operation"
-	            style="color: #f50;"
-	            @click="singleDelete(row)"
-	          />
-          </el-tooltip>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-    
-    <!-- 设置可存放托盘 -->
-    <setting-tray
-      ref="editTray"
-      :dialog-visible="dialogTray.isVisible"
-      :title="dialogTray.title"
-      @close="editTrayClose"
-      @success="editTraySuccess"
-    />
-    
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      title="预览"
-      width="80%"
-      top="50px"
-      :visible.sync="preview.isVisible"
-    >
-      <el-scrollbar>
-        <div v-html="preview.context" />
-      </el-scrollbar>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	import TenantEdit from "./components/Edit"
-	import TenantView from "./components/View"
-	// 【工装管理】-API	
-	import frockMgrApi from "@/api/prepareProductMgr/frockMgr"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
-	// 共通工具方法(字典分解)
-	import { convertEnum } from '@/utils/utils'
-	import axios from 'axios'
-	export default {
-	  name: "ToolsClamp",
-	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView },
-	  props: {
-	  },
-	  data () {
-	    return {
-	    	audioStatus: [],
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      dialogTray: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      brand: {
-	      	key: ''
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-	      tenantViewVisible: false,
-	      tableKey: 0,
-	      queryParams: initQueryParams({}),
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-	      dicts: {
-          METERIAL_BRAND: {},  //工具材料品牌
-          METERIAL_CATEGORY: {},  //工具材料分类
-          MATERIAL_TYPE: {}  //工具材料毛坯成品分类
-        },
-	      enums: {
-	        TenantTypeEnum: {},
-	        TenantStatusEnum: {}
-	      }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 调用常量-审核状态
-	  	this.audioStatus = this.$constWKS.STATUSORTHERLIST
-	  	// 加载【字典】
-	  	initDicts(['METERIAL_BRAND', 'METERIAL_CATEGORY', 'MATERIAL_TYPE'], this.dicts);
-	  	// 加载列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	    currentUser () {
-	      return this.$store.state.account.user
-	    },
-	    metbrandList() {
-        return convertEnum(this.dicts.METERIAL_BRAND)
-      },
-	    metcatgList() {
-        return convertEnum(this.dicts.METERIAL_CATEGORY)
-      },
-      materialTypeList() {
-        return convertEnum(this.dicts.MATERIAL_TYPE)
-      }
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	    viewClose () {
-	      this.tenantViewVisible = false
-	    },
-	    editClose () {
-	      this.dialog.isVisible = false
-	    },
-	    editSuccess () {
-	      this.search()
-	    },
-	    editTrayClose () {
-	      this.dialogTray.isVisible = false
-	    },
-	    editTraySuccess () {
-	      this.search()
-	    },
-	    onSelectChange (selection) {
-	      this.selection = selection
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
-	    },
-	    reset () {
-	      this.queryParams = initQueryParams({})
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    add () {
-	      this.$refs.edit.type = "add"
-	      this.$refs.edit.setTenant(false, this.dicts)
-	      this.dialog.title = this.$t("common.add")
-	      this.dialog.isVisible = true
-	    },
-	    singleDelete (row) {
-	      this.$refs.table.clearSelection()
-	      this.$refs.table.toggleRowSelection(row, true)
-	      this.batchDelete()
-	    },
-	    batchDelete () {
-	      if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      const readonlyIndex = this.selection.findIndex(item => item.readonly)
-
-	      if (readonlyIndex > -1) {
-	        this.$message({
-	          message: this.$t("tips.systemData"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      this.$confirm(this.$t("prepare.tips.toolTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	const ids = []
-		      let contain = false
-		      this.selection.forEach(item => {
-		        if (item.readonly) {
-		          contain = true
-		          return
-		        }
-		        ids.push(item.id)
-		      })
-		      if (contain) {
-		        this.$message({
-		          message: this.$t("tips.systemData"),
-		          type: "warning"
-		        })
-		      } else {
-		        this.delete(ids)
-		      }
-	      }).catch(() => {})
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    delete (ids) {
-	      frockMgrApi.remove({ ids: ids }).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.$message({
-	            message: this.$t("tips.deleteSuccess"),
-	            type: "success"
-	          })
-	          this.search()
-	          // 清理已经删除的数据
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    view (row) {
-	      this.$refs.view.setTenant(row)
-	      this.tenantViewVisible = true
-	    },
-	    // 【修改】表头上Btn-事件
-	    editOne() {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }	
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.edit(this.selection[0]);
-	    },
-	    edit (row) {
-	      if (row.readonly) {
-	        this.$message({
-	          message: this.$t("tips.systemData"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "edit"
-	      this.dialog.title = this.$t("common.edit")
-	      this.dialog.isVisible = true
-	    },
-	    // 【设置可存放托盘】表头上Btn-事件
-	    trayOne() {
-	    	if (!this.selection.length) {
-		    	// 新增
-	    		this.addTray();
-		    	return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	// 打开弹出
-	    	this.tray(this.selection[0]);
-	    },
-	    
-	    // 修改【设置可存放托盘】
-	    tray(row) {
-	    	this.$refs.editTray.setTenant(row)
-	      this.$refs.editTray.type = "edit"
-	      this.dialogTray.title = this.$t("lineSide.common.editTray")
-	      this.dialogTray.isVisible = true
-	    },
-	    
-	    // 新增【设置可存放托盘】
-	    addTray() {
-	      this.$refs.editTray.type = "add"
-	      this.dialogTray.title = this.$t("lineSide.common.addTray")
-	      this.dialogTray.isVisible = true
-	    },
-	    
-	    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-	      }
-				//
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      // 搜索条件添加
-	      this.queryParams.model.brand = this.brand
-	      frockMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-	    cellClick (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      this.selection.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table.toggleRowSelection(row)
-	        }
-	      })
-
-	      if (!flag) {
-	        this.$refs.table.toggleRowSelection(row, true)
-	      }
-	    }
-	  }
-	}
-</script>
-<style lang="scss" scoped></style>
+<template>
+  <div class="app-container">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>{{$t("prepare.table.tools.no")}}:</span>
+    		<el-input v-model="queryParams.model.no" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+      <span style="margin-left: 15px;" >
+    		<span>{{$t("prepare.table.tools.materialType")}}:</span>
+    		<el-input v-model="queryParams.model.materialType" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;" >
+    		<span>{{$t("prepare.table.tools.name")}}:</span>
+    		<el-input v-model="queryParams.model.name" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("prepare.searchForm.status")}}:</span>
+    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+        	<el-option
+			      v-for="item in audioStatus"
+			      :key="item.value"
+			      :label="item.label"
+			      :value="item.value">
+			    </el-option>
+      	</el-select>
+    	</span>
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+    	<el-col>
+    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['frock:add']" @click="add">{{ $t("common.add") }}</el-button>
+	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['frock:update']" @click="editOne">
+	        {{ $t("common.edit") }}
+	      </el-button>
+	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['frock:delete']" @click="batchDelete">
+	        {{ $t("table.delete") }}
+	      </el-button>
+	      <!-- 设置可存放托盘 -->
+	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['frock:set']" @click="trayOne" v-show="false">
+	        {{ $t("lineSide.common.trayBtn") }}
+	      </el-button>
+    	</el-col>
+    </el-row>
+
+		<!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+	      <template slot-scope="scope">
+	        <div>
+	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+	        </div>
+	      </template>
+      </el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' :show-overflow-tooltip="true" width="120px"></el-table-column>
+      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' :show-overflow-tooltip="true" width="150px"></el-table-column>
+      <el-table-column prop="materialType" :label='$t("prepare.table.tools.materialType")' :show-overflow-tooltip="true" width="150px"></el-table-column>
+
+	  <el-table-column prop="mapNo" :label='$t("prepare.table.tools.mapNo")' :show-overflow-tooltip="true" width="100px"></el-table-column>
+      <el-table-column prop="factory" :label="$t('prepare.table.tools.factory')" align="center" :show-overflow-tooltip="true" width="80px"></el-table-column>
+      <el-table-column prop="expiryDate" :label="$t('prepare.table.tools.expiryDate')+' (月)'" align="center" :show-overflow-tooltip="true" width="100px"></el-table-column>
+	  <el-table-column prop="joinDate" :label='$t("prepare.table.tools.joinDate")' :show-overflow-tooltip="true" width="120px"></el-table-column>
+
+      <!--<el-table-column prop="specification" :label='$t("prepare.table.tools.specification")' :show-overflow-tooltip="true" width="250px"></el-table-column>-->
+<!--      <el-table-column prop="brand.data" :label='$t("prepare.table.tools.brand")' align="center" :show-overflow-tooltip="true" width="120px"></el-table-column>-->
+<!--      <el-table-column prop="category.data" :label='$t("prepare.table.tools.category")' align="center" :show-overflow-tooltip="true" width="120px"></el-table-column>-->
+      <el-table-column prop="num" :label='$t("prepare.table.tools.num")' :show-overflow-tooltip="true" align="center" width="70px"></el-table-column>
+	  <el-table-column prop="status" :label='$t("prepare.table.tools.status")' align="center" width="100px">
+      	<template slot-scope="{ row }">
+          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
+          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="100px"
+      >
+        <template slot-scope="{ row }">
+        	<!--<el-tooltip class="item" content="查看详情" effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-view table-operation"
+	            style="color: #87d068;"
+	            @click="view(row)"
+	          />
+          </el-tooltip>-->
+          <el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-edit table-operation"
+	            style="color: #2db7f5;"
+	            @click="edit(row)"
+	          />
+          </el-tooltip>
+          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-delete table-operation"
+	            style="color: #f50;"
+	            @click="singleDelete(row)"
+	          />
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+
+    <!-- 设置可存放托盘 -->
+    <setting-tray
+      ref="editTray"
+      :dialog-visible="dialogTray.isVisible"
+      :title="dialogTray.title"
+      @close="editTrayClose"
+      @success="editTraySuccess"
+    />
+
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	import TenantEdit from "./components/Edit"
+	import TenantView from "./components/View"
+	// 【工装管理】-API
+	import frockMgrApi from "@/api/prepareProductMgr/frockMgr"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	// 共通工具方法(字典分解)
+	import { convertEnum } from '@/utils/utils'
+	import axios from 'axios'
+	export default {
+	  name: "ToolsClamp",
+	  directives: { elDragDialog },
+	  components: { Pagination, TenantEdit, TenantView },
+	  props: {
+	  },
+	  data () {
+	    return {
+	    	audioStatus: [],
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      dialogTray: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      brand: {
+	      	key: ''
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      dicts: {
+          METERIAL_BRAND: {},  //工具材料品牌
+          METERIAL_CATEGORY: {},  //工具材料分类
+          MATERIAL_TYPE: {}  //工具材料毛坯成品分类
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 调用常量-审核状态
+	  	this.audioStatus = this.$constWKS.STATUSORTHERLIST
+	  	// 加载【字典】
+	  	initDicts(['METERIAL_BRAND', 'METERIAL_CATEGORY', 'MATERIAL_TYPE'], this.dicts);
+	  	// 加载列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    metbrandList() {
+        return convertEnum(this.dicts.METERIAL_BRAND)
+      },
+	    metcatgList() {
+        return convertEnum(this.dicts.METERIAL_CATEGORY)
+      },
+      materialTypeList() {
+        return convertEnum(this.dicts.MATERIAL_TYPE)
+      }
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	    viewClose () {
+	      this.tenantViewVisible = false
+	    },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+	    editSuccess () {
+	      this.search()
+	    },
+	    editTrayClose () {
+	      this.dialogTray.isVisible = false
+	    },
+	    editTraySuccess () {
+	      this.search()
+	    },
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.$refs.edit.setTenant(false, this.dicts)
+	      this.dialog.title = this.$t("common.add")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      const readonlyIndex = this.selection.findIndex(item => item.readonly)
+
+	      if (readonlyIndex > -1) {
+	        this.$message({
+	          message: this.$t("tips.systemData"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("prepare.tips.toolTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      let contain = false
+		      this.selection.forEach(item => {
+		        if (item.readonly) {
+		          contain = true
+		          return
+		        }
+		        ids.push(item.id)
+		      })
+		      if (contain) {
+		        this.$message({
+		          message: this.$t("tips.systemData"),
+		          type: "warning"
+		        })
+		      } else {
+		        this.delete(ids)
+		      }
+	      }).catch(() => {})
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      frockMgrApi.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    view (row) {
+	      this.$refs.view.setTenant(row)
+	      this.tenantViewVisible = true
+	    },
+	    // 【修改】表头上Btn-事件
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
+	    },
+	    edit (row) {
+	      if (row.readonly) {
+	        this.$message({
+	          message: this.$t("tips.systemData"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "edit"
+	      this.dialog.title = this.$t("common.edit")
+	      this.dialog.isVisible = true
+	    },
+	    // 【设置可存放托盘】表头上Btn-事件
+	    trayOne() {
+	    	if (!this.selection.length) {
+		    	// 新增
+	    		this.addTray();
+		    	return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	// 打开弹出
+	    	this.tray(this.selection[0]);
+	    },
+
+	    // 修改【设置可存放托盘】
+	    tray(row) {
+	    	this.$refs.editTray.setTenant(row)
+	      this.$refs.editTray.type = "edit"
+	      this.dialogTray.title = this.$t("lineSide.common.editTray")
+	      this.dialogTray.isVisible = true
+	    },
+
+	    // 新增【设置可存放托盘】
+	    addTray() {
+	      this.$refs.editTray.type = "add"
+	      this.dialogTray.title = this.$t("lineSide.common.addTray")
+	      this.dialogTray.isVisible = true
+	    },
+
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+	      }
+				//
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+	      // 搜索条件添加
+	      //this.queryParams.model.brand = this.brand
+	      frockMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    }
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>

+ 450 - 443
imcs-ui/src/views/zuihou/prepareProductMgr/frockMgr/components/Edit.vue

@@ -1,443 +1,450 @@
-<template>
-  <el-dialog
-  	:close-on-click-modal="false"
-  	:close-on-press-escape="false"
-  	:title="title"
-  	:append-to-body="true"
-  	:visible.sync="isVisible"
-  	:width="width"
-  	top="50px"
-  >
-    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
-      <el-form-item :label='$t("prepare.table.tools.name")+":"' prop="name">
-        <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.category")+":"' prop="category" >
-        <el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.category.key" value @change="selectCategory($event)">
-          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_CATEGORY" />
-        </el-select>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.materialType")+":"' prop="materialType" v-show="materialTypeShowFlag">
-        <el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.materialType.key" value>
-          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.MATERIAL_TYPE" />
-        </el-select>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.brand")+":"' prop="brand">
-      	<el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.brand.key" value>
-          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_BRAND" />
-        </el-select>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.model")+":"' prop="model">
-        <el-input v-model="tenant.model" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.mapNo")+":"' prop="mapNo">
-        <el-input v-model="tenant.mapNo" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.period")+":"' prop="period">
-        <el-input-number v-model="tenant.period" :min="1" :max="1000" label="12"></el-input-number>
-      </el-form-item>
-      <el-form-item :label="$t('prepare.table.tools.expiryDate')+':'" prop="expiryDate">
-        <el-input-number v-model="tenant.expiryDate" :min="1" :max="1000" label="12"></el-input-number>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.num")+":"' prop="num">
-        <el-input-number v-model="tenant.num" :min="1" :max="1000" label="1"></el-input-number>
-      </el-form-item>      
-      <el-form-item :label='$t("prepare.table.tools.joinDate")+":"' prop="joinDate">        
-        <el-date-picker
-            v-model="tenant.joinDate"
-            type="date"
-            value-format="yyyy-MM-dd"            
-            placeholder="">
-         </el-date-picker>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.specification")+":"' v-show="false">
-        <!-- 功能按钮 -->
-		    <el-row class="filter-container">
-		    	<el-col>
-		    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="addRes">新增</el-button>
-		    	</el-col>
-		    </el-row>
-		    <!-- Table数据 -->
-				<el-table
-		      ref="table"
-		      v-loading="loading"
-		      :data="tableData"
-		      border
-		      fit
-		      style="width: 100%;"
-		      @selection-change="onSelectChange"
-		    >
-		      <el-table-column prop="tradeMark" :label='$t("prepare.table.tools.tradeMark")' align="center" width="180px">
-		      	<template slot-scope="{ row }">
-		      		<el-input size="small" v-model="row.tradeMark" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>
-		      		<span v-else>{{row.tradeMark}}</span>
-		      	</template>
-		      </el-table-column>
-		      <!--<el-table-column prop="type" label="类型" width="120px">
-		      	<template slot-scope="{ row }">
-		      		<el-select v-model="row.type" size="small" v-if="row.isEdit" placeholder="请选择类型">
-		        		<el-option
-						      v-for="item in typeList"
-						      :key="item.value"
-						      :label="item.label"
-						      :value="item.value">
-						    </el-option>
-		          </el-select>
-		      		<span v-else="">{{row.type}}</span>
-		      	</template>
-		      </el-table-column>-->
-		      <el-table-column prop="specification" :label='$t("prepare.table.tools.specification")'>
-		      	<template slot-scope="{ row }">
-		      		<el-input size="small" v-model="row.specification" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>
-		      		<span v-else>{{row.specification}}</span>
-		      	</template>
-		      </el-table-column>
-		      <el-table-column
-		        :label="$t('table.operation')"
-		        fixed="right"
-		        align="center"
-		        column-key="operation"
-		        width="100px"
-		      >
-		        <template slot-scope="{ row }">
-		        	<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
-			          <i
-			            class="el-icon-edit table-operation"
-			            style="color: #2db7f5;"
-			            @click="edit(row)"
-			          />
-			        </el-tooltip>
-		          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
-			          <i
-			            class="el-icon-delete table-operation"
-			            style="color: #f50;"
-			            @click="singleDelete(row)"
-			          />
-		          </el-tooltip>
-		        </template>
-		      </el-table-column>
-		    </el-table>
-      </el-form-item>
-      <el-form-item :label='$t("prepare.table.tools.status")+":"' prop="status">
-        <template>
-				  <el-radio v-model="tenant.status" label="1">{{$t("common.status.valid")}}</el-radio>
-				  <el-radio v-model="tenant.status" label="0">{{$t("common.frozen")}}</el-radio>
-				</template>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
-      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
-    </div>
-  </el-dialog>
-</template>
-<script>
-// 【工具原材料管理】-API
-import frockMgrApi from "@/api/prepareProductMgr/frockMgr"
-
-export default {
-  name: 'TenantEdit',
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    },
-    title: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-    return {
-    	loading: false,
-      type: 'add',
-      tableData: [],
-      tenant: this.initTenant(),
-      screenWidth: 0,
-      width: this.initWidth(),
-      confirmDisabled: false,
-      materialTypeShowFlag: false,
-      dicts: {
-	      METERIAL_BRAND: {},  //工具材料品牌
-	      METERIAL_CATEGORY: {}, //工具材料分类
-        MATERIAL_TYPE: {}  //工具材料毛坯成品分类
-	    },
-      roles: [],
-      rules: {
-        name: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-        model: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-        category: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-        joinDate: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-        materialType: [
-          { required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-        brand: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        ],
-      }
-    }
-  },
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-        this.reset()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-  	// 【新增】按钮-事件
-    addRes(){
-      this.tableData.push({
-      	key: "WKS_"+ Math.random(),
-      	id: "",
-      	tradeMark: "",
-      	specification: "",
-      	isEdit: true
-      })
-    },
-    // Table的选择事件
-    onSelectChange (selection) {
-      this.selection = selection
-    },
-    // 【删除】按钮事件
-    singleDelete(row){
-    	this.$confirm("删除数据后,将会消失,您的努力将白费,请确认删除?", this.$t("common.tips"), {
-      	distinguishCancelAndClose: true,
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-      	// 过滤符合条件的数据
-      	let arr = this.tableData.filter(item => item.key != row.key || item.id != row.id)
-      	// 给新的数据赋值
-    		this.tableData = arr;
-      }).catch(() => {})
-    },
-    // 【修改】按钮事件
-    edit(row){
-    	let list = new Array();
-    	this.tableData.forEach((item, index) => {
-    		// 当前编辑行
-    		if(!!item.id && item.id == row.id){
-    			item.isEdit = true
-    		}
-    		list.push(item)
-    	})
-    	// 赋值给当前
-    	this.tableData = list
-    },
-    initTenant () {
-      return {
-      	model: '',
-        name: '',
-        category: {
-          key: ''
-        },
-        materialType: {
-          key: ''
-        },
-        brand: {
-          key: ''
-        },
-        status: '1',
-        period:12,
-        expiryDate:12,
-        num:1
-      }
-    },
-
-    selectCategory(id){
-      if("04" === id){
-          this.materialTypeShowFlag = true
-      }else{
-          this.materialTypeShowFlag = false
-      }
-    },
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 991) {
-        return '90%'
-      } else if (this.screenWidth < 1400) {
-        return '45%'
-      } else {
-        return '800px'
-      }
-    },
-    setTenant (val, dicts) {
-    	if(val){
-    		this.tenant = { ...val }
-    		if("04" === this.tenant.category.key){
-            this.materialTypeShowFlag = true
-        }else{
-            this.materialTypeShowFlag = false
-        }
-    		// 根据id,查询规格列表数据
-    		//this.getSpecsList(val)
-    	}
-      // 字典表
-      this.dicts = dicts
-    },
-    close () {
-      this.$emit('close')
-    },
-    reset () {
-      // 先清除校验,再清除表单,不然有奇怪的bug
-      this.$refs.form.clearValidate()
-      this.$refs.form.resetFields()
-      this.tenant = this.initTenant()
-      this.tableData = []  	//清空【规格】数据
-    },
-    submitForm () {
-    	// 验证规格必填
-    	/*let flag = false
-      
-    	if(this.tableData.length > 0){
-    		this.tableData.map(item => {
-	    		if(!item.specification){
-	    			flag = true
-	    		}
-	    	})         
-      if(this.tenant.model ==''){         
-         flag = true 
-    	}else{
-        console.log(this.tenant.model)
-    		this.$message({
-	          message: this.$t("prepare.tips.addGg"),
-	          type: 'warning'
-	        })
-				return
-    	} */
-    	if(this.tenant.model ==''){
-        console.log(this.$t("prepare.tips.inputGg"))
-    		this.$message({
-	          message: this.$t("prepare.tips.inputGg"),
-	          type: 'warning'
-	        })
-				return
-    	}
-    	// 添加规格数据
-    	this.tenant.mtoolMeterialSpecsList = this.tableData
-    	//console.log("Form数据:", this.tenant)
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          this.confirmDisabled = true
-          if (this.type === 'add') {
-            this.save()
-          } else {
-            this.update()
-          }
-        } else {
-          return false
-        }
-      })
-    },
-    save () {
-      console.log(this.tenant)
-      frockMgrApi.save(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.createSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    update () {
-      frockMgrApi.update(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.updateSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    // 根据【工具原材料】的id,查询,规格列表数据
-    getSpecsList(row){
-    	/*let obj = {
-    		current: 1,
-    		size: 1000,
-    		model: {
-    			meterialId: row.id
-    		}
-    	}*/
-    	frockMgrApi.listSpecs({meterialId: row.id}).then(res => {
-    		res = res.data
-    		console.log("规格数据:", res)
-    		if(res.isSuccess){
-    			this.tableData = res.data
-    		}
-    	})
-    }
-  }
-}
-</script>
-<style lang="scss" >
-.avatar-uploader .el-upload {
-  border: 1px dashed #d9d9d9;
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #409eff;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 100px;
-  height: 100px;
-  line-height: 100px;
-  text-align: center;
-}
-.avatar {
-  width: 100px;
-  height: 100px;
-  display: block;
-}
-.checkUsed{
-	display: inline-block;
-	margin-left: 10px;
-	color: #1890ff;
-}
-</style>
+<template>
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
+  	:append-to-body="true"
+  	:visible.sync="isVisible"
+  	:width="width"
+  	top="50px"
+  >
+    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
+      <el-form-item :label='$t("prepare.table.tools.no")+":"' prop="no">
+        <el-input v-model="tenant.no" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.name")+":"' prop="name">
+        <el-input v-model="tenant.name" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+<!--      <el-form-item :label='$t("prepare.table.tools.category")+":"' prop="category" >-->
+<!--        <el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.category.key" value @change="selectCategory($event)">-->
+<!--          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_CATEGORY" />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+<!--      <el-form-item :label='$t("prepare.table.tools.materialType")+":"' prop="materialType" v-show="materialTypeShowFlag">-->
+<!--        <el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.materialType.key" value>-->
+<!--          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.MATERIAL_TYPE" />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+<!--      <el-form-item :label='$t("prepare.table.tools.brand")+":"' prop="brand">-->
+<!--      	<el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.brand.key" value>-->
+<!--          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.METERIAL_BRAND" />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item :label='$t("prepare.table.tools.materialType")+":"' prop="materialType">
+        <el-input v-model="tenant.materialType" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.mapNo")+":"' prop="mapNo">
+        <el-input v-model="tenant.mapNo" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.factory")+":"' prop="factory">
+        <el-input v-model="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.joinDate")+":"' prop="joinDate">
+        <el-date-picker
+          v-model="tenant.joinDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.period")+":"' prop="period">
+        <el-input-number v-model="tenant.period" :min="1" :max="1000" label="12"></el-input-number>
+      </el-form-item>
+      <el-form-item :label="$t('prepare.table.tools.expiryDate')+':'" prop="expiryDate">
+        <el-input-number v-model="tenant.expiryDate" :min="1" :max="1000" label="12"></el-input-number>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.num")+":"' prop="num">
+        <el-input-number v-model="tenant.num" :min="1" :max="1000" label="1"></el-input-number>
+      </el-form-item>
+
+      <el-form-item :label='$t("prepare.table.tools.specification")+":"' v-show="false">
+        <!-- 功能按钮 -->
+		    <el-row class="filter-container">
+		    	<el-col>
+		    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="addRes">新增</el-button>
+		    	</el-col>
+		    </el-row>
+		    <!-- Table数据 -->
+				<el-table
+		      ref="table"
+		      v-loading="loading"
+		      :data="tableData"
+		      border
+		      fit
+		      style="width: 100%;"
+		      @selection-change="onSelectChange"
+		    >
+		      <el-table-column prop="tradeMark" :label='$t("prepare.table.tools.tradeMark")' align="center" width="180px">
+		      	<template slot-scope="{ row }">
+		      		<el-input size="small" v-model="row.tradeMark" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>
+		      		<span v-else>{{row.tradeMark}}</span>
+		      	</template>
+		      </el-table-column>
+		      <!--<el-table-column prop="type" label="类型" width="120px">
+		      	<template slot-scope="{ row }">
+		      		<el-select v-model="row.type" size="small" v-if="row.isEdit" placeholder="请选择类型">
+		        		<el-option
+						      v-for="item in typeList"
+						      :key="item.value"
+						      :label="item.label"
+						      :value="item.value">
+						    </el-option>
+		          </el-select>
+		      		<span v-else="">{{row.type}}</span>
+		      	</template>
+		      </el-table-column>-->
+		      <el-table-column prop="specification" :label='$t("prepare.table.tools.specification")'>
+		      	<template slot-scope="{ row }">
+		      		<el-input size="small" v-model="row.specification" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>
+		      		<span v-else>{{row.specification}}</span>
+		      	</template>
+		      </el-table-column>
+		      <el-table-column
+		        :label="$t('table.operation')"
+		        fixed="right"
+		        align="center"
+		        column-key="operation"
+		        width="100px"
+		      >
+		        <template slot-scope="{ row }">
+		        	<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
+			          <i
+			            class="el-icon-edit table-operation"
+			            style="color: #2db7f5;"
+			            @click="edit(row)"
+			          />
+			        </el-tooltip>
+		          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
+			          <i
+			            class="el-icon-delete table-operation"
+			            style="color: #f50;"
+			            @click="singleDelete(row)"
+			          />
+		          </el-tooltip>
+		        </template>
+		      </el-table-column>
+		    </el-table>
+      </el-form-item>
+      <el-form-item :label='$t("prepare.table.tools.status")+":"' prop="status">
+        <template>
+				  <el-radio v-model="tenant.status" label="1">{{$t("common.status.valid")}}</el-radio>
+				  <el-radio v-model="tenant.status" label="0">{{$t("common.frozen")}}</el-radio>
+				</template>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
+      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+<script>
+// 【工具原材料管理】-API
+import frockMgrApi from "@/api/prepareProductMgr/frockMgr"
+
+export default {
+  name: 'TenantEdit',
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+    	loading: false,
+      type: 'add',
+      tableData: [],
+      tenant: this.initTenant(),
+      screenWidth: 0,
+      width: this.initWidth(),
+      confirmDisabled: false,
+      materialTypeShowFlag: false,
+      dicts: {
+	      METERIAL_BRAND: {},  //工具材料品牌
+	      METERIAL_CATEGORY: {}, //工具材料分类
+        MATERIAL_TYPE: {}  //工具材料毛坯成品分类
+	    },
+      roles: [],
+      rules: {
+        name: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+        model: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+        category: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+        joinDate: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+        materialType: [
+          { required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+        brand: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        ],
+      }
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+        this.reset()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+  	// 【新增】按钮-事件
+    addRes(){
+      this.tableData.push({
+      	key: "WKS_"+ Math.random(),
+      	id: "",
+      	tradeMark: "",
+      	specification: "",
+      	isEdit: true
+      })
+    },
+    // Table的选择事件
+    onSelectChange (selection) {
+      this.selection = selection
+    },
+    // 【删除】按钮事件
+    singleDelete(row){
+    	this.$confirm("删除数据后,将会消失,您的努力将白费,请确认删除?", this.$t("common.tips"), {
+      	distinguishCancelAndClose: true,
+        confirmButtonText: "确认",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+      	// 过滤符合条件的数据
+      	let arr = this.tableData.filter(item => item.key != row.key || item.id != row.id)
+      	// 给新的数据赋值
+    		this.tableData = arr;
+      }).catch(() => {})
+    },
+    // 【修改】按钮事件
+    edit(row){
+    	let list = new Array();
+    	this.tableData.forEach((item, index) => {
+    		// 当前编辑行
+    		if(!!item.id && item.id == row.id){
+    			item.isEdit = true
+    		}
+    		list.push(item)
+    	})
+    	// 赋值给当前
+    	this.tableData = list
+    },
+    initTenant () {
+      return {
+      	model: '',
+        name: '',
+        category: {
+          key: ''
+        },
+        materialType: {
+          key: ''
+        },
+        brand: {
+          key: ''
+        },
+        status: '1',
+        period:12,
+        expiryDate:12,
+        num:1
+      }
+    },
+
+    selectCategory(id){
+      if("04" === id){
+          this.materialTypeShowFlag = true
+      }else{
+          this.materialTypeShowFlag = false
+      }
+    },
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setTenant (val, dicts) {
+    	if(val){
+    		this.tenant = { ...val }
+    		if("04" === this.tenant.category.key){
+            this.materialTypeShowFlag = true
+        }else{
+            this.materialTypeShowFlag = false
+        }
+    		// 根据id,查询规格列表数据
+    		//this.getSpecsList(val)
+    	}
+      // 字典表
+      this.dicts = dicts
+    },
+    close () {
+      this.$emit('close')
+    },
+    reset () {
+      // 先清除校验,再清除表单,不然有奇怪的bug
+      this.$refs.form.clearValidate()
+      this.$refs.form.resetFields()
+      this.tenant = this.initTenant()
+      this.tableData = []  	//清空【规格】数据
+    },
+    submitForm () {
+    	// 验证规格必填
+    	/*let flag = false
+
+    	if(this.tableData.length > 0){
+    		this.tableData.map(item => {
+	    		if(!item.specification){
+	    			flag = true
+	    		}
+	    	})
+      if(this.tenant.model ==''){
+         flag = true
+    	}else{
+        console.log(this.tenant.model)
+    		this.$message({
+	          message: this.$t("prepare.tips.addGg"),
+	          type: 'warning'
+	        })
+				return
+    	} */
+    	if(this.tenant.model ==''){
+        console.log(this.$t("prepare.tips.inputGg"))
+    		this.$message({
+	          message: this.$t("prepare.tips.inputGg"),
+	          type: 'warning'
+	        })
+				return
+    	}
+    	// 添加规格数据
+    	this.tenant.mtoolMeterialSpecsList = this.tableData
+    	//console.log("Form数据:", this.tenant)
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.confirmDisabled = true
+          if (this.type === 'add') {
+            this.save()
+          } else {
+            this.update()
+          }
+        } else {
+          return false
+        }
+      })
+    },
+    save () {
+      console.log(this.tenant)
+      frockMgrApi.save(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.createSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    update () {
+      frockMgrApi.update(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.updateSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    // 根据【工具原材料】的id,查询,规格列表数据
+    getSpecsList(row){
+    	/*let obj = {
+    		current: 1,
+    		size: 1000,
+    		model: {
+    			meterialId: row.id
+    		}
+    	}*/
+    	frockMgrApi.listSpecs({meterialId: row.id}).then(res => {
+    		res = res.data
+    		console.log("规格数据:", res)
+    		if(res.isSuccess){
+    			this.tableData = res.data
+    		}
+    	})
+    }
+  }
+}
+</script>
+<style lang="scss" >
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+.checkUsed{
+	display: inline-block;
+	margin-left: 10px;
+	color: #1890ff;
+}
+</style>