liuhairui 1 year ago
parent
commit
f08acd439a

+ 5 - 3
src/view/performance/06-packingDocuments/index.vue

@@ -1575,12 +1575,14 @@ const ent1 = (event,index,row,title) => {
         // 设置当前行默认值
         // 设置当前行默认值
         // detailData.table[index].sczl_dedh = "030002002"; // 设置默认 dedh 值
         // detailData.table[index].sczl_dedh = "030002002"; // 设置默认 dedh 值
         // detailData.table[index].sczl_计产系数 = "1.000"; // 设置默认 计产系数 值
         // detailData.table[index].sczl_计产系数 = "1.000"; // 设置默认 计产系数 值
-		detailData.table[index].sczl_dedh = ""; // 设置默认 dedh 值
-		detailData.table[index].sczl_计产系数 = ""; // 设置默认 计产系数 值
+		// detailData.table[index].sczl_dedh = ""; // 设置默认 dedh 值
+		// detailData.table[index].sczl_计产系数 = ""; // 设置默认 计产系数 值
   
   
         return; // 当前工单为空时,跳到下一行后停止后续逻辑
         return; // 当前工单为空时,跳到下一行后停止后续逻辑
       }
       }
-  
+	  // 设置当前行默认值
+	  detailData.table[index].sczl_dedh = "030002002"; // 设置默认 dedh 值
+	  detailData.table[index].sczl_计产系数 = "1.000"; // 设置默认 计产系数 值
       // 如果当前工单编号不为空,调用处理函数
       // 如果当前工单编号不为空,调用处理函数
       getTableGxMc(event, index, row);
       getTableGxMc(event, index, row);
     }
     }

+ 121 - 93
src/view/performance/chejianbaogong.vue

@@ -5020,73 +5020,93 @@ const BZhandle = (val) => {
 
 
 
 
 
 
-
+/*
+	组员及分配比例规则算法
+*/
 const fpsum = ref();
 const fpsum = ref();
-const fpsum2 = ref();
-//自动计算分配系数总和统计
+//自动计算分配系数和
 function updateTotal() {
 function updateTotal() {
+	//机台班组维护中分配系数字段
   const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7'];  
   const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7'];  
   const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || 0); 
   const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || 0); 
   fpsum.value = values.reduce((sum, value) => sum + value, 0); 
   fpsum.value = values.reduce((sum, value) => sum + value, 0); 
 }
 }
 
 
