Browse Source

刀具校验功能

oyq28 2 years ago
parent
commit
8b91c9c8de

+ 5 - 1
imcs-ui/src/lang/zh/cuttingTool.js

@@ -19,6 +19,7 @@ export default {
       customizeCuttingtool: {
         cuttingtoolName: '刀具名称',
         specifications: '刀具规格',
+        deviceId: '安装设备',        
         status: '状态',
       },
     },
@@ -53,7 +54,7 @@ export default {
         cuttingToolPosition: '刀具位置',
         machineCuttingToolType: '刀具类型',
         cuttingToolRadius: '刀具半径',
-        cuttingToolLife: '刀具寿命'
+        cuttingToolLife: '刀具寿命',        
       },
       // 刀具基础数据
       customizeCuttingtool: {
@@ -62,6 +63,7 @@ export default {
         cuttingToolType: '刀具类型',
         cuttingToolPicture: '刀具图片',
         cuttingToolInstallPicture: '装夹方式',
+        deviceName: '设备名称',
         status: '启用状态',
       }
     },
@@ -72,8 +74,10 @@ export default {
         cuttingToolName: '刀具名称',
         specifications: '刀具规格',
         cuttingToolType: '刀具类型',
+        deviceId: '安装设备',
         cuttingToolPicture: '刀具图片',
         cuttingToolInstallPicture: '装夹方式',
+        cutterNo: '刀位号',
         remark: '备注',
         status: '启用状态',
       }

+ 5 - 5
imcs-ui/src/views/zuihou/largeScreen/twoDatasModel/Index.vue

@@ -128,7 +128,7 @@
 								<div class="allTitleLeft font13">今日实际加工时间</div>
 							</el-col>
 							<el-col :span="12">
-								<div class="allTitleLeft allFont"  ref="runningTime">{{ timeSpanList.validTimeSpanStatistics.minutes+112}}分钟</div>
+								<div class="allTitleLeft allFont"  ref="runningTime">{{ timeSpanList.validTimeSpanStatistics.minutes}}分钟</div>
 							</el-col>					  		
 						</el-row>	
 					  </el-col>						  
@@ -559,8 +559,8 @@
             areaMgrApi.getTimeSpanList({}).then(res=>{
 				if (res.status == 200 && res.data.isSuccess) {
 					this.timeSpanList = res.data.data
-					this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"] + 86
-					this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"] + 325
+					this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"] 
+					this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"]
 					this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]	
 				}
 			})
@@ -748,8 +748,8 @@
 							
 						this.timeSpanList.validTimeSpanStatistics = data.data.validTimeSpanStatistics
 						this.timeSpanList.timeSpanStatistics = data.data.timeSpanStatistics
-						this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"] + 86
-					    this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"] + 325
+						this.timeSpanList.timeSpanStatistics["智能生产保障系统"] = this.timeSpanList.timeSpanStatistics["智能生产保障系统"] 
+					    this.timeSpanList.timeSpanStatistics["框体类加工单元"] = this.timeSpanList.timeSpanStatistics["框体类加工单元"] 
 						this.timeSpend = this.timeSpanList.timeSpanStatistics["智能生产保障系统"]+this.timeSpanList.timeSpanStatistics["框体类加工单元"] + this.timeSpanList.timeSpanStatistics["舱体类加工单元"]	
 
 

+ 0 - 2
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -510,8 +510,6 @@ export default {
                 this.$refs.view5.setTenant(item)
                 this.view5Visible = true
             } 
