zck 9 luni în urmă
părinte
comite
bff14bca01

+ 55 - 16
src/view/managements/hardversionlibrary.vue

@@ -60,9 +60,15 @@
   
               <!-- 分页 -->
               <div class="gva-pagination">
-                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
-                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-              </div>
+                  <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="page"
+                    :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total">
+                  </el-pagination>
+                </div>
             </div>
 
 
@@ -88,10 +94,10 @@
               </el-table>
   
               <!-- 分页 -->
-              <div class="gva-pagination">
+              <!-- <div class="gva-pagination">
                 <el-pagination layout="total" :current-page="page" :page-size="pageSize"
                  :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-              </div>
+              </div> -->
             </div>
 
 
@@ -120,20 +126,19 @@
               </el-table>
   
               <!-- 分页 -->
-              <div class="gva-pagination">
+              <!-- <div class="gva-pagination">
                 <el-pagination layout="total" :current-page="page" :page-size="pageSize"
                  :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-              </div>
+              </div> -->
             </div>
 
 
             <!-- 设备折旧参数维护弹出框 -->
             <el-dialog
-            v-model="dialogPlateVisible"
-            :before-close="dhlcloseDialog"
-            :title="type === 'create' ? '产品印版资料新增' : '电化铝领用记录修改'"
-            destroy-on-close
-            style="width: 40%; margin: 20vh auto;"
+              v-model="dialogPlateVisible"
+              :title="type === 'create' ? '产品印版资料新增' : '产品印版资料修改'"
+              :width="'40%'"  
+              :style="{ minWidth: '700px' }"
             >
             <el-form :model="Plate" label-width="120px">
                 <!-- 第一行:部门 -->
@@ -295,6 +300,38 @@
   const userStore = useUserStore()
   const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
   defineOptions({name: 'Company'})
+
+ // 分页
+ const page = ref(1)
+const total = ref(0)
+const pageSize = ref(50)
+const handleCurrentChange = (val) => {
+  page.value = val;
+  _WorkList_page();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+  // page.value = 10;
+  pageSize.value = val;
+  _WorkList_page();
+};
+
+const _WorkList_page =  async () =>{
+  console.log(searchInfo.value)
+  if (searchInfo.value === ''){
+    // showKH.value = node.code === '客户产品印版库'?true:false;
+      const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value})
+      total.value = res.data.total
+      wltableData.value = res.data.data
+  }else{
+    // showKH.value = node.code === '客户产品印版库'?true:false; 
+    const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
+    total.value = res.data.total
+    wltableData.value = res.data.data
+  }
+}
+  
 // =========== 获取左侧树形结构 ===========
 const treeData = ref([])
 