-/*
-	新增说明
-	判断SY、PM:不能大于1、其他必须等于1(除特殊组员),每个都必须在0-1之间
-*/
-//机台班组维护新增按钮
+//机台班组维护新增
 const addBz = async() => {
 const addBz = async() => {
-  updateTotal()
-  const jt = selectedOption.value.split('|')[0]//获取车间数据
-	//判断车间分配比例【SY、PM】	
-	const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
-	const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
-  	const values = relevantKeys.reduce((acc, key) => {
-    const value = parseFloat(formDatas.value[key], 10);
-    if (!isNaN(value)) {
-      acc.push(value); // 只有当 value 不是 NaN 时才添加到数组中
+  //数据初始化
+  	updateTotal()
+  	//判断机台和班组是否为空
+  	if(!selectedOption.value || !BZMC.value){
+  		ElMessage({
+  		  type: 'warning',
+  		  message: '机台或者班组编号不能为空'
+  		})
+  		return;
+  	}
+  	const jt = selectedOption.value.split('|')[0]//获取车间数据
+  	//判断车间是否是【SY、PM】	
+  	const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
+  	console.log(fpsum.value)
+  	const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
+  	let hasValidMember = false; // 标志变量,用于检查是否有有效的组员
+  
+  	// 循环检查每个成员
+  	for (let i = 1; i <= relevantKeys.length; i++) {
+  	const codeKey = `code${i}`;
+  	const nameKey = `name${i}`;
+  	const percentageKey = `percentage${i}`;
+  	const percentageValue = parseFloat(formDatas.value[percentageKey], 10); //获取分配系数的值
+  	//编号为空时清空名称和分配系数
+  	(function(index) {
+      watch(
+        () => formDatas.value[codeKey],
+        (newVal, oldVal) => {
+          if (!newVal) {
+  			formDatas.value[nameKey] = '';
+  			formDatas.value[percentageKey] = '';
+          }
+        }
+      );
+    })(i); // 使用立即执行的函数表达式(IIFE)来捕获当前的i值
+   
+    if (formDatas.value[codeKey] || formDatas.value[nameKey]) {
+      console.log('有组员');
+      if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
+  		ElMessage({
+  			type: "error",
+  			message: "没有填写有效的组员或分配系数有误",
+  		});
+  	  return;
+      } else {
+        hasValidMember = true; // 如果有有效的百分比值,则设置标志变量为true
+      }
     }
     }
-    return acc;
-  }, []); // 初始化为空数组
- 
-  console.log("数值", values);
- 
-  const hasInvalidValue = values.some(value => value <= 0 || value > 1);
-  console.log(hasInvalidValue);
- 
-  if (hasInvalidValue) {
+  }
+   
+  // 循环结束后检查标志变量
+  if (!hasValidMember) {
+    // 如果没有有效的组员(即所有百分比值都无效或为空),则显示错误消息
     ElMessage({
     ElMessage({
       type: "error",
       type: "error",
-      message: "某人分配系数有误",
+      message: "没有填写有效的组员或分配系数有误",
     });
     });
     return;
     return;
-  }
-	if (fpsum.value > 1) {
-		ElMessage({
-		type: "error",
-		message: "分配系数相加不能大于1",
-	});
-		return;
-	}
-
-	// 只有当 shouldCheckLessThanOne 为 true 时才检查 fpsum.value < 1
-	if (shouldCheckLessThanOne && fpsum.value < 1) {
-		ElMessage({
-		type: "error",
-		message: "分配系数相加不能小于1",
-		});
-		return;
-	}
-  // console.log(selectedOption.value)
-  console.log("机台编号"+selectedOption.value.split('|')[0])
-  console.log("班组编号"+BZMC.value)
-  console.log(formDatas.value.code1)
-  if(formDatas.value.code1 === '' || formDatas.value.code1 === null){
-	  ElMessage({
-	    type: 'warning',
-	    message: '组员为空请添加组员'
-	  })
-  }else{
+  }else if (shouldCheckLessThanOne && fpsum.value < 1) {//如果有组员,并且 shouldCheckLessThanOne 为 true(不是PM和SY机器),则检查 fpsum.value < 1
+  		ElMessage({
+  		type: "error",
+  		message: "分配系数相加不能小于1",
+  		});
+  		return;
+  	}else if(fpsum.value > 1) { //所有机器的分配系数之和不能大于1
+  		ElMessage({
+  		type: "error",
+  		message: "分配系数相加不能大于1",
+  	});
+  		return;
+  	}
+	
+	
 	  // 班组维护->班组添加【接口】
 	  // 班组维护->班组添加【接口】
 	  const response = await MachineTeamAdd({
 	  const response = await MachineTeamAdd({
 	    sczl_jtbh:  selectedOption.value.split('|')[0],
 	    sczl_jtbh:  selectedOption.value.split('|')[0],
@@ -5121,49 +5141,57 @@ const addBz = async() => {
 }
 }
 //机台班组维护更新当前班组
 //机台班组维护更新当前班组
 const selectBz = async() => {
 const selectBz = async() => {
-	updateTotal()
-	const jt = selectedOption.value.split('|')[0]//获取车间数据
-	//判断车间分配比例【SY、PM、WY】	
-	const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
-	const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
-  	const values = relevantKeys.reduce((acc, key) => {
-    const value = parseFloat(formDatas.value[key], 10);
-    if (!isNaN(value)) {
-      acc.push(value); // 只有当 value 不是 NaN 时才添加到数组中
-    }
-    return acc;
-  }, []); // 初始化为空数组
- 
-  console.log("数值", values);
- 
-  const hasInvalidValue = values.some(value => value <= 0 || value > 1);
-  console.log(hasInvalidValue);
- 
-  if (hasInvalidValue) {
-    ElMessage({
-      type: "error",
-      message: "某人分配系数有误",
-    });
-    return;
-  }
-	if (fpsum.value > 1) {
+	initfordata3()
+		updateTotal()
+		if(!selectedOption.value || !BZMC.value){
 		ElMessage({
 		ElMessage({
-		type: "error",
-		message: "分配系数相加不能大于1",
-	});
+			type: 'warning',
+			message: '机台或者班组不能为空'
+		})
 		return;
 		return;
 	}
 	}
-
-	// 只有当 shouldCheckLessThanOne 为 true 时才检查 fpsum.value < 1
-	if (shouldCheckLessThanOne && fpsum.value < 1) {
-		ElMessage({
-		type: "error",
-		message: "分配系数相加不能小于1",
+		const jt = selectedOption.value.split('|')[0]//获取车间数据
+		//判断车间分配比例【SY、PM】	
+		const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
+		const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
+	  	const values = relevantKeys.reduce((acc, key) => {
+	    const value = parseFloat(formDatas.value[key], 10);
+	    if (!isNaN(value)) {
+	      acc.push(value); // 只有当 value 不是 NaN 时才添加到数组中
+	    }
+	    return acc;
+	  }, []); // 初始化为空数组
+	 
+	  console.log("数值", values);
+	 
+	  const hasInvalidValue = values.some(value => value <= 0 || value > 1);
+	  console.log(hasInvalidValue);
+	 
+	  if (hasInvalidValue) {
+	    ElMessage({
+	      type: "error",
+	      message: "某人分配系数有误",
+	    });
+	    return;
+	  }
+		if (fpsum.value > 1) {
+			ElMessage({
+			type: "error",
+			message: "分配系数相加不能大于1",
 		});
 		});
-		return;
-	}
-  // console.log(currentBz.value)
-  // return false;
+			return;
+		}
+	
+		// 只有当 shouldCheckLessThanOne 为 true 时才检查 fpsum.value < 1
+		if (shouldCheckLessThanOne && fpsum.value < 1) {
+			ElMessage({
+			type: "error",
+			message: "分配系数相加不能小于1",
+			});
+			return;
+		}
+		
+		
 	if(currentBz.value){
 	if(currentBz.value){
 		BZMC.value = currentBz.value.班组号
 		BZMC.value = currentBz.value.班组号
 		let sczl_bhkey=''
 		let sczl_bhkey=''

+ 82 - 34
src/view/quality/orderstatus.vue

@@ -4,7 +4,7 @@
 	<div 
 	<div 
 	  style="
 	  style="
 	    width: 60%; 
 	    width: 60%; 
-	    height: 450px; 
+	    height: 470px; 
 	    position: fixed; 
 	    position: fixed; 
 	    left: 25%; 
 	    left: 25%; 
 	    padding: 20px; 
 	    padding: 20px; 
@@ -16,12 +16,13 @@
 	    <hr>
 	    <hr>
 	    <p style="font-size: 14px; color: red; margin: 10px 0;">搜索栏目为空,则从最近2周完工的工单中选择</p>
 	    <p style="font-size: 14px; color: red; margin: 10px 0;">搜索栏目为空,则从最近2周完工的工单中选择</p>
 	    <p style="font-size: 14px; color: red; margin: 10px 0;">否则,以栏目值为关键字,从工单编号、产品名称、客户名称中选择</p>
 	    <p style="font-size: 14px; color: red; margin: 10px 0;">否则,以栏目值为关键字,从工单编号、产品名称、客户名称中选择</p>
+		<p style="font-size: 18px; color: red; margin: 10px 0;">在列表中进行双击打开查看流程单查询</p>
 	    <hr>
 	    <hr>
 	    
 	    
 	    <!-- 输入框和按钮 -->
 	    <!-- 输入框和按钮 -->
 	    <div style="display: flex; align-items: center; margin-top: 10px;">
 	    <div style="display: flex; align-items: center; margin-top: 10px;">
-	      <el-input v-model="searchInfo" placeholder="搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="flex: 1; margin-right: 10px;"></el-input>
-	      <el-button type="primary" title="搜索" icon="el-icon-search"  @click="onSubmit" >刷新</el-button>
+	      <el-input v-model="searchInfo" placeholder="Enter回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="flex: 1; margin-right: 10px;"></el-input>
+	      <el-button type="primary" title="搜索" icon="el-icon-search"  @click="onSubmit" >搜索</el-button>
 	    </div>
 	    </div>
 	    
 	    
 	    <!-- 表格展示区域 -->
 	    <!-- 表格展示区域 -->
@@ -29,9 +30,8 @@
 	      <el-table 
 	      <el-table 
 	        ref="multipleTable"
 	        ref="multipleTable"
 	        style="width: 100%; height: 30vh; verflow: auto;" 
 	        style="width: 100%; height: 30vh; verflow: auto;" 
-			:row-style="{ height: '0px' }"
-			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
-			:header-cell-style="{ padding: '0px' }"
+			:row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
+			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 	        :data="tableData" 
 	        :data="tableData" 
 	        :border="true" 
 	        :border="true" 
 	        :tooltip-effect="'dark'"
 	        :tooltip-effect="'dark'"
@@ -41,9 +41,9 @@
 	        @row-dblclick="updateCompanyFunc"
 	        @row-dblclick="updateCompanyFunc"
 	        @selection-change="handleSelectionChange">
 	        @selection-change="handleSelectionChange">
 			
 			
-			<el-table-column align="left"  label="工单编号" 	  width="100"	prop="Gd_gdbh" />
+			<el-table-column align="left"  label="工单编号" 	  width="115"	prop="Gd_gdbh" />
 			<el-table-column align="left"  label="行号" 	  width="60"	prop="行号" />
 			<el-table-column align="left"  label="行号" 	  width="60"	prop="行号" />
-			<el-table-column align="left"  label="工序名称" 	  width="560"	prop="Gd_cpmc"  />
+			<el-table-column align="left"  label="工序名称" 	 	prop="Gd_cpmc"  />
 			
 			
 	        <!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
 	        <!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
 			
 			
@@ -68,7 +68,7 @@
 	      <!-- 左右布局 -->
 	      <!-- 左右布局 -->
 	      <layout style="height: calc(100% - 50px); display: flex;">
 	      <layout style="height: calc(100% - 50px); display: flex;">
 	        <!-- 左侧树形区域 -->
 	        <!-- 左侧树形区域 -->
-	        <layout-sider style="width: 170px; margin-right: 10px; overflow: hidden;height: 730px;">
+	        <layout-sider style="width: 140px; margin-right: 10px; overflow: hidden;height: 730px;">
 	          <div class="JKWTree-tree" style="height: 100%; max-height: 100vh; overflow-y: auto;">
 	          <div class="JKWTree-tree" style="height: 100%; max-height: 100vh; overflow-y: auto;">
 	            <h3></h3>
 	            <h3></h3>
 	            <el-tree
 	            <el-tree
@@ -313,35 +313,83 @@ const ontuicclick = async () => {
 
 
 </script>
 </script>
 
 
+
 <style scoped>
 <style scoped>
-.JKWTree-container {
-  display: flex;
-}
-/* 选中某行时的背景色*/
-:deep(.el-table__body tr.current-row>td) {
-  background: #ff80ff !important;
-}
+	:deep(.plan-usage-low div) {
+		color: red !important;
+	}
 
 
-.JKWTree-tree {
-  width: 300px;
-  background-color: #fff;
-  padding: 10px;
-  margin-right: 20px;
-}
+	.JKWTree-container {
+		display: flex;
+	}
 
 
-.JKWTree-tree h3 {
-  font-size: 15px;
-  font-weight: 700;
-  margin: 10px 0;
-}
+	.JKWTree-tree {
+		width: 100%;
+		background-color: #fff;
+		/*background-color: rgba(241, 224, 224, 0.99);*/
+		padding: 10px;
+		margin-right: 20px;
+	}
 
 
-.JKWTree-content {
-  flex: 1;
-}
+	.JKWTree-tree h3 {
+		font-size: 15px;
+		font-weight: 700;
+		margin: 10px 0;
+	}
+
+	.JKWTree-content {
+		flex: 1;
+	}
+
+
+	:deep(.el-table__body .warning-row) {
+		background: #FFFF80 !important;
+	}
+
+	/* 选中某行时的背景色 */
+	:deep(.el-table__body tr.current-row)>td {
+		background: #ff80ff !important;
+	}
+
+	:deep(.el-table .bg-yellow) {
+		background: yellow;
+	}
 </style>
 </style>
 <style scoped>
 <style scoped>
-/* tree组件背景高亮 */
-:deep(.el-tree-node:focus > .el-tree-node__content){
-	background: #ff80ff !important;
-}
+	:deep(.el-table td .cell) {
+		line-height: 25px !important;
+	}
+
+	:deep(.el-tabs__header) {
+		margin-bottom: 0;
+	}
+	
+
+	.search {
+		margin-left: 0px !important;
+		margin-right: 10px !important;
+	}
+
+	.bt {
+		margin-left: 2px !important;
+		padding: 3px !important;
+		font-size: 12px;
+
+	}
+
+	.el-tabs__header {
+		margin: 0px !important;
+	}
+
+	.gva-table-box {
+		padding: 0px !important;
+	}
+
+	.mab {
+		margin-bottom: 5px;
+	}
+	/* tree组件背景高亮 */
+	:deep(.el-tree-node:focus > .el-tree-node__content){
+			background: #ff80ff !important;
+		}
 </style>
 </style>

+ 32 - 32
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -356,22 +356,22 @@
                 <el-table-column type="selection" width="30" />
                 <el-table-column type="selection" width="30" />
                 <template v-for="item in [
                 <template v-for="item in [
                   { align:'left', title: '工单编号', prop: '工单编号', width: 110  , sortable: 'sortable',fixed:'fixed',},
                   { align:'left', title: '工单编号', prop: '工单编号', width: 110  , sortable: 'sortable',fixed:'fixed',},
-                  { align:'left', title: '销售订单号', prop: '销售订单号', width: 200  , sortable: 'sortable', },
+                  { align:'left', title: '销售订单号', prop: '销售订单号', width: 140},
                   { align:'left', title: '印件名称', prop: '印件名称', width: 320  , sortable: 'sortable', },
                   { align:'left', title: '印件名称', prop: '印件名称', width: 320  , sortable: 'sortable', },
-                  { align:'left', title: '印件工序及名称', prop: '印件工序及名称', width: 200  , sortable: 'sortable', },
-                  { align:'left', title: '工序产量', prop: '计划接货数', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '已完成产量', prop: '已完成产量', width: 120  , sortable: 'sortable', },
+                  { align:'left', title: '印件工序及名称', prop: '印件工序及名称', width: 180},
+                  { align:'left', title: '工序产量', prop: '计划接货数', width: 90},
+                  { align:'left', title: '已完成产量', prop: '已完成产量', width: 100},
                   { align:'left', title: '产品名称', prop: '产品名称', width: 320  , sortable: 'sortable', },
                   { align:'left', title: '产品名称', prop: '产品名称', width: 320  , sortable: 'sortable', },
-                  { align:'left', title: '订单数量', prop: '订单数量', width: 120  , sortable: 'sortable', },
-                  { align:'left', title: '计量单位', prop: '计量单位', width: 120  , sortable: 'sortable', },
+                  { align:'left', title: '订单数量', prop: '订单数量', width: 100},
+                  { align:'left', title: '计量单位', prop: '计量单位', width: 85},
                   { align:'left', title: '交货日期', prop: '交货日期', width: 115  , sortable: 'sortable', },
                   { align:'left', title: '交货日期', prop: '交货日期', width: 115  , sortable: 'sortable', },
-                  { align:'left', title: '产品代号', prop: '产品代号', width: 140  , sortable: 'sortable', },
-                  { align:'left', title: '工序名称', prop: '工序名称', width: 120  , sortable: 'sortable', },
-                  { align:'left', title: '机组', prop: '机组', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '设备编号', prop: '设备编号', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: 'GYUID', prop: 'GYUID', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '印件号', prop: 'yjno', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '工序号', prop: 'gxh', width: 110  , sortable: 'sortable', },
+                  { align:'left', title: '产品代号', prop: '产品代号', width: 110},
+                  { align:'left', title: '工序名称', prop: '工序名称', width: 120},
+                  { align:'left', title: '机组', prop: '机组', width: 85},
+                  { align:'left', title: '设备编号', prop: '设备编号', width: 85},
+                  { align:'left', title: 'GYUID', prop: 'GYUID', width: 110},
+                  { align:'left', title: '印件号', prop: 'yjno', width: 70},
+                  { align:'left', title: '工序号', prop: 'gxh', width: 70 },
               ]">
               ]">
                   <el-table-column :align="item.align" :label="item.title"  :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
                   <el-table-column :align="item.align" :label="item.title"  :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
                 </template>
                 </template>
@@ -385,32 +385,32 @@
                 <el-table-column type="selection" width="30" />
                 <el-table-column type="selection" width="30" />
                 <template v-for="item in [
                 <template v-for="item in [
                   { align:'left', title: '工单编号', prop: '工单编号', width: 110  , sortable: 'sortable',fixed:'fixed',},
                   { align:'left', title: '工单编号', prop: '工单编号', width: 110  , sortable: 'sortable',fixed:'fixed',},
-                  { align:'left', title: '销售订单号', prop: '销售订单号', width: 200  , sortable: 'sortable', },
+                  { align:'left', title: '销售订单号', prop: '销售订单号', width: 140},
                   { align:'left', title: '计划开工时间', prop: '计划开工时间', width: 160  , sortable: 'sortable', },
                   { align:'left', title: '计划开工时间', prop: '计划开工时间', width: 160  , sortable: 'sortable', },
                   { align:'left', title: '印件名称', prop: '印件名称', width: 320  , sortable: 'sortable', },
                   { align:'left', title: '印件名称', prop: '印件名称', width: 320  , sortable: 'sortable', },
-                  { align:'left', title: '印件工序及名称', prop: '印件工序及名称', width: 200  , sortable: 'sortable', },
-                  { align:'left', title: '工序产量', prop: '计划接货数', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '已完成产量', prop: '已完成产量', width: 120  , sortable: 'sortable', },
-                  { align:'left', title: '小时产能', prop: '小时产能', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '产能系数', prop: '产能系数', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '生产工时', prop: '生产工时', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '辅助工时', prop: '辅助工时', width: 110  , sortable: 'sortable', },
+                  { align:'left', title: '印件工序及名称', prop: '印件工序及名称', width: 180},
+                  { align:'left', title: '工序产量', prop: '计划接货数', width: 85  },
+                  { align:'left', title: '已完成产量', prop: '已完成产量', width: 95 },
+                  { align:'left', title: '小时产能', prop: '小时产能', width: 85},
+                  { align:'left', title: '产能系数', prop: '产能系数', width: 85},
+                  { align:'left', title: '生产工时', prop: '生产工时', width: 85},
+                  { align:'left', title: '辅助工时', prop: '辅助工时', width: 85},
                   { align:'left', title: '最早开工时间', prop: '最早开工时间', width: 160  , sortable: 'sortable', },
                   { align:'left', title: '最早开工时间', prop: '最早开工时间', width: 160  , sortable: 'sortable', },
                   { align:'left', title: '计划完工时间', prop: '计划完工时间', width: 160  , sortable: 'sortable', },
                   { align:'left', title: '计划完工时间', prop: '计划完工时间', width: 160  , sortable: 'sortable', },
-                  { align:'left', title: '班次安排', prop: '班次安排', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '排单备注', prop: '排单备注', width: 120  , sortable: 'sortable', },
+                  { align:'left', title: '班次安排', prop: '班次安排', width: 85},
+                  { align:'left', title: '排单备注', prop: '排单备注', width: 85},
                   { align:'left', title: '产品名称', prop: '产品名称', width: 180  , sortable: 'sortable', },
                   { align:'left', title: '产品名称', prop: '产品名称', width: 180  , sortable: 'sortable', },
-                  { align:'left', title: '订单数量', prop: '订单数量', width: 120  , sortable: 'sortable', },
-                  { align:'left', title: '计量单位', prop: '计量单位', width: 120  , sortable: 'sortable', },
+                  { align:'left', title: '订单数量', prop: '订单数量', width: 100},
+                  { align:'left', title: '计量单位', prop: '计量单位', width: 85},
                   { align:'left', title: '交货日期', prop: '交货日期', width: 115  , sortable: 'sortable', },
                   { align:'left', title: '交货日期', prop: '交货日期', width: 115  , sortable: 'sortable', },
                   { align:'left', title: '优先次序', prop: '优先次序', width: 110  , sortable: 'sortable', },
                   { align:'left', title: '优先次序', prop: '优先次序', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '产品代号', prop: '产品代号', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '工序名称', prop: '工序名称', width: 120  , sortable: 'sortable', },
-                  { align:'left', title: '设备编号', prop: '设备编号', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '车间名称', prop: '车间名称', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: 'GYUID', prop: 'GYUID', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '印件号', prop: 'yjno', width: 110  , sortable: 'sortable', },
-                  { align:'left', title: '工序号', prop: 'gxh', width: 110  , sortable: 'sortable', },
+                  { align:'left', title: '产品代号', prop: '产品代号', width: 110},
+                  { align:'left', title: '工序名称', prop: '工序名称', width: 120},
+                  { align:'left', title: '设备编号', prop: '设备编号', width: 85},
+                  { align:'left', title: '车间名称', prop: '车间名称', width: 100},
+                  { align:'left', title: 'GYUID', prop: 'GYUID', width: 110},
+                  { align:'left', title: '印件号', prop: 'yjno', width: 70},
+                  { align:'left', title: '工序号', prop: 'gxh', width: 70 },
               ]">
               ]">
                   <el-table-column :align="item.align" :label="item.title" :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
                   <el-table-column :align="item.align" :label="item.title" :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
                 </template>
                 </template>

+ 33 - 25
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -81,6 +81,8 @@
 
 
 		<div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
 		<div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
 		 <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
 		 <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
+		 :row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
+		 :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 		   border style="width:100%;height: 30vh;" @row-dblclick="handleSelectClick" >
 		   border style="width:100%;height: 30vh;" @row-dblclick="handleSelectClick" >
 		   <el-table-column prop="process" label="印件及工序" width="340" />
 		   <el-table-column prop="process" label="印件及工序" width="340" />
 		   <el-table-column prop="completed" label="已完成板数" width="150" />
 		   <el-table-column prop="completed" label="已完成板数" width="150" />
@@ -105,14 +107,14 @@
             <!--                <el-table-column type="selection" width="55" />-->
             <!--                <el-table-column type="selection" width="55" />-->
                             <!-- <el-table-column align="left" label="选择" prop="bh"  width="80"/> -->
                             <!-- <el-table-column align="left" label="选择" prop="bh"  width="80"/> -->
                             <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="170" />
                             <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="170" />
-							<el-table-column align="left" sortable label="印件资料" prop="印件资料" width="240" />
+							<el-table-column align="left"  label="印件资料" prop="印件资料" width="220" />
                             <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110" />
                             <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110" />
-                            <el-table-column align="left" sortable label="计划产量/已完成" prop="计划产量/已完成" width="160"/>
-                            <el-table-column align="left" sortable label="装版时数" prop="装版时数" width="110"/>
-                            <el-table-column align="left" sortable label="工序产能" prop="工序产能" width="110"/>
-                            <el-table-column align="left" sortable label="计划工时" prop="计划工时" width="110"/>
+                            <el-table-column align="left"  label="计划产量/已完成" prop="计划产量/已完成" width="130"/>
+                            <el-table-column align="left"  label="装版时数" prop="装版时数" width="85"/>
+                            <el-table-column align="left"  label="工序产能" prop="工序产能" width="85"/>
+                            <el-table-column align="left"  label="计划工时" prop="计划工时" width="85"/>
                             <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
                             <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
-                            <el-table-column align="left" sortable label="排产备注" prop="排产备注" width="110" />
+                            <el-table-column align="left"  label="排产备注" prop="排产备注" width="85" />
                             <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="400" />
                             <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="400" />
                           </el-table>
                           </el-table>
                         </el-tab-pane>
                         </el-tab-pane>
@@ -130,17 +132,17 @@
                                     @row-click="clickybupdate">
                                     @row-click="clickybupdate">
             <!--                <el-table-column type="selection" width="55" />-->
             <!--                <el-table-column type="selection" width="55" />-->
                             <!-- <el-table-column align="left" label="选择" prop="方案"  width="70"/> -->
                             <!-- <el-table-column align="left" label="选择" prop="方案"  width="70"/> -->
-                            <el-table-column align="left" sortable label="班组号" prop="班组号" width="100" />
-                            <el-table-column align="left" sortable label="组员1" prop="0" width="200" />
-                            <el-table-column align="left" sortable label="组员2" prop="1" width="200" />
-                            <el-table-column align="left" sortable label="组员3" prop="2" width="200" />
-                            <el-table-column align="left" sortable label="组员4" prop="3" width="200" />
-                            <el-table-column align="left" sortable label="组员5" prop="4" width="200" />
-                            <el-table-column align="left" sortable label="组员6" prop="5" width="200" />
-                            <el-table-column align="left" sortable label="组员7" prop="6" width="200" />
-                            <el-table-column align="left" sortable label="组员8" prop="7" width="200" />
-                            <el-table-column align="left" sortable label="组员9" prop="8" width="200" />
-                            <el-table-column align="left" sortable label="组员10" prop="9_正品版" width="200" />
+                            <el-table-column align="left" sortable label="班组号" prop="班组号" width="95" />
+                            <el-table-column align="left"  label="组员1" prop="0" width="180" />
+                            <el-table-column align="left"  label="组员2" prop="1" width="180" />
+                            <el-table-column align="left"  label="组员3" prop="2" width="180" />
+                            <el-table-column align="left"  label="组员4" prop="3" width="180" />
+                            <el-table-column align="left"  label="组员5" prop="4" width="180" />
+                            <el-table-column align="left"  label="组员6" prop="5" width="180" />
+                            <el-table-column align="left"  label="组员7" prop="6" width="180" />
+                            <el-table-column align="left"  label="组员8" prop="7" width="180" />
+                            <el-table-column align="left"  label="组员9" prop="8" width="180" />
+                            <el-table-column align="left"  label="组员10" prop="9_正品版" width="180" />
                           </el-table>
                           </el-table>
                         </el-tab-pane>
                         </el-tab-pane>
 
 
@@ -185,10 +187,10 @@
                                   highlight-current-row="true"
                                   highlight-current-row="true"
                                   style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
                                   style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
             <!--              <el-table-column type="selection" width="55" />-->
             <!--              <el-table-column type="selection" width="55" />-->
-                          <el-table-column align="left" sortable label="工单编号" prop="工单编号"  width="110"/>
-                          <el-table-column align="left" sortable label="印件号" prop="印件号" width="100" />
-                          <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110" />
-                          <el-table-column align="left" sortable label="检验项目" prop="检验项目" width="110"/>
+                          <el-table-column align="left" sortable label="工单编号" prop="工单编号"  width="105"/>
+                          <el-table-column align="left"  label="印件号" prop="印件号" width="70" />
+                          <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="130" />
+                          <el-table-column align="left"  label="检验项目" prop="检验项目" width="160"/>
                           <el-table-column  v-for="time in columnNames" :key="time"  :label="time" :prop="time" align="center" width="80"  ></el-table-column>
                           <el-table-column  v-for="time in columnNames" :key="time"  :label="time" :prop="time" align="center" width="80"  ></el-table-column>
                         </el-table>
                         </el-table>
                         </el-tab-pane>
                         </el-tab-pane>
@@ -211,7 +213,7 @@
           			  <el-table-column align="left" label="班组" prop="班组号" width="60"/>
           			  <el-table-column align="left" label="班组" prop="班组号" width="60"/>
           			  <el-table-column align="left" label="组员1" prop="0" width="195"/>
           			  <el-table-column align="left" label="组员1" prop="0" width="195"/>
           			  <el-table-column align="left" label="组员2" prop="1" width="195"/>
           			  <el-table-column align="left" label="组员2" prop="1" width="195"/>
-          					  <el-table-column align="left" label="组员3" prop="2" width="195"/>
+					  <el-table-column align="left" label="组员3" prop="2" width="195"/>
           			  <el-table-column align="left" label="组员4" prop="3" width="195"/>
           			  <el-table-column align="left" label="组员4" prop="3" width="195"/>
           			  <el-table-column align="left" label="组员5" prop="4" width="195"/>
           			  <el-table-column align="left" label="组员5" prop="4" width="195"/>
           			  <el-table-column align="left" label="组员6" prop="5" width="100"/>
           			  <el-table-column align="left" label="组员6" prop="5" width="100"/>
@@ -4757,19 +4759,25 @@ const JPblplanUsageCellClassedit = ({row, column, rowIndex, columnIndex}) =>{
   }
   }
 }
 }
 
 
+/*
+	组员及分配比例规则算法
+*/
 const fpsum = ref();
 const fpsum = ref();
 const fpsum2 = ref();
 const fpsum2 = ref();
 //自动计算分配系数和
 //自动计算分配系数和
 function updateTotal() {
 function updateTotal() {
-  // 直接指定要累加的属性名  
+  //机台班组维护中分配系数字段
   const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7',];  
   const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7',];  
-  const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || ""); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || ""); 
   fpsum.value = values.reduce((sum, value) => sum + value, 0);
   fpsum.value = values.reduce((sum, value) => sum + value, 0);
+  
+  //修改中分配系数字段
   const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];  
   const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];  
-  const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) || ""); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) || ""); 
   fpsum2.value = valuess.reduce((sum, value) => sum + value, 0);  
   fpsum2.value = valuess.reduce((sum, value) => sum + value, 0);  
 }
 }
 
 
+//机台班组维护新增
 const addBz = async() => {
 const addBz = async() => {
 	//数据初始化
 	//数据初始化
 	updateTotal()
 	updateTotal()