yaoyq 3 lat temu
rodzic
commit
40e793b915

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

@@ -117,7 +117,7 @@ export default {
 	  		setUse: '设为使用',
 	  		loadTechn: '导入工艺',
 	  		copyVision: '复制一个版本',
-	  		expandsEve: '展开产品所有节点',
+	  		// expandsEve: '展开产品所有节点',
 	  		audioStatus: '提交审核',
 	  		audioBtn: '审核产品',
 	  		viewTech: '查看工序分析',
@@ -139,7 +139,7 @@ export default {
 				period: '周期',
 				num: '数量',
 				expiryDate: '有效期',
-				materialNo: '材料编号',				
+				materialNo: '材料编号',
 				joinDate: '入厂日期',
        			materialType: '物料类型',
 				status: '启用状态',

+ 20 - 13
imcs-ui/src/views/zuihou/prepareProductMgr/technologyMgr/components/TechnologyEdit.vue

@@ -50,7 +50,7 @@
 		  			<equipment-form ref="equipment" :type="type" @setProgram="setProgram"></equipment-form>
 		  			
 		  			<!-- 所需原材料 -->
-		  			<material-form ref="material" :type="type"></material-form>
+		  			<!-- <material-form ref="material" :type="type"></material-form> -->
 		  			
 		  			<!-- 托盘夹具组 -->
 		  			<tray-form ref="tray" :type="type" @setProgram="setProgramByTray"></tray-form>
@@ -85,7 +85,7 @@ import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
 // 【可执行设备(位置)】组件
 import EquipmentForm from "../../technologyVersion/components/equipmentForm/"
 // 【所需原材料】组件
-import MaterialForm from "../../technologyVersion/components/materialForm/"
+// import MaterialForm from "../../technologyVersion/components/materialForm/"
 // 【所需原材料】组件
 import TrayForm from "../../technologyVersion/components/trayForm/"
 // 【程序】组件
@@ -99,7 +99,14 @@ import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
 
 export default {
   name: 'TechnologyEdit',
-  components: { EquipmentForm, MaterialForm, TrayForm, ProgramForm, QualityForm, RobotarmForm },
+  components: { 
+  	EquipmentForm, 
+  	// MaterialForm, 
+  	TrayForm, 
+  	ProgramForm, 
+  	QualityForm, 
+  	RobotarmForm 
+  },
   props: {
   	dialogVisible: {
       type: Boolean,
@@ -275,8 +282,8 @@ export default {
       // 清除【可执行设备(位置)】
       this.$refs.equipment.tableData = []
       // 清除【所需原材料】
-      this.$refs.material.radio = null
-      this.$refs.material.tableData = []
+      //this.$refs.material.radio = null
+      //this.$refs.material.tableData = []
       // 清除【托盘夹具组】
       this.$refs.tray.radio = null
       this.$refs.tray.tableData = []
@@ -290,12 +297,12 @@ export default {
     	// 获取【可执行设备(位置)】数据
     	this.tenant.productionresourceList = this.$refs.equipment.tableData
     	// 获取【所需原材料】数据
-    	this.tenant.armMeterialConf = this.$refs.material.armMeterialConf ? '1' : '0'
-    	this.tenant.meterialConf = this.$refs.material.radio
-    	this.tenant.meterialList = this.$refs.material.tableData
+    	//this.tenant.armMeterialConf = this.$refs.material.armMeterialConf ? '1' : '0'
+    	//this.tenant.meterialConf = this.$refs.material.radio
+    	//this.tenant.meterialList = this.$refs.material.tableData
     	// 获取【托盘夹具组】数据
-    	this.tenant.armTrayConf = this.$refs.material.armTrayConf ? '1' : '0'
-    	this.tenant.armFixtureConf = this.$refs.material.armFixtureConf ? '1' : '0'
+    	this.tenant.armTrayConf = this.$refs.trayConf.armTrayConf ? '1' : '0'
+    	this.tenant.armFixtureConf = this.$refs.trayConf.armFixtureConf ? '1' : '0'
     	this.tenant.trayConf = this.$refs.tray.radio
     	this.tenant.procedureTrayList = this.$refs.tray.tableData
     	// 获取【程序】数据
@@ -459,9 +466,9 @@ export default {
 		    	// 把【设备】的数据,给【程序】使用
 		    	// this.setProgram(eqList)
 		    	// 获取【所需原材料】数据
-		    	this.$refs.material.radio = res.data.meterialConf
-		    	this.$refs.material.armMeterialConf = res.data.armMeterialConf == '1' ? true : false
-		    	this.$refs.material.tableData = this.setKeyList(res.data.meterialList)
+		    	//this.$refs.material.radio = res.data.meterialConf
+		    	//this.$refs.material.armMeterialConf = res.data.armMeterialConf == '1' ? true : false
+		    	//this.$refs.material.tableData = this.setKeyList(res.data.meterialList)
 		    	// 获取【托盘夹具组】数据
 		    	this.$refs.tray.radio = res.data.trayConf
 	    		this.$refs.tray.armTrayConf = res.data.armTrayConf == '1' ? true : false

+ 19 - 12
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/TechnologyEdit.vue

@@ -52,7 +52,7 @@
 		  			<equipment-form ref="equipment" @setProgram="setProgram"></equipment-form>
 		  			
 		  			<!-- 所需原材料 -->
-		  			<material-form ref="material" :technology="currentRow"></material-form>
+		  			<!-- <material-form ref="material" :technology="currentRow"></material-form> -->
 		  			
 		  			<!-- 托盘夹具组 -->
 		  			<tray-form ref="tray" :technology="currentRow" @clearProgram="clearProgram" @setProgram="setProgramByTray"></tray-form>
@@ -87,7 +87,7 @@ import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
 // 【可执行设备(位置)】组件
 import EquipmentForm from "./equipmentForm/"
 // 【所需原材料】组件
-import MaterialForm from "./materialForm/"
+// import MaterialForm from "./materialForm/"
 // 【所需原材料】组件
 import TrayForm from "./trayForm/"
 // 【程序】组件
@@ -101,7 +101,14 @@ import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
 
 export default {
   name: 'TenantEdit',
-  components: { EquipmentForm, MaterialForm, TrayForm, ProgramForm, RobotarmForm, QualityForm },
+  components: { 
+  	EquipmentForm, 
+  	//MaterialForm, 
+  	TrayForm, 
+  	ProgramForm, 
+  	RobotarmForm, 
+  	QualityForm 
+  },
   props: {
   	dialogVisible: {
       type: Boolean,
@@ -260,8 +267,8 @@ export default {
       // 清除【可执行设备(位置)】
       this.$refs.equipment.tableData = []
       // 清除【所需原材料】
-      this.$refs.material.radio = null
-      this.$refs.material.tableData = []
+      //this.$refs.material.radio = null
+      //this.$refs.material.tableData = []
       // 清除【托盘夹具组】
       this.$refs.tray.radio = null
       this.$refs.tray.tableData = []
@@ -280,9 +287,9 @@ export default {
     	// 获取【可执行设备(位置)】数据
     	this.tenant.productionresourceList = this.$refs.equipment.tableData
     	// 获取【所需原材料】数据
-    	this.tenant.armMeterialConf = this.$refs.material.armMeterialConf ? '1' : '0'
-    	this.tenant.meterialConf = this.$refs.material.radio
-    	this.tenant.meterialList = this.$refs.material.tableData
+    	//this.tenant.armMeterialConf = this.$refs.material.armMeterialConf ? '1' : '0'
+    	//this.tenant.meterialConf = this.$refs.material.radio
+    	//this.tenant.meterialList = this.$refs.material.tableData
     	// 获取【托盘夹具组】数据
     	this.tenant.armTrayConf = this.$refs.tray.armTrayConf ? '1' : '0'
     	this.tenant.armFixtureConf = this.$refs.tray.armFixtureConf ? '1' : '0'
@@ -456,11 +463,11 @@ export default {
 		    	// 把【设备】的数据,给【程序】使用
 		    	// this.setProgram(eqList)
 		    	// 获取【所需原材料】数据
-		    	if(!!res.data.meterialConf){
+		    	/*if(!!res.data.meterialConf){
 		    		this.$refs.material.radio = res.data.meterialConf
-		    	}
-		    	this.$refs.material.armMeterialConf = res.data.armMeterialConf == '1' ? true : false
-		    	this.$refs.material.tableData = this.setKeyList(res.data.meterialList)
+		    	}*/
+		    	//this.$refs.material.armMeterialConf = res.data.armMeterialConf == '1' ? true : false
+		    	//this.$refs.material.tableData = this.setKeyList(res.data.meterialList)
 		    	// 获取【托盘夹具组】数据
 		    	if(!!res.data.trayConf){
 		    		this.$refs.tray.radio = res.data.trayConf

+ 13 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/Edit.vue

@@ -291,6 +291,7 @@ export default {
   		// 赋值
   		this.tableData = list
   	},
+  	
   	// 【程序管理】按钮-事件
   	addProgram(row){
   		// 给程序赋值
@@ -300,10 +301,12 @@ export default {
   		// 打开弹出框
   		this.dialogProgram = true
   	},
+  	
   	// 【程序管理-取消】按钮-事件
   	editClose(){
   		this.dialogProgram = false
   	},
+  	
   	// 【程序管理-确定】按钮-事件
   	editSuccess(obj){
   		// 给选择的数据,赋值
@@ -324,6 +327,7 @@ export default {
   		// 赋值
   		this.tableData =  list
   	},
+  	
   	// 【新增】按钮-事件
     addRes(){
       this.tableData.push({
@@ -334,10 +338,12 @@ export default {
       	toolNmus: ''
       })
     },
+    
     // Table的选择事件
     onSelectChange (selection) {
       this.selection = selection
     },
+    
     // 【修改】按钮事件
     edit(row){
     	let list = new Array();
@@ -351,6 +357,7 @@ export default {
     	// 赋值给当前
     	this.tableData = list
     },
+    
     initTenant () {
       return {
       	prority: '10',
@@ -364,6 +371,7 @@ export default {
         status: '1'
       }
     },
+    
     initWidth () {
       this.screenWidth = document.body.clientWidth
       if (this.screenWidth < 991) {
@@ -374,6 +382,7 @@ export default {
         return '800px'
       }
     },
+    
     setTenant (val, selectedEq, selectedTray) {
     	console.log("上一个Row:", val)
     	console.log("设备:", selectedEq)
@@ -390,9 +399,11 @@ export default {
     	this.selectedEq = selectedEq
     	this.selectedTray = selectedTray
     },
+    
     close () {
       this.$emit('close')
     },
+    
     reset () {
       // 先清除校验,再清除表单,不然有奇怪的bug
       this.$refs.form.clearValidate()
@@ -400,6 +411,7 @@ export default {
       this.tenant = this.initTenant()
       this.tableData = []  	//清空【规格】数据
     },
+    
     submitForm () {
     	console.log("Form数据:", this.tenant)
       this.$refs.form.validate((valid) => {
@@ -422,6 +434,7 @@ export default {
         }
       })
     },
+    
     // 【新增】程序
     addPg(){
     	// 开启按钮

+ 45 - 11
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/trayForm/index.vue

@@ -8,7 +8,8 @@
 			    <el-radio label="2">{{$t("prepare.common.idNeed.reception")}}</el-radio>
 			    <el-radio label="3">{{$t("prepare.common.idNeed.need")}}</el-radio>
 			</el-radio-group>
-			<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="add" circle></el-button>
+			<!--<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="add" circle></el-button>-->
+			<el-button :disabled="showButton" type="primary" icon="el-icon-plus" size="small" @click="editTools" circle></el-button>
 			<span style="margin-left: 50px;">
 				<el-checkbox v-model="armTrayConf" :disabled="showRadio">{{$t("prepare.common.armTrayConf")}}</el-checkbox>
 				<el-checkbox v-model="armFixtureConf" :disabled="showRadio">{{$t("prepare.common.armFixtureConf")}}</el-checkbox>
@@ -26,14 +27,13 @@
     		@current-change="handleCurrentChange"
 	      style="width: 100%;"
 	      header-row-class-name="technologTable"
-	      :span-method="objectSpanMethod"
 	    >
 	    	<!-- 组序 -->
-	    	<el-table-column prop="groupSort" :label='$t("prepare.table.toolGroup.groupSort")' align="center" width="70px"></el-table-column>
+	    	<!--<el-table-column prop="groupSort" :label='$t("prepare.table.toolGroup.groupSort")' align="center" width="70px"></el-table-column>-->
 	    	<!-- 优先级 -->
-	    	<el-table-column prop="groupPrority" :label='$t("prepare.table.toolGroup.groupPrority")' align="center" width="80px"></el-table-column>
+	    	<!--<el-table-column prop="groupPrority" :label='$t("prepare.table.toolGroup.groupPrority")' align="center" width="80px"></el-table-column>-->
 	    	<!-- 类型 -->
-	    	<el-table-column prop="category.data" :label='$t("prepare.table.toolGroup.category")' align="center" width="100px">
+	    	<!--<el-table-column prop="category.data" :label='$t("prepare.table.toolGroup.category")' align="center" width="100px">
 	    		<template slot-scope="{ row }">
 	    			<div v-if="type == 'view'">{{row.category.data}}</div>
 	    			<div v-else>
@@ -41,7 +41,7 @@
 	    				<el-button v-else type="text" @click="addRow(row)">{{row.category.data}}</el-button>
 	    			</div>
 	    		</template>
-	    	</el-table-column>
+	    	</el-table-column>-->
 	    	<!-- 名称 -->
 	    	<el-table-column prop="name" :label='$t("prepare.table.toolGroup.name")' align="center" width="120px" :show-overflow-tooltip="true"></el-table-column>
 	      <!-- 编号 -->
@@ -53,7 +53,7 @@
 	      <!-- 使用加紧位置 -->
 	      <el-table-column prop="positions" :label='$t("prepare.table.toolGroup.positions")' align="center" width="180px"></el-table-column>
 	      <!-- 装甲方式 -->
-	      <el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
+	      <!--<el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
 	      	<template slot-scope="{ row }" v-if="row.category.key == '02'">
 	      		<div v-if="row.jjImgList && row.jjImgList.length > 0" class="demo-image__preview">
 						  <el-image 
@@ -64,9 +64,9 @@
 						</div>
 	          <el-button v-else type="text" @click="handleClick(row)">{{$t("common.uploadImg")}}</el-button>
 					</template>
-	      </el-table-column>
+	      </el-table-column>-->
 	      <!-- 备注 -->
-	      <el-table-column prop="remark" :label='$t("common.remark")' width="180px">
+	      <el-table-column prop="remark" :label='$t("common.remark")'>
 	      	<template slot-scope="{ row }">
 	      		<el-input size="small" v-model="row.remark" :placeholder='$t("common.pleaseEnter")'></el-input>
 	      	</template>
@@ -80,7 +80,8 @@
 	        column-key="operation"
 	        width="60px"
 	      >
-	        <template slot-scope="{ row }" v-if="row.category.key == '03'">
+	        <!--<template slot-scope="{ row }" v-if="row.category.key == '03'">-->
+	        <template slot-scope="{ row }">
 	        	<!--<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
 		          <i
 		            class="el-icon-edit table-operation"
@@ -381,6 +382,7 @@
 		        this.fileList = Object.assign([],row.jjImgList)
 		    }
 			},
+			
 			// 上传成功,push到当前行的jjImgList数组中
 	    handleSuccss(res, file, fileList) {
 	    	// console.log("图片:", res)
@@ -393,7 +395,8 @@
 	      this.uploadQcVisible = false
 	      this.closePic()
 	    },
-	     //关闭对话框时,重载组件,并且把fileList清空,否则会有异常
+	    
+	    //关闭对话框时,重载组件,并且把fileList清空,否则会有异常
 	    closePic() {
 	      this.timer = new Date().getTime()
 	      this.fileList = []
@@ -425,6 +428,7 @@
 	      this.$refs.table.clearFilter()
 	      this.search()
 	    },
+	    
 	    // 【删除】按钮-事件  groupSort
 	    domDelete(row){
 	    	
@@ -449,6 +453,7 @@
 		    	this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
 	      }).catch(() => {})
 	    },
+	    
 	    // 托盘【新增】按钮-事件
 	    add () {
 	      // 设置【组序】
@@ -460,6 +465,7 @@
 	      this.dialogAdd.title = this.$t("common.add") + this.$t("prepare.common.tpJgroup")
 	      this.dialogAdd.isVisible = true
 	    },
+	    
 	    // 托盘【修改】按钮-事件
 	    addRow(row){
 	    	// 设置【组序】
@@ -468,10 +474,12 @@
 	      this.dialogAdd.title = this.$t("common.edit") + this.$t("prepare.common.tpJgroup")
 	      this.dialogAdd.isVisible = true
 	    },
+	    
 	    // 弹出框【取消】按钮-事件
 	    editAddClose () {
 	      this.dialogAdd.isVisible = false
 	    },
+	    
 	    // 弹出框【确定】按钮-事件
 	    editAddSuccess (arr) {
 	    	// 通过深层复制,避免相同地址引起数据,一起改变
@@ -524,6 +532,7 @@
 	    	// 把值给父组件【程序】赋值
 	    	this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
 	    },
+	    
 	    // 设置数据前,需要合并
 	    setDataMustSpan(data){
 	    	this.tableData =  data
@@ -535,15 +544,39 @@
 	    		this.$emit("setProgram", this.tableData.filter(item => item.category.key == '03'))
 	    	}
 	    },
+	    
 	    // 【夹具】修改-事件
 	    editTools(row){
 	    	this.dialog.title = this.$t("common.edit") + this.$t("prepare.common.tab5")
 	      this.dialog.isVisible = true
 	    },
+	    
 	    editClose(){
 	    	this.dialog.isVisible = false
 	    },
+	    
 	    editSuccess(obj){
+	    	// 最新数组
+	    	let list = []
+	    	// 深度Copy,防止翻车
+	    	let tool = JSON.parse(obj);
+	    	let arr = tool.specification2.split(",");
+	    	let item = {
+	    		trayPositionId: tool.id,
+	    		trayId: tool.trayId,			// 夹具id
+	    		no: tool.no, 							// 编号
+	    		name: tool.name,  				// 名称
+	    		brand: tool.brand, 				// 品牌
+	    		specification: arr[1],  	// 规格
+	    		specificationId: arr[0] 	// 规格id
+	    	};
+	    	// 添加数据
+	    	list.push(item);
+	    	// 重新赋值
+	    	this.tableData = [...this.tableData, ...list];
+	    },
+	    
+	    editSuccess_v1(obj){
 	    	// 深度Copy,防止翻车
 	    	let tool = JSON.parse(obj)
 	    	// console.log("选择的对象:", tool)
@@ -569,6 +602,7 @@
 	    	// 重新赋值
 	    	this.tableData = list
 	    },
+	    
 	    clearSelections () {
 	      this.$refs.table.clearSelection()
 	    },