@@ -378,17 +415,19 @@ getTreeData()
     if(!node.children){
       nodecode.value = node.label.split(' ')[0]
       showKH.value = !node.code?true:false;
-      const res = await getPPList({code:node.label.split(' ')[0]})
-      wltableData.value = res.data
+      const res = await getPPList({code:node.label.split(' ')[0],page:page.value,limit:pageSize.value})
+      total.value = res.data.total
+      wltableData.value = res.data.data
     }
   }
 
   const searchInfo = ref('')
   const on_search = async () => {
     try{
-      const res = await getPPList({code:nodecode.value,search:searchInfo.value})
+      const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
       if (res.code === 0) {
-        wltableData.value = res.data 
+        total.value = res.data.total
+        wltableData.value = res.data.data
       }
     }catch(error){
       ElMessage.error('搜索失败')

+ 141 - 84
src/view/performance/chejianbaogong.vue

@@ -1120,6 +1120,17 @@
 					width="80"
 				  />
 				</el-table>
+				<!-- 分页 -->
+			<div class="gva-pagination">
+				<el-pagination
+					@size-change="ybhandleSizeChange"
+					@current-change="ybhandleCurrentChange"
+					:current-page="ybpage"
+					:page-size="ybpageSize"
+					layout="total, sizes, prev, pager, next, jumper"
+					:total="ybtotal">
+				</el-pagination>
+			</div>
 			  </div>
 			</div>
 		  </el-dialog>
@@ -3263,10 +3274,10 @@ const warningres = (arr) => {
 	  const nameKey = `name${i}`;
   
 	  // 如果 code 有值,且对应的 name 没有值,则清空 code 的值
-	  if (formDatas.value[codeKey] !== '' && formDatas.value[nameKey] === '') {
-		formDatas.value[codeKey] = ''; // 清空 code 的值
-		console.log(`清空了 ${codeKey} 的值,因为 ${nameKey} 为空`);
-	  }
+	//   if (formDatas.value[codeKey] !== '' && formDatas.value[nameKey] === '') {
+	// 	formDatas.value[codeKey] = ''; // 清空 code 的值
+	// 	console.log(`清空了 ${codeKey} 的值,因为 ${nameKey} 为空`);
+	//   }
 	}
   
 	let nextIndex = 1;
@@ -3276,7 +3287,7 @@ const warningres = (arr) => {
 	  formDatas.value[`name${nextIndex}`] !== ''
 	) {
 	  nextIndex++;
-	  if (nextIndex > 4) { // 这里只处理4个输入框的情况
+	  if (nextIndex > 8) { // 这里只处理4个输入框的情况
 		// 如果所有字段都已经填满,则不做任何事情并退出函数
 		return;
 	  }
@@ -3672,12 +3683,13 @@ const warningres = (arr) => {
 	try {
 	  formData.value.code=value
 	  // 调用接口获取巡检项目数据
-	  const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
+	  const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode,page:ybpage.value,limit:ybpageSize.value });
 	  console.log("机台印版领用")
 	  // 检查接口返回的状态码
 	  if (response.code === 0) {
 	   console.log(response)
-		 yinbanselectData.value=response.data
+	     ybtotal.value = response.data.total
+		 yinbanselectData.value=response.data.data
 	  }
 	} catch (error) {
 	  // 捕获并打印异常
@@ -3685,6 +3697,8 @@ const warningres = (arr) => {
 	  return null;
 	}
   };
+
+  const yinbancode = ref('')
   const yinbanNodeClick = (node, check, nodeData) => {
 	if (node.children && node.children.length > 0) {
 	  // 点击的是父节点,且有子节点
@@ -3694,9 +3708,27 @@ const warningres = (arr) => {
 	  // 点击的是子节点,或者没有子节点
 	  // 执行相应的子节点单击事件处理逻辑
 		yinbanselectData.value=[]
+		yinbancode.value = node.code
 	  facilityPrintDetailItem(node.code)
 	}
   };
+
+  // 印版分页
+const ybpage = ref(1)
+const ybtotal = ref(0)
+const ybpageSize = ref(50)
+const ybhandleCurrentChange = (val) => {
+  ybpage.value = val;
+  facilityPrintDetailItem(yinbancode.value);
+};
+
+// 修改页面容量 点击多少条/页
+const ybhandleSizeChange = (val) => {
+  // page.value = 10;
+  ybpageSize.value = val;
+  facilityPrintDetailItem(yinbancode.value);
+};
+
   const onyinban = async() => {
 	  console.log(formData.value)
 	  if(formData.value.产品代号==''){
@@ -3757,6 +3789,7 @@ const warningres = (arr) => {
 		if(response.code===0){
 		  facilityPrintDetailItem(formData.value.code)
 		  successres('成功!')
+		  facilityPrintDetailItem(yinbancode.value);
 		}
 	}
   
@@ -3812,6 +3845,7 @@ const Plate = ref({ 印数: '' });
     
     if (res.code === 0) {
       ElMessage.success('收回成功')
+	  facilityPrintDetailItem(yinbancode.value);
       rawcloseDialog()
       // 清空选中
       yinbanSelection.value = []
@@ -5572,83 +5606,106 @@ onMounted(() => {
 
   //机台班组维护新增
   const addBz = async() => {
-	//数据初始化
-		updateTotal()
-		//判断机台和班组是否为空
-		if(!selectedOption.value || !BZMC.value){
-			warningres('机台或者班组编号不能为空')
-			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); //获取分配系数的值
-
-	  if (formDatas.value[codeKey] || formDatas.value[nameKey]) {
-		console.log('有组员');
-		if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
-			errorres('没有填写有效的组员或分配系数有误')
-		  return;
-		} else {
-		  hasValidMember = true; // 如果有有效的百分比值,则设置标志变量为true
-		}
-	  }
-	}
-	 
-	// 循环结束后检查标志变量
-	if (!hasValidMember) {
-	  // 如果没有有效的组员(即所有百分比值都无效或为空),则显示错误消息
-		errorres('没有填写有效的组员或分配系数有误')
-	  return;
-	}else if (shouldCheckLessThanOne && fpsum.value < 1) {//如果有组员,并且 shouldCheckLessThanOne 为 true(不是PM和SY机器),则检查 fpsum.value < 1
-		errorres('分配系数相加不能小于1')
-			return;
-		}else if(fpsum.value > 1) { //所有机器的分配系数之和不能大于1
-		errorres('分配系数相加不能大于1')
-		return;
-	}
-	  
-	  
-		// 班组维护->班组添加【接口】
-		const response = await MachineTeamAdd({
-		  sczl_jtbh:  selectedOption.value.split('|')[0],
-		  sczl_bzdh:  BZMC.value,
-		  sczl_bh1:   formDatas.value.code1,
-		  sczl_bh2:   formDatas.value.code2,
-		  sczl_bh3:   formDatas.value.code3,
-		  sczl_bh4:   formDatas.value.code4,
-		  sczl_bh5:   formDatas.value.code5,
-		  sczl_bh6:   formDatas.value.code6,
-		  sczl_bh7:   formDatas.value.code7,
-		  sczl_bh8:   formDatas.value.code10,
-		  sczl_bh9:   formDatas.value.code9,
-		  sczl_bh10:  formDatas.value.code8,
-		  sczl_rate1: formDatas.value.percentage1,
-		  sczl_rate2: formDatas.value.percentage2,
-		  sczl_rate3: formDatas.value.percentage3,
-		  sczl_rate4: formDatas.value.percentage4,
-		  sczl_rate5: formDatas.value.percentage5,
-		  sczl_rate6: formDatas.value.percentage6,
-		  sczl_rate7: formDatas.value.percentage7,
-		  sczl_rate8: formDatas.value.percentage10,
-		  sczl_rate9: formDatas.value.percentage9,
-		  sczl_rate10: formDatas.value.percentage8,
-		  sys_id: '【'+MAC.value+'/'+JTMC+'】'
-		})
-		if (response.code === 0) {
-		  FacilityProduction()
-		  successres('添加成功')
-		}
-  }
+    //数据初始化
+    updateTotal()
+    //判断机台和班组是否为空
+    if(!selectedOption.value || !BZMC.value){
+        warningres('机台或者班组编号不能为空')
+        return;
+    }
+    const jt = selectedOption.value.split('|')[0]//获取车间数据
+    //判断车间是否是【SY、PM】    
+    const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
+    let hasValidMember = false; // 标志变量,用于检查是否有有效的组员
+    let hasEmptyBefore = false; // 标记是否已经出现过空项
+    
+    // 定义字段顺序 [1,2,3,4,5,6,7,10,9,8]
+    const fieldOrder = [1,2,3,4,5,6,7,8,9,10];
+    
+    for (let i = 0; i < fieldOrder.length; i++) {
+        const index = fieldOrder[i];
+        const codeKey = `code${index}`;
+        const nameKey = `name${index}`;
+        const percentageKey = `percentage${index}`;
+        
+        const hasCode = formDatas.value[codeKey] && formDatas.value[codeKey].trim() !== '';
+        const hasName = formDatas.value[nameKey] && formDatas.value[nameKey].trim() !== '';
+        const hasPercentage = formDatas.value[percentageKey] !== undefined && 
+                            formDatas.value[percentageKey] !== null && 
+                            formDatas.value[percentageKey] !== '';
+        
+        // 如果当前项为空,标记hasEmptyBefore为true
+        if (!hasCode && !hasName && !hasPercentage) {
+            hasEmptyBefore = true;
+            continue; // 跳过空项的进一步检查
+        }
+        
+        // 如果当前项有值,但前面已经有空项了,报错
+        if (hasEmptyBefore) {
+            errorres(`请按顺序填写组员信息,第${index}项之前不能有空项`);
+            return;
+        }
+        
+        // 检查是否有code或name但没有percentage
+        if ((hasCode || hasName) && !hasPercentage) {
+            errorres(`第${index}项的工号/姓名和分配系数必须同时填写`);
+            return;
+        }
+        
+        // 检查percentage是否有效
+        const percentageValue = parseFloat(formDatas.value[percentageKey]);
+        if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
+            errorres(`第${index}项分配系数必须在0到1之间`);
+            return;
+        }
+        
+        hasValidMember = true;
+    }
+    
+    // 循环结束后检查标志变量
+    if (!hasValidMember) {
+        errorres('至少需要填写一个有效的组员和分配系数');
+        return;
+    } else if (shouldCheckLessThanOne && fpsum.value < 1) {
+        errorres('分配系数相加不能小于1');
+        return;
+    } else if(fpsum.value > 1) { 
+        errorres('分配系数相加不能大于1');
+        return;
+    }
+    
+    // 班组维护->班组添加【接口】
+    const response = await MachineTeamAdd({
+        sczl_jtbh: selectedOption.value.split('|')[0],
+        sczl_bzdh: BZMC.value,
+        sczl_bh1: formDatas.value.code1,
+        sczl_bh2: formDatas.value.code2,
+        sczl_bh3: formDatas.value.code3,
+        sczl_bh4: formDatas.value.code4,
+        sczl_bh5: formDatas.value.code5,
+        sczl_bh6: formDatas.value.code6,
+        sczl_bh7: formDatas.value.code7,
+        sczl_bh8: formDatas.value.code10,
+        sczl_bh9: formDatas.value.code9,
+        sczl_bh10: formDatas.value.code8,
+        sczl_rate1: formDatas.value.percentage1,
+        sczl_rate2: formDatas.value.percentage2,
+        sczl_rate3: formDatas.value.percentage3,
+        sczl_rate4: formDatas.value.percentage4,
+        sczl_rate5: formDatas.value.percentage5,
+        sczl_rate6: formDatas.value.percentage6,
+        sczl_rate7: formDatas.value.percentage7,
+        sczl_rate8: formDatas.value.percentage10,
+        sczl_rate9: formDatas.value.percentage9,
+        sczl_rate10: formDatas.value.percentage8,
+        sys_id: '【'+MAC.value+'/'+JTMC+'】'
+    })
+    
+    if (response.code === 0) {
+        FacilityProduction()
+        successres('添加成功')
+    }
+}
   //机台班组维护更新当前班组
   const selectBz = async() => {
 		  updateTotal()

+ 41 - 20
src/view/yunyin/shengchanguanli/PrintingPlateRequisition.vue

@@ -60,23 +60,23 @@
                <el-table-column   align="center" label="创建时间" prop="创建时间"  width="110" />
                <el-table-column   align="center" label="修改时间" prop="修改时间"  width="110" />
               </el-table>
-                            <!-- 分页 -->
-                            <div class="gva-pagination">
-                <el-pagination
+              <!-- 分页 -->
+                <div class="gva-pagination">
+                  <el-pagination
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange"
                     :current-page="page"
-                    :page-sizes="[10, 30, 50, 100]"
+                    :page-size="pageSize"
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total">
-                </el-pagination>
-              </div>
+                  </el-pagination>
+                </div>
             </div>
 
 
             <div class="gva-table-box">
               <!-- 表格数据 -->
-              <el-table ref="multipleTable" style="width: 100%;height: 45vh" tooltip-effect="dark"
+              <el-table ref="multipleTable" style="width: 100%;height: 38vh" tooltip-effect="dark"
                         :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                         :data="wlmxtableData"  border row-key="ID"
@@ -106,7 +106,8 @@
     :before-close="dhlcloseDialog"
     :title="'印版工单发放'"
     destroy-on-close
-    style="width: 40%; margin: 30vh auto;"
+    :width="'40%'"  
+    :style="{ minWidth: '700px' }"
   >
     <el-form :model="Plate" label-width="120px">
       <el-row :gutter="20">
@@ -159,7 +160,8 @@
   <el-dialog
     v-model="dialogwithdrawVisible"
     title="印版印数"
-    style="width: 20%; margin: 30vh auto;"
+    :width="'20%'"  
+    :style="{ minWidth: '200px' }"
   >
     <el-form-item label="印数">
       <el-input v-model="Plate.印数" placeholder="请输入印数" />
@@ -237,7 +239,7 @@
   import dayjs, { Dayjs } from 'dayjs';
   import { exportExcelFile } from '@/utils/excel'
   import { useUserStore } from '@/pinia/modules/user'
-  import {ElMessage,ElMessageBox} from "element-plus";
+  import {autocompleteEmits, ElMessage,ElMessageBox} from "element-plus";
   import {getOrderInfo,} from '@/api/mes_api_gty/workOrderVerification'
   import Gxclhc from '@/view/performance/12-orderAccounting/componets/gxclhc.vue'
   import {getPPTab,getPPList,getMachine,getPPgdReceive,getPPCode,getPPReceive,getPPDelete} from "@/api/mes/job.js"
@@ -267,14 +269,15 @@ const handleSizeChange = (val) => {
 const _WorkList_page =  async () =>{
   console.log(searchInfo.value)
   if (searchInfo.value === ''){
-    showKH.value = node.code === '客户产品印版库'?true:false;
+    // showKH.value = node.code === '客户产品印版库'?true:false;
       const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value})
-      total.value = res.total
-      wltableData.value = res.data
+      total.value = res.data.total
+      wltableData.value = res.data.data
   }else{
+    // showKH.value = node.code === '客户产品印版库'?true:false; 
     const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
-    total.value = res.total
-    wltableData.value = res.data
+    total.value = res.data.total
+    wltableData.value = res.data.data
   }
 }
 
@@ -329,8 +332,9 @@ const transformData = (data) => {
       nodecode.value = node.label.split(' ')[0]
       showKH.value = node.code === '客户产品印版库'?true:false;
       const res = await getPPList({code:node.label.split(' ')[0],page:page.value,limit:pageSize.value})
-      total.value = res.total
-      wltableData.value = res.data
+      console.log(res.data)
+      total.value = res.data.total
+      wltableData.value = res.data.data
     }
   }
 
@@ -338,8 +342,8 @@ const transformData = (data) => {
   const on_search = async () => {
     const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
     if (res.code === 0) {
-      total.value = res.total
-      wltableData.value = res.data 
+      total.value = res.data.total
+      wltableData.value = res.data.data 
     }else{
       ElMessage.error('未搜索到数据') 
     }
@@ -363,6 +367,21 @@ const transformData = (data) => {
   }
 }
 
+  //刷新表格数据
+  const data_refresh = async () =>{
+    try {
+    console.log(clickedRow.value)
+    const res = await getPPReceive({ code: clickedRow.value.存货编码,batch:clickedRow.value.供方批号})
+    if (res.code === 0) {
+      wlmxtableData.value = res.data 
+    }else{
+      wlmxtableData.value = []
+    }
+  } catch (error) {
+    ElMessage.error('获取数据失败')
+  }
+  }
+
   
     //新增
     const Plate = reactive({})
@@ -411,6 +430,7 @@ const rawenterDialog = async () => {
     
     if (res.code === 0) {
       ElMessage.success('收回成功')
+      data_refresh()
       rawcloseDialog()
       // 清空选中
       selectedIds.value = []
@@ -535,6 +555,7 @@ const dhlenterDialog = () => {
       ElMessage.success('领出成功')
       dialogPlateVisible.value = false
       dhlcloseDialog()
+      data_refresh()
       on_search()
     }else{
       ElMessage.error(res.msg)
@@ -548,7 +569,6 @@ const dhlenterDialog = () => {
 const selectedIds = ref('')
 // 下方表格选择变化
 const wlmxSelectionChange = (selection) => {
-  console.log('维修表格选择变化:', selection)
   selectedIds.value = selection.map(item => item.UniqID).join(',')
   console.log('选中的ID:', selectedIds.value)
 }
@@ -572,6 +592,7 @@ const on_delete = async () => {
     
     if (res.code === 0) {
       ElMessage.success('删除成功')
+      data_refresh()
       // 删除成功后刷新表格数据
       // 清空选中
       selectedIds.value = []

+ 1 - 1
src/view/yunyin/shengchanguanli/chengpinrucang.vue

@@ -682,7 +682,7 @@ const detailData = reactive([
 ])
 const total = ref(0)
 const page = ref(1)
-const limit = ref(10)
+const limit = ref(999)
 const searchInfo = ref('')
 const tableRef = ref(null); // 表格的引用
 const params = {

+ 161 - 95
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -696,6 +696,7 @@
 		  title="机台印版领用"
 		  destroy-on-close
 		  width="1300px"
+		  @close="handleyinbanDialogClose"
 		  style="height: 75%;"
 		>
 		<div style="margin-top:-12px">
@@ -816,13 +817,24 @@
 				/>
 
 		      </el-table>
+			<!-- 分页 -->
+			<div class="gva-pagination">
+				<el-pagination
+					@size-change="ybhandleSizeChange"
+					@current-change="ybhandleCurrentChange"
+					:current-page="ybpage"
+					:page-size="ybpageSize"
+					layout="total, sizes, prev, pager, next, jumper"
+					:total="ybtotal">
+				</el-pagination>
+			</div>
 		    </div>
 		  </div>
 		</el-dialog>
 	<!-- 退回弹窗 -->
 		<el-dialog
 				v-model="dialogwithdrawVisible"
-				title="印版印数"
+				title="印版印数(次数)"
 				style="width: 20%; margin: 30vh auto;"
 				>
 				<el-form-item label="印数">
@@ -5254,6 +5266,11 @@ const onyinban = async() => {
 		yinbanVisible.value = true;
 	}
 }
+
+
+const handleyinbanDialogClose = () =>{
+	yinbanselectData.value = []
+}
 const onxuncha = async() => {
 	xunchaVisible.value=true
 }
@@ -5286,10 +5303,11 @@ const FacilityInspectionItem = async (value) => {
 const facilityPrintDetailItem = async (value) => {
   try {
     // 调用接口获取巡检项目数据
-	const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
+	const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode,page:ybpage.value,limit:ybpageSize.value });
     // 检查接口返回的状态码
     if (response.code === 0) {
-	 yinbanselectData.value=response.data
+	ybtotal.value = response.data.total
+	 yinbanselectData.value=response.data.data
     }
   } catch (error) {
     // 捕获并打印异常
@@ -5353,6 +5371,8 @@ const onout = async () => {
     
 	if (response?.code === 0) {  
 		ElMessage.success("领出成功!");
+		facilityPrintDetailItem(yinbancode.value);
+
 	} else {
 		ElMessage.error(`领出失败: ${response?.msg || "未知错误"}`);  
 	}
@@ -5397,6 +5417,7 @@ const rawenterDialog = async () => {
     
     if (res.code === 0) {
       ElMessage.success('收回成功')
+	  facilityPrintDetailItem(yinbancode.value);
       rawcloseDialog()
       // 清空选中
       currentSelection.value = []
@@ -5412,7 +5433,8 @@ const rawenterDialog = async () => {
 }
 
 const rawcloseDialog = () => {
-  Plate.印数 = ''
+  Plate.value.印数 = ''
+  console.log(Plate)
   dialogwithdrawVisible.value = false
 }
 
@@ -5443,6 +5465,7 @@ const yinbaninvertSelection = () => {
 const dianjianselectData = reactive([])
 const yinbanselectData = ref([])
 const xunchaselectData = ref([])
+const yinbancode = ref('')
 const dianjianNodeClick = (node, check, nodeData) => {
   if (node.children && node.children.length > 0) {
     // 点击的是父节点,且有子节点
@@ -5454,9 +5477,27 @@ const yinbanNodeClick = (node, check, nodeData) => {
   if (node.children && node.children.length > 0) {
     // 点击的是父节点,且有子节点
   } else {
+	yinbancode.value = node.code
      facilityPrintDetailItem(node.code)
   }
 };
+// 印版分页
+const ybpage = ref(1)
+const ybtotal = ref(0)
+const ybpageSize = ref(50)
+const ybhandleCurrentChange = (val) => {
+  ybpage.value = val;
+  facilityPrintDetailItem(yinbancode.value);
+};
+
+// 修改页面容量 点击多少条/页
+const ybhandleSizeChange = (val) => {
+  // page.value = 10;
+  ybpageSize.value = val;
+  facilityPrintDetailItem(yinbancode.value);
+};
+
+
 const xunchaNodeClick = (node, check, nodeData) => {
 	if(node){
 		fieldInspectionRecord()
@@ -6162,99 +6203,124 @@ onMounted(() => {
 
 //机台班组维护新增
 const addBz = async() => {
-	//数据初始化
-	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');
-	const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
-	let hasValidMember = false; // 标志变量,用于检查是否有有效的组员
-	console.log(fpsum.value)
-
-	// 循环检查每个成员
-	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); //获取分配系数的值
- 
-  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
+    //数据初始化
+    updateTotal()
+    //判断机台和班组是否为空
+    if(!selectedOption.value || !BZMC.value){
+        ElMessage({
+          type: 'warning',
+          message: '机台或者班组编号不能为空'
+        })
+        return;
     }
-  }
-}
- 
-// 循环结束后检查标志变量
-if (!hasValidMember) {
-  // 如果没有有效的组员(即所有百分比值都无效或为空),则显示错误消息
-  ElMessage({
-    type: "error",
-    message: "没有填写有效的组员或分配系数有误",
-  });
-  return;
-}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({
-    sczl_jtbh:  selectedOption.value.split('|')[0],
-    sczl_bzdh:  BZMC.value,
-    sczl_bh1:   formDatas.value.code1,
-    sczl_bh2:   formDatas.value.code2,
-    sczl_bh3:   formDatas.value.code3,
-    sczl_bh4:   formDatas.value.code4,
-    sczl_bh5:   formDatas.value.code5,
-    sczl_bh6:   formDatas.value.code6,
-    sczl_bh7:   formDatas.value.code7,
-    sczl_bh8:   formDatas.value.code10,
-    sczl_bh9:   formDatas.value.code9,
-    sczl_bh10:   formDatas.value.code8,
-    sczl_rate1: formDatas.value.percentage1,
-    sczl_rate2: formDatas.value.percentage2,
-    sczl_rate3: formDatas.value.percentage3,
-    sczl_rate4: formDatas.value.percentage4,
-    sczl_rate5: formDatas.value.percentage5,
-    sczl_rate6: formDatas.value.percentage6,
-    sczl_rate7: formDatas.value.percentage7,
-    sczl_rate8: formDatas.value.percentage10,
-    sczl_rate9: formDatas.value.percentage9,
-    sczl_rate10: formDatas.value.percentage8,
-    sys_id: sys_id
-  })
-  if (response.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '成功'
+    const jt = selectedOption.value.split('|')[0]//获取车间数据
+    //判断车间是否是【SY、PM】    
+    const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
+    let hasValidMember = false; // 标志变量,用于检查是否有有效的组员
+    let hasEmptyBefore = false; // 标记是否已经出现过空项
+    
+    // 按1-10的顺序验证
+    for (let i = 1; i <= 10; i++) {
+        const codeKey = `code${i}`;
+        const percentageKey = `percentage${i}`;
+        
+        const hasCode = formDatas.value[codeKey] && formDatas.value[codeKey].trim() !== '';
+        const hasPercentage = formDatas.value[percentageKey] !== undefined && 
+                            formDatas.value[percentageKey] !== null && 
+                            formDatas.value[percentageKey] !== '';
+        
+        // 如果当前项为空,标记hasEmptyBefore为true
+        if (!hasCode && !hasPercentage) {
+            hasEmptyBefore = true;
+            continue; // 跳过空项的进一步检查
+        }
+        
+        // 如果当前项有值,但前面已经有空项了,报错
+        if (hasEmptyBefore) {
+            ElMessage({
+                type: "error",
+                message: `请按顺序填写组员信息,第${i}项之前不能有空项`,
+            });
+            return;
+        }
+        
+        // 检查对应关系 - code和percentage必须同时有
+        if (!hasCode || !hasPercentage) {
+            ElMessage({
+                type: "error",
+                message: `第${i}项的工号和分配系数必须同时填写`,
+            });
+            return;
+        }
+        
+        // 检查百分比值是否有效
+        const percentageValue = parseFloat(formDatas.value[percentageKey]);
+        if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
+            ElMessage({
+                type: "error",
+                message: `第${i}项分配系数必须在0到1之间`,
+            });
+            return;
+        }
+        
+        hasValidMember = true;
+    }
+    
+    // 循环结束后检查标志变量
+    if (!hasValidMember) {
+        ElMessage({
+            type: "error",
+            message: "至少需要填写一个有效的组员和分配系数",
+        });
+        return;
+    } else if (shouldCheckLessThanOne && fpsum.value < 1) {
+        ElMessage({
+            type: "error",
+            message: "分配系数相加不能小于1",
+        });
+        return;
+    } else if(fpsum.value > 1) { 
+        ElMessage({
+            type: "error",
+            message: "分配系数相加不能大于1",
+        });
+        return;
+    }
+    
+    const response = await MachineTeamAdd({
+        sczl_jtbh:  selectedOption.value.split('|')[0],
+        sczl_bzdh:  BZMC.value,
+        sczl_bh1:   formDatas.value.code1,
+        sczl_bh2:   formDatas.value.code2,
+        sczl_bh3:   formDatas.value.code3,
+        sczl_bh4:   formDatas.value.code4,
+        sczl_bh5:   formDatas.value.code5,
+        sczl_bh6:   formDatas.value.code6,
+        sczl_bh7:   formDatas.value.code7,
+        sczl_bh8:   formDatas.value.code10,
+        sczl_bh9:   formDatas.value.code9,
+        sczl_bh10:  formDatas.value.code8,
+        sczl_rate1: formDatas.value.percentage1,
+        sczl_rate2: formDatas.value.percentage2,
+        sczl_rate3: formDatas.value.percentage3,
+        sczl_rate4: formDatas.value.percentage4,
+        sczl_rate5: formDatas.value.percentage5,
+        sczl_rate6: formDatas.value.percentage6,
+        sczl_rate7: formDatas.value.percentage7,
+        sczl_rate8: formDatas.value.percentage10,
+        sczl_rate9: formDatas.value.percentage9,
+        sczl_rate10: formDatas.value.percentage8,
+        sys_id: sys_id
     })
-	FacilityTeam(JTMC)
-	fetchData()
-    // FacilityProduction()
-  }
+    
+    if (response.code === 0) {
+        ElMessage({
+            type: 'success',
+            message: '成功'
+        })
+        FacilityTeam(JTMC)
+        fetchData()
+    }
 }
 const currentBz ={}
 const selectBz = async() => {