-            //this.$refs.view4.setTenant(item)
-            //this.view4Visible = true
         }         
 	  },
     viewClose() {

+ 2 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View3.vue

@@ -78,7 +78,8 @@
     	</el-row>
 
     	<div slot="footer" class="dialog-footer">
-	      <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.inFinished') }}</el-button>
+        <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
+	      <el-button type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
 	    </div>
     </div>
   </el-dialog>

+ 37 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/customizeCuttingTool/components/Edit.vue

@@ -24,6 +24,17 @@
           <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.CUTTING_TOOL_TYPE" />
       	</el-select>
       </el-form-item>
+
+      <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.deviceId")+":"' prop="deviceId">        
+      	<el-select v-model="customizeCuttingTool.deviceId" :placeholder='$t("common.pleaseSelect")' style="width: 50%;">
+          <el-option :key="item.name" :label="item.name" :value="item.id" v-for="(item, index) in deviceData.records" />
+      	</el-select>
+      </el-form-item>
+
+      <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cutterNo")+":"' prop="cutterNo">
+      	<el-input-number v-model="customizeCuttingTool.cutterNo" :min="1"></el-input-number>
+      </el-form-item>
+
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolPicture")+":"' prop="cuttingToolPicture">
         <el-upload
           class="upload-demo"
@@ -100,9 +111,11 @@
 </template>
 <script>
 	// 【刀具管理】-API
+  import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
 	import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
   import db from "@/utils/localstorage";
   import {Base64} from 'js-base64';
+  import {initQueryParams } from '@/utils/commons'
 export default {
   name: 'CustomizeCuttingToolEdit',
   components: {},
@@ -134,9 +147,11 @@ export default {
       cuttingToolPictureFileList: [],
       cuttingToolInstallPictureFileList: [],
       customizeCuttingTool: this.initCustomizeCuttingTool(),
+      queryMachineParams: initQueryParams({}),
       screenWidth: 0,
       width: this.initWidth(),
       confirmDisabled: false,
+      deviceData: [],
       dialog: {
         isVisible: false,
         title: ""
@@ -152,6 +167,9 @@ export default {
         cuttingToolName: [
         	{ required: true, message: this.$t("rules.require"), trigger: 'change' },
         ],
+        deviceId: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'change' },
+        ],
         cuttingToolType: [
           { required: true, validator: (rule, value, callback) => {
               console.log("this.customizeCuttingTool.cuttingToolType.key="+this.customizeCuttingTool.cuttingToolType.key)
@@ -215,6 +233,8 @@ export default {
         cuttingToolType: {
             key: ''
         },
+        deviceId: '',
+        cutterNo: 1,
         cuttingToolPicture: '',
         cuttingToolInstallPicture: '',
         remark: '',
@@ -233,15 +253,31 @@ export default {
     },
     setCustomizeCuttingTool (val, dicts) {
     	if(val){
-    		this.customizeCuttingTool = { ...val }
+    		this.customizeCuttingTool = { ...val }       
     	}
       // 字典表
       this.dicts = dicts
+      this.fetch({}) 
       console.log(this.dicts)
     },
     close () {
       this.$emit('close')
     },
+    fetch (params = {}) {
+	      this.loading = true
+	      this.queryMachineParams.current = params.current ? params.current : this.queryMachineParams.current
+	      this.queryMachineParams.size = 100 
+
+        // 查询必须参数
+        machineCustomizeCuttingToolMgrApi.getPageList(this.queryMachineParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.deviceData = res.data	         
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
     reset () {
       // 先清除校验,再清除表单,不然有奇怪的bug
       this.$refs.form.clearValidate()

+ 29 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/customizeCuttingTool/index.vue

@@ -10,7 +10,12 @@
     		<span>{{$t("cuttingTool.searchForm.customizeCuttingtool.specifications")}}:</span>
     		<el-input v-model="queryParams.model.specifications" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
     	</span>
-
+		<span style="margin-left: 15px;">
+    		<span>{{$t("cuttingTool.searchForm.customizeCuttingtool.deviceId")}}:</span>
+			<el-select v-model="queryParams.model.deviceId" :placeholder='$t("common.pleaseSelect")' style="width: 150px;">
+          		<el-option :key="item.name" :label="item.name" :value="item.id" v-for="(item, index) in deviceData.records" />
+      		</el-select>
+    	</span>
       <span style="margin-left: 15px;">
 	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
 	        {{ $t("table.search") }}
@@ -58,7 +63,9 @@
       <el-table-column align="center" prop="cuttingToolName" :label='$t("cuttingTool.table.customizeCuttingtool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 刀具规格 -->
       <el-table-column align="center" prop="specifications" :label='$t("cuttingTool.table.customizeCuttingtool.specifications")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具类型 -->
+      <!-- 设备名称 -->
+	  <el-table-column align="center" prop="deviceName" :label='$t("cuttingTool.table.customizeCuttingtool.deviceName")' :show-overflow-tooltip="true"></el-table-column>
+	  <!-- 刀具类型 -->
       <el-table-column align="center"
         :filter-multiple="false"
         :filters="cuttingToolTypeList"
@@ -156,6 +163,7 @@
   import { convertEnum } from '@/utils/utils'
 	// 【刀具基础数据】-API
   // 【刀具管理】-API
+  import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
   import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
 	import elDragDialog from '@/directive/el-drag-dialog'
 	import { initDicts,initQueryParams } from '@/utils/commons'
@@ -183,8 +191,10 @@
 
             }
         }),
+		queryMachineParams: initQueryParams({}),
 	      selection: [],
 	      loading: false,
+		  deviceData: [],
 	      tableData: {
 	        total: 0
 	      }
@@ -196,7 +206,8 @@
       initDicts(['CUTTING_TOOL_TYPE'], this.dicts);
 	  	// 加载列表数据
 	  	this.fetch()
-		},
+		this.device()
+	  },
 	  computed: {
       cuttingToolTypeList() {
           return convertEnum(this.dicts.CUTTING_TOOL_TYPE)
@@ -319,6 +330,21 @@
 	        // eslint-disable-next-line no-return-assign
 	      }).finally(() => this.loading = false)
 
+	    },
+		device (params = {}) {
+	      this.loading = true
+	      this.queryMachineParams.current = params.current ? params.current : this.queryMachineParams.current
+	      this.queryMachineParams.size = 100 
+
+        // 查询必须参数
+        machineCustomizeCuttingToolMgrApi.getPageList(this.queryMachineParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.deviceData = res.data	         
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
 	    },
 	    cellClick (row, column) {
 	      if (column['columnKey'] === "operation") {

+ 22 - 15
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue

@@ -248,10 +248,14 @@ export default {
 		getToolList(arrs){
 			this.queryParams.current = 1
 			this.queryParams.size = 9999
-			//this.queryParams.map.state = '0'
+			this.queryParams.map.state = 1			
+			let arr = this.tenant.resourceIds.split(",")
+			if(arr.length>0){
+				this.queryParams.model.deviceId = arr[0]
+			}
 
 			if(arrs.length > 0){			
-				this.queryParams.map.ids = 	arrs.map(item=>{return item.toolId}).join(',')	
+				this.queryParams.map.ids = arrs.map(item=>{return item.toolId}).join(',')	
 			}	
 									
 			programCenterApi.toolList(this.queryParams).then(res => {
@@ -288,6 +292,8 @@ export default {
 
 	  // 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
 	  beforeRemove(file, fileList) {
+		console.log(this.fileObj)
+		console.log(fileList[0])
 	    return this.$confirm(`确定移除 ${ file.name }?`);
 	  },
 
@@ -327,7 +333,7 @@ export default {
       return {
         id: '',
         resourceIds: '',
-        submittedFileName: '',
+        submittedFileName: '',		
         workTime: '',
         filePath: '',
         size: null,
@@ -383,8 +389,8 @@ export default {
 	  			submittedFileName: val.name,
 	  			filePath: val.url,
 	  			runTime: val.runTime,
-	  			// toolList: val.toolList,
-	  			// toolNums: val.toolList ? val.toolList.length : 0
+	  			//toolList: val.toolList,
+	  			//toolNums: val.toolList ? val.toolList.length : 0
     		};
     		// 如果附件存在 /
     		let pid = val.programId || val.id;
@@ -464,15 +470,15 @@ export default {
       	// 清空上传附件
       	this.fileList = []
     },
-    submitForm () {
+    submitForm () {  
 	  let idArr = new Array();
       this.$refs.form.validate((valid) => {
 		let bool = true;
 		let msg = ""
-		if(this.toolList.length ==0){
+		if(this.toolList.length ==0 && this.toolSelectList.length>0){
             bool = false
 			msg = "刀具设备不能为空"
-		}else {		
+		}else if(this.toolList.length>0) {		
 			this.toolList.forEach(item => {
               if(!item.toolId){				 
 				 bool = false
@@ -499,7 +505,7 @@ export default {
 
         if (valid) {
         	//添加数据
-        	this.tenant.toolList = this.toolList;
+        	this.tenant.toolList = this.toolList;			
         	let obj = {...this.tenant, ...this.fileObj};
         	// 添加【刀具管理】
         	if(obj.toolList && obj.toolList.length > 0){
@@ -575,18 +581,19 @@ export default {
 		  		// this.toolList = obj.toolList
 		  		// 附件数据
 		  		this.fileList = [{
-		  			name: obj.name,
-		  			url: obj.url
+		  			name: obj.submittedFileName,
+		  			url: obj.filePath
 		  		}]
 		  		// 附件-赋值
 		  		// this.fileObj = res.data;
 		  		// 需要回填的信息
 	  			//this.fileObj.nc = '1' // 表示已经上传
-	  			//this.fileObj.submittedFileName = obj.name
-	  			//this.fileObj.filePath  = obj.url
+	  			this.fileObj.submittedFileName = obj.submittedFileName
+	  			this.fileObj.filePath  = obj.filePath
+				this.fileObj.pgContent = obj.content
 	  			//this.fileObj.runTime = obj.runTime				
-	  			// this.fileObj.toolList = obj.toolList
-	  			// this.fileObj.toolNums = obj.toolList ? obj.toolList.length : 0
+	  			//this.fileObj.toolList = obj.toolList
+	  			//this.fileObj.toolNums = obj.toolList ? obj.toolList.length : 0
     		}
     	})
     }

+ 6 - 4
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/technologyMgr/index.vue

@@ -594,15 +594,16 @@ export default {
         this.validateMsg = "";
         return false;
       }
-      // console.log(obj);
+       
       obj.procedureList = obj.procedureList.map((ele) => {
         let obj = {};
         for (let property in ele) {
-          if (["xh", "index", "isadd", "isinput"].includes(property)) continue;
+          if (["xh", "index", "isadd", "isinput", "isdel"].includes(property)) continue;
           obj[property] = ele[property];
         }
         return obj;
       });
+      console.log(obj);
       technologyMgrApi.saveList(obj).then((res) => {
         res = res.data;
         if (res.isSuccess) {
@@ -747,9 +748,10 @@ export default {
         this.tableData.data.splice(row.index - 1, 1);
         this.getSpanArr(this.tableData.data);
         return;
-      }
+      }      
       for (let key in this.titleMap) {
-        if (key == "sort") continue;
+        //if (key == "sort") continue;
+        if(["sort","type","no"].includes(key)) continue;
         row[key] = "";
       }
     },

+ 6 - 5
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/trayForm/components/Edit.vue

@@ -91,7 +91,7 @@ import trayMgrApi from "@/api/prepareProductMgr/trayMgr";
 // 【分页】组件
 import Pagination from "@/components/Pagination";
 // 【工具原材料管理】-API
-import toolsMaterialApi from "@/api/prepareProductMgr/toolsMaterial";
+import frocklApi from "@/api/prepareProductMgr/frockMgr";
 // 【共通】函数
 import { initQueryParams, initDicts } from "@/utils/commons";
 export default {
@@ -299,6 +299,7 @@ export default {
       this.queryParams = initQueryParams({});
       // 清空列表选中的数据
       this.$refs.table.clearSelection();
+      this.fetch({})
     },
     submitForm() {
       if (!this.selection.length) {
@@ -404,7 +405,7 @@ export default {
     },
 
     // 夹具分页列表
-    fetch(params = {}) {
+    fetch(params = {}) {      
       this.loading = true;
       // 分页信息
       this.queryParams.current = params.current
@@ -412,11 +413,11 @@ export default {
         : this.queryParams.current;
       this.queryParams.size = params.size ? params.size : this.queryParams.size;
       // 搜索条件添加
-      this.queryParams.model.brand = this.brand;
+      //this.queryParams.model.brand = this.brand;
       // 分类,【原材料】固定,查询原材,分类就是:04
-      this.queryParams.model.category = this.category;
+      //this.queryParams.model.category = this.category;
 
-      toolsMaterialApi
+      frocklApi
         .page(this.queryParams)
         .then((response) => {
           const res = response.data;

+ 7 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/checkDetailCuttingTools.vue

@@ -20,7 +20,13 @@
       <!-- 刀具名称 -->
       <el-table-column prop="needCuttingTools" :label='$t("runCenter.table.checkCuttingTool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 检测结果 -->
-      <el-table-column prop="checkResult" :label='$t("runCenter.table.checkCuttingTool.checkResult")' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="checkResult" :label='$t("runCenter.table.checkCuttingTool.checkResult")' :show-overflow-tooltip="true" align="center">
+        <template slot-scope="{ row }">
+          <el-tag :type="row.checkResult=='通过' ? 'success' : 'danger'">
+          	{{ row.checkResult}}
+          </el-tag> 
+        </template>
+      </el-table-column>
       <!-- 操作 -->
       <el-table-column
         :label="$t('table.operation')"