浏览代码

前端页面展现功能

oyq28 2 年之前
父节点
当前提交
951befd2a7

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

@@ -257,7 +257,8 @@ export default {
 				name: '托板名称',
         materialType: '物料类型',
         factory: '生产分厂/制造商',
-
+        productionType: '产品分类',
+		fiveAxis: '是否五轴',
         period: '周期',
         num: '最大使用数量',
         expiryDate: '有效期',

+ 8 - 3
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -320,9 +320,14 @@ export default {
   watch: {
     'taskData': {
         handler(val, oldVal) {
-          // 加载列表数据
-          window.location.reload()
-        }
+          // 加载列表数据           
+          //console.log(val[0])
+          //console.log(oldVal[0])   
+          if(oldVal.length>0 && val.length>0 && val[0].id!=oldVal[0].id){            
+            window.location.reload()            
+          }                
+        },
+        deep: true
       }
   },
   computed: {

+ 13 - 13
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -215,6 +215,7 @@ export default {
 		  return false
 	    }
 		//this.$confirm('确认?')		
+		let that = this
 		this.$confirm(
         '确定上料已完成并且舱门已关闭?',
         this.$t("common.tips"),
@@ -225,38 +226,37 @@ export default {
           type: "warning",
         }).then(() => {
 			//上料处理
-			this.addMaterial()
+			this.addMaterial(that)
 		}).catch(()=>{})
   	},
-	addMaterial(){
-		let that = this
-        taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,"meterialId":this.tenant.meterialId, "uniqueCode":this.uniqueCode, "taskNodeId": this.tenant.taskNodeId, "updateType" : "end", "processType" : "1", "updateUser" : this.$store.state.account.user.id, "positionIndex": this.currentIndex}).then((res) => {
+	addMaterial(that){		
+        taskMgrApi.updateTaskStatus({ "id" : that.tenant.id,"meterialId":that.tenant.meterialId, "uniqueCode":that.uniqueCode, "taskNodeId": that.tenant.taskNodeId, "updateType" : "end", "processType" : "1", "updateUser" : that.$store.state.account.user.id, "positionIndex": that.currentIndex}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
 			  //写入RFID
-			  this.RFIDParams.taskId = this.tenant.id
-			  this.RFIDParams.taskNodeId = this.tenant.taskNodeId
-			  this.RFIDParams.data.positionIndex = this.currentIndex
+			  that.RFIDParams.taskId = that.tenant.id
+			  that.RFIDParams.taskNodeId = that.tenant.taskNodeId
+			  that.RFIDParams.data.positionIndex = that.currentIndex
 			  //写入空值
-              machiningClientApi.write(this.RFIDParams).then(res2 => {				 
+              machiningClientApi.write(that.RFIDParams).then(res2 => {				 
 				 if(res2.data.result){
 					console.log("空值写入成功")	
 				 }
 			  });
-			  this.RFIDParams.data.content = that.uniqueCode
+			  that.RFIDParams.data.content = that.uniqueCode
 			  //写入新值
-			  machiningClientApi.write(this.RFIDParams).then(res2 => {
+			  machiningClientApi.write(that.RFIDParams).then(res2 => {
 				if(res2.data.result){
 				    console.log("rfid写入成功")		
 				}
 			  });
               // 通知列表
-              this.$emit("success");
+              that.$emit("success");
               // 通知列表-并关闭弹出框
-              this.$emit("close");
+              that.$emit("close");
           }
       }).finally(()=>{
-		  this.confirmDisabled = false
+		  that.confirmDisabled = false
 	  });
 	},
   	// table的当前行值变化后

+ 15 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/trayMgr/Index.vue

@@ -77,7 +77,15 @@
       <el-table-column prop="no" :label='$t("prepare.table.tray.no")' :show-overflow-tooltip="true" width="160px"></el-table-column>
       <el-table-column prop="name" :label='$t("prepare.table.tray.name")' :show-overflow-tooltip="true" width="120px"></el-table-column>
       <el-table-column prop="materialType" :label='$t("prepare.table.tray.materialType")' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <el-table-column prop="factory" :label='$t("prepare.table.tray.factory")' :show-overflow-tooltip="true" width="200px"></el-table-column>
+	  <el-table-column prop="productionType.data" :label='$t("prepare.table.tray.productionType")' :show-overflow-tooltip="true" width="120px"></el-table-column>
+	  <el-table-column prop="fiveAxis" :label='$t("prepare.table.tray.fiveAxis")' :show-overflow-tooltip="true" width="100px">
+		<template slot-scope="{ row }">
+          <el-tag :type="row.fiveAxis== 1 ? 'success' : 'danger'">
+          	{{ row.fiveAxis==1 ? $t("common.yes") : $t("common.no") }}
+          </el-tag>
+        </template>
+	  </el-table-column> 
+	  <el-table-column prop="factory" :label='$t("prepare.table.tray.factory")' :show-overflow-tooltip="true" width="200px"></el-table-column>
       <el-table-column prop="joinDate" :label='$t("prepare.table.tray.joinDate")' :show-overflow-tooltip="true" width="150px"></el-table-column>
       <el-table-column prop="expiryDate" :label="$t('prepare.table.tray.expiryDate')+' (月)'" align="center" :show-overflow-tooltip="true" width="100px"></el-table-column>
       <el-table-column prop="num" :label='$t("prepare.table.tray.num")' e:show-overflow-tooltip="tru" width="140px"></el-table-column>
@@ -188,6 +196,9 @@
 	      },
 	      brand: {
 	      	key: ''
+	      },
+		  productionType: {
+	      	key: ''
 	      },
 	      preview: {
 	        isVisible: false,
@@ -202,6 +213,7 @@
 	        total: 0
 	      },
 	      dicts: {
+		  BUSINESS_PRODUCT_TYPE: {},	
           METERIAL_BRAND: {}  //工具材料品牌
         },
 	      enums: {
@@ -215,7 +227,7 @@
 	  	// 调用常量-审核状态
 	  	this.audioStatus = this.$constWKS.STATUSORTHERLIST
 	  	// 加载【字典】
-	  	initDicts(['METERIAL_BRAND'], this.dicts);
+	  	initDicts(['BUSINESS_PRODUCT_TYPE'], this.dicts)		  
 	  	// 加载列表数据
 	  	this.fetch()
 		},
@@ -228,7 +240,7 @@
       },
 	    metcatgList() {
         return convertEnum(this.dicts.METERIAL_CATEGORY)
-      }
+      }	 
 	  },
 	  mounted () {
 

+ 19 - 4
imcs-ui/src/views/zuihou/prepareProductMgr/trayMgr/components/Edit.vue

@@ -37,6 +37,11 @@
       <el-form-item :label='$t("prepare.table.tray.materialType")+":"' prop="materialType">
         <el-input v-model="tenant.materialType" :placeholder='$t("common.pleaseEnter")'/>
       </el-form-item>
+      <el-form-item :label="$t('prepare.table.tray.productionType')" prop="productionType">
+        <el-select style="width:100%"  :placeholder="$t('prepare.table.tray.productionType')" v-model="tenant.productionType.key" value>
+          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.BUSINESS_PRODUCT_TYPE" />
+        </el-select>
+      </el-form-item>
 <!--      &lt;!&ndash;品牌&ndash;&gt;-->
 <!--    	<el-form-item :label='$t("prepare.table.tray.brand")+":"' prop="brand">-->
 <!--      	<el-select style="width:100%" :placeholder='$t("common.pleaseSelect")' v-model="tenant.brand.key" value>-->
@@ -44,6 +49,12 @@
 <!--        </el-select>-->
 <!--      </el-form-item>-->
       <!--生产分厂/制造商-->
+      <el-form-item :label='$t("prepare.table.tray.fiveAxis")+":"' prop="fiveAxis">
+        <template>
+				  <el-radio v-model="tenant.fiveAxis" :label="0">{{$t("common.no")}}</el-radio>
+				  <el-radio v-model="tenant.fiveAxis" :label="1">{{$t("common.yes")}}</el-radio>
+				</template>
+      </el-form-item>
       <el-form-item :label='$t("prepare.table.tray.factory")+":"' prop="factory">
         <el-input v-model="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
       </el-form-item>
@@ -83,6 +94,8 @@
 import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
 //【所属产线】-API
 import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
+import { initDicts } from '@/utils/commons'
+import {convertEnum} from "@/utils/utils"
 export default {
   name: 'TenantEdit',
   props: {
@@ -107,6 +120,7 @@ export default {
       width: this.initWidth(),
       confirmDisabled: false,
       dicts: {
+        BUSINESS_PRODUCT_TYPE: {},
 	      METERIAL_BRAND: {} //工具材料品牌
 	    },
       roles: [],
@@ -167,7 +181,7 @@ export default {
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
     // 加载列表数据
-    this.getZoneList();
+    this.getZoneList()    
   },
   computed: {
     isVisible: {
@@ -178,7 +192,7 @@ export default {
         this.close()
         this.reset()
       }
-    }
+    }   
   },
   mounted () {
     window.onresize = () => {
@@ -257,9 +271,10 @@ export default {
         category: {
           key: ''
         },
-        brand: {
+        productionType: {
           key: ''
         },
+        fiveAxis: 0,
         status: '1',
         num: '1'
       }
@@ -276,7 +291,7 @@ export default {
     },
     setTenant (val, dicts) {
     	if(val){
-    		this.tenant = { ...val }
+    		this.tenant = { ...val }        
     		// 根据id,查询规格列表数据
     		this.getSpecsList(val)
     	}