Browse Source

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

曹鹤洋 1 year ago
parent
commit
8579515772

+ 18 - 2
src/view/performance/chejianbaogong.vue

@@ -2299,7 +2299,10 @@ const FacilityWorklist = async () => {
 		}
 	})
 	selectData.value=[]
-    console.log(formData.value.工单编号)
+	if(formData.value.工单编号 === undefined){
+		 return false;
+	}
+	console.log(formData.value.工单编号)
     const res = await facilityProcedure({ Gd_gdbh: formData.value.工单编号 })
   	console.log(res)
 	if (res.code === 0) {
@@ -2449,11 +2452,18 @@ const bzonRightClick = async (row) => {
     cancelButtonText: '取消',
     type: 'warning'
   }).then(() => {
+	  console.log(1121111)
     SetMachineTeams(roww.value)
   })
 }
 //数据接口调用
 const SetMachineTeams = async(row) => {
+	 console.log(formData.value.工单编号)
+	 	 console.log(row)
+		  console.log(55555555)
+		  
+		  
+		  
   const res = await setMachineTeam({
     machine: JTMC.split("#")[0],
     order: formData.value.工单编号,
@@ -4535,6 +4545,12 @@ const selectBz = async() => {
       }
       formData.value.class=classbz.value.join(',')
     }
+	
+// 		console.log(formData)
+// console.log(formData)
+// console.log(formData)
+	
+	
 		const response = await setMachineTeam({
 			machine: JTMC.split("#")[0],
 			order:formData.value.工单编号,
@@ -4663,12 +4679,12 @@ const yjonRightClick = async(row) => {
     cancelButtonText: '取消',
     type: 'warning'
   }).then(() => {
+	    location.reload();
     setMachineTeams(rowws.value)
   })
 }
 
 const setMachineTeams = async(row) => {
-	console.log(row)
     const res = await setMachineTeam({
 			machine: JTMC.split("#")[0],
 			order:row['工单编号|质量信息'].split('|')[0],

+ 51 - 17
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -165,12 +165,13 @@
           <div v-if="JTMCOn" class="gva-table-box" >
             <div class="gva-btn-list">
             </div>
-            <el-tabs v-model="activName" type="card" @tab-click="handleClick">
+            <el-tabs v-model="activName" type="card" @tab-click="duohandleClick">
 
                         <el-tab-pane label="设备作业清单"  @click="showTable('印件资料')"  name="first"  :class="{ 'active-tab': activeTab === 'first' }" >
                           <el-table ref="multipleTable"
                                     :show-overflow-tooltip="true"
-                                    highlight-current-row="true"
+                                    highlight-current-row="true"
+									:cell-class-name="sbzyqdsatusCellClass"
                                     :row-style="{ height: '20px' }"
                                     :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                                     :header-cell-style="{ padding: '0px' }"
@@ -2070,9 +2071,6 @@ const handleNodeClick = (nodeData,node) => {
 		showbutton.value=false
 		FacilityProduction()
 		FacilityWorklist()
-		// FacilityTeam(JTMC)
-		// console.log('123')
-		// console.log(JTMC)
 		DelType.value = false
 		AddType.value = false
       } else if (nodeData.level === 3) {
@@ -2090,9 +2088,6 @@ const handleNodeClick = (nodeData,node) => {
 		  FacilitychanLiang()
 		  DelType.value = true
 		  AddType.value = true
-		  // FacilityTeam(JTMC)
-		  // InspectionRecord()
-		  // FacilityDetail()
           console.log(node.label); // 第三级节点
 	   }
 }
@@ -2403,15 +2398,15 @@ let CJMC=ref()
 const FacilityWorklist = async () => {
   const response = await facilityWorklist({machine:JTMC});
   if (response.code === 0) {
-	console.log(response)
+	// console.log(response)
 	sbzyData.splice(0, sbzyData.length, ...response.data);
 	const res = await facilityProcedure({ Gd_gdbh: sbzyData[0]['工单编号|质量信息'].substring(0, 7) })
 	formData.value.productCode= response.data[0]['产品代号']
-	console.log(res)
+	// console.log(res)
 	if (res.code === 0) {
 	    selectData.value = res.data
 	}
-	console.log('22222222')
+	// console.log('33333')
 	FacilityTeam(JTMC)
   }
 }
@@ -3308,7 +3303,8 @@ const FacilityTeam = async (value) => {
   const response = await facilityTeam({ machine: value });
   if (response.code === 0) {
 	// formData.value.班组 = response.data[0]['班组号'];
-	BZMC.value=response.data[0]['班组号']
+	BZMC.value=response.data[0]['班组号']
+	
 	// if(response.data[0][2]){
 	// 	// console.log(response.data[0][2].split(' '));
 	// 	for (let i = 1; i <= 3; i++) {
@@ -3351,17 +3347,18 @@ const FacilityTeam = async (value) => {
 	// }
 
 	InspectionRecord()
-	FacilityDetail()
+	FacilityDetail()
+	
     // 清空 bzData 数组
     bzData.splice(0, bzData.length);
-
+	FPData.splice(0, FPData.length);
     // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
     const updatedData = response.data.map(item => {
       return { ...item, JTMC: value }; // 添加 JTMC 属性
     });
 
     // 将更新后的数据添加到 bzData 数组
-    bzData.push(...updatedData);
+    bzData.push(...updatedData)
 	FPData.push(...updatedData)
 	return 1
   }
@@ -3650,7 +3647,9 @@ const selectBz = async() => {
       FacilityProduction()
     }
 		// currentBz.value={}
-	}
+	}
+	
+	detailShow.value = false;
 }
 const delBz = async() => {
 
@@ -5200,7 +5199,38 @@ const enterDialog = async () => {
                 getTableData()
               }
       })
-}
+}
+
+//点击label获取表格数据
+function duohandleClick(table) {
+  console.log(table.props.label)
+  console.log(JTMC)
+  if(table.props.label === '设备作业清单'){
+	  FacilityWorklist();
+  }
+  if(table.props.label === '班组人员及分配比例'){
+  	 FacilityTeam(JTMC)
+  }
+  // if(table.props.label=='当班产量明细'){
+	 //  FacilityDetail()
+	 //  zdtreeType.value=true
+  // }else{
+	 //  zdtreeType.value=false
+  // }
+  if(table.props.label === '检验记录'){
+  	  InspectionRecord()
+  }
+}
+
+
+
+//设备作业清单 正在生产中 背景颜色
+const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (row.status === 1) {
+    return 'status-plan-usage-low';
+  }
+}
+
 
 </script>
 
@@ -5260,6 +5290,10 @@ const enterDialog = async () => {
 /*!* 选中某行时的背景色*/
 :deep(.el-table__body tr.current-row)>td {
   background: #ff80ff !important;
+}
+/* 设备作业清单 正在生产中 背景颜色 */
+:deep(.status-plan-usage-low ) {
+  background: yellow !important;
 }
   ::v-deep  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
     color: white;        /* 文字颜色 */