liuhairui 1 год назад
Родитель
Сommit
a07e2935fa

+ 1 - 0
src/view/performance/Dayreports.vue

@@ -885,6 +885,7 @@
 				  <el-button @click="closeDialog">取 消</el-button>
 				  <el-button type="primary" @click="enterDialog" :disabled="!clickedlist">确 定</el-button>
 				</div>
+        
             </template>
           </el-dialog>
 

+ 140 - 102
src/view/performance/chejianbaogong.vue

@@ -1,85 +1,85 @@
 <template>
-  <div>
+  <div style="margin-left: 0px;padding: 0px;">
 	<header>
-		<div style="height: 100px;">
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onBZ" >班组维护</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 90px"  @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onzhicheng"  >制程检验</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="ondianjian"  >设备点检</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onxuncha" >管理巡查</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 95px"  @click="onstatus" >设置机台状态</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onyinban">印版领退</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onClear" >换型清场</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="pd_gdprintonClick" >工单打印</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 95px"  @click="gzSel" >员工工资查询</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="oncomplaints" >客诉记录</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 120px" @click="deldbcl_onclick" :disabled="dbclSelection === ''"   title="当班产量明细" >当班产量明细删除</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 95px"  @click="pd_lcdlistonClick" >流程单查询</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 165px"  @click="scpconClick" >工单生产批次信息查询</el-button>
+		<div style="height: 110px;">
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="onBZ" >班组维护</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 90px"  @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="onzhicheng"  >制程检验</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="ondianjian"  >设备点检</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="onxuncha" >管理巡查</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 95px"  @click="onstatus" >设置机台状态</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="onyinban">印版领退</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="onClear" >换型清场</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="pd_gdprintonClick" >工单打印</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 95px"  @click="gzSel" >员工工资查询</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 70px"  @click="oncomplaints" >客诉记录</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 120px" @click="deldbcl_onclick" :disabled="dbclSelection === ''"   title="当班产量明细" >当班产量明细删除</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 85px"  @click="pd_lcdlistonClick" >流程单查询</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 165px"  @click="scpconClick" >工单生产批次信息查询</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 20px;font-weight: bold;width: 70px"  @click="onOver" title="完工按钮" >完工</el-button>
 		</div>
 	</header>
 	
     <el-container>
       <el-container>
-        <el-main>
-	<div class="gva-search-box" style=" overflow: hidden; padding: 0; margin-top:30px;display: flex;">
-		<div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0; margin-left: 20px; margin-top: 20px; color: red;">
-	  
-			
-	  <el-row :gutter="20">
-		<el-col :span="5">
-		  <el-form-item label="机台号" prop="id" label-width="60" class="zy-label"><el-input v-model="formData.机台号"  placeholder=""/></el-form-item>
-		</el-col>
-		<el-col :span="6">
-		  <el-form-item label="工单编号" prop="id"><el-input v-model="formData.工单编号"  placeholder=""  /></el-form-item>
-		</el-col>
-		<el-col :span="12">
-		  <el-form-item label=" "prop="name"><el-input v-model="formData.产品名称"  placeholder="" /></el-form-item>
-		</el-col>
-	  </el-row>
-	  
-	  <el-row :gutter="20">
-		<el-col :span="7">
-		 <el-form-item label="印件编号" style="font-size: 1.5vh;" prop="id"><el-input v-model="formData.印件号"  placeholder="" /></el-form-item>
-		</el-col>
-	  <el-col :span="15">
-		 <el-form-item label="工序名称" prop="name"><el-input v-model="formData.工序名称"  placeholder="" /></el-form-item>
-		</el-col>
-	  </el-row>
-
-	  <el-row :gutter="20">
-		<el-col :span="4">
-		 <el-form-item label="班组成员" prop="id"></el-form-item>
-		</el-col>
-	  </el-row>
-
-		<el-row :gutter="1">
-		  <!-- 循环生成 el-input 组件 -->
-		  <el-col v-for="i in 6" :span="4" :key="i">
-			<el-input v-model="formData[`sczl_bh${i}`]"  placeholder="" />
-		  </el-col>
-		</el-row>
+        <el-main style="padding: 0px;">
+			<div class="gva-search-box" style=" overflow: hidden; padding: 0; margin-top:50px;display: flex;">
+			  <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0; margin-left: 20px; margin-top: 20px; color: red;">
+	
+				<el-row :gutter="20">
+					<el-col :span="5">
+						<el-form-item label="机台号" prop="id" label-width="60" class="zy-label"><el-input v-model="formData.机台号"  placeholder=""/></el-form-item>
+					</el-col>
+					<el-col :span="6">
+						<el-form-item label="工单编号" prop="id"><el-input v-model="formData.工单编号"  placeholder=""  /></el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label=" "prop="name"><el-input v-model="formData.产品名称"  placeholder="" /></el-form-item>
+					</el-col>
+				</el-row>
+		
+				<el-row :gutter="20">
+					<el-col :span="7">
+						<el-form-item label="印件编号" style="font-size: 1.5vh;" prop="id"><el-input v-model="formData.印件号"  placeholder="" /></el-form-item>
+					</el-col>
+					<el-col :span="15">
+						<el-form-item label="工序名称" prop="name"><el-input v-model="formData.工序名称"  placeholder="" /></el-form-item>
+					</el-col>
+				</el-row>
 
-		<el-row :gutter="1">
-		  <!-- 循环生成 el-input 组件 -->
-		  <el-col v-for="i in 6" :span="4" :key="i">
-			<el-input v-model="formData[`sczl_name${i}`]"  placeholder="" class="red-input"/>
-		  </el-col>
-		</el-row>
-	</div>
-	<!-- overflow: hidden;flex: 1;  -->
-	<div style="border: 0px lawngreen solid; margin: 0; padding: 0;width:34%;">
-	 <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true" border
-      :row-style="{ height: '20px'}" :cell-style="{ padding: '0px'}"
-	  :header-row-style="{ height: '20px'}" style="width:100%;height: 30vh;"  @row-dblclick="handleSelectClick" >
-	   <el-table-column prop="process" label="印件及工序"width="280" />
-	   <el-table-column prop="completed" label="已完成板数" width="160" />
-	 </el-table>
-	</div>
-</div>
-
-          <div class="gva-table-box" style="margin-top: 20px;">
+				<el-row :gutter="20">
+					<el-col :span="4">
+						<el-form-item label="班组成员" prop="id"></el-form-item>
+					</el-col>
+				</el-row>
+
+				<el-row :gutter="1">
+				  <!-- 循环生成 el-input 组件 -->
+				  <el-col v-for="i in 6" :span="4" :key="i">
+					<el-input v-model="formData[`sczl_bh${i}`]"  placeholder="" />
+				  </el-col>
+				</el-row>
+
+				<el-row :gutter="1">
+				  <!-- 循环生成 el-input 组件 -->
+				  <el-col v-for="i in 6" :span="4" :key="i">
+					<el-input v-model="formData[`sczl_name${i}`]"  placeholder="" class="red-input"/>
+				  </el-col>
+				</el-row>
+			</div>
+			<!-- overflow: hidden;flex: 1;  -->
+			<div style="border: 0px lawngreen solid; margin: 0; padding: 0;width:34%;">
+			 <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true" border
+			  :row-style="{ height: '10px'}" :cell-style="{ padding: '0px'}"
+			  :header-row-style="{ height: '10px'}" style="width:100%;height: 30vh;"  @row-dblclick="handleSelectClick" >
+			   <el-table-column prop="process" label="印件及工序"width="290" />
+			   <el-table-column prop="completed" label="已完成板数"/>
+			 </el-table>
+			</div>
+		</div>
+
+		<!-- 表格列表信息 -->
+          <div class="gva-table-box" style="margin-top: 10px;">
             <el-tabs v-model="activName" type="card" @tab-click="duohandleClick"   >
 			<el-tab-pane label="设备作业清单" @click.native="showTable('设备作业清单', 'first')" name="first"  :class="{ 'active-tab': activeTab === 'first' }" style="font-size: 16px;">
 				<el-table ref="multipleTable" 
@@ -92,6 +92,7 @@
 					:header-cell-style="{ padding: '0px' }"
 					@contextmenu.prevent="yjonRightClick" 
 					@row-click="yjupdateCompanyFunc"
+					@row-dblclick="sjsbzyqdCompanyFunc"
 					style="width: 100%;height: 330px;color:purple;font-weight: bold;" border tooltip-effect="dark"
 					:data="sbzyData" 
 					row-key="ID" 
@@ -1838,37 +1839,34 @@
 			      <hr>
 			      <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: 18px; color: red; margin: 10px 0;">在列表中进行双击打开查看流程单查询</p>
 			      <hr>
 			      
 			      <!-- 输入框和按钮 -->
 			      <div style="display: flex; align-items: center; margin-top: 10px;">
-			        <el-input v-model="searchInfolcd" placeholder="Enter回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="flex: 1; margin-right: 10px;"></el-input>
-			        <el-button type="primary" title="搜索" icon="el-icon-search"  @click="onSubmitlcd" >搜索</el-button>
+			        <el-input v-model="searchInfolcd" placeholder="Enter回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="height: 40px;flex: 1;"></el-input>
+			        <el-button type="primary" title="搜索"  icon="el-icon-search" style="width: 70px;height: 40px;font-size: 18px;"  @click="onSubmitlcd" >搜索</el-button>
+					<el-button type="primary" title="查看"  icon="el-icon-search" style="width: 110px;height: 40px;font-size: 18px;"  @click="onstatsuclick" >查看流程单</el-button>
 			      </div>
 			      
 			      <!-- 表格展示区域 -->
 			      <div class="gva-table-box" style="margin-top: 15px;">
 			        <el-table 
-			          ref="multipleTable"
-			          style="width: 100%; height: 30vh; verflow: auto;" 
-			  		:row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
-			  		:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-			          :data="tableDatalcd" 
-			          :border="true" 
-			          :tooltip-effect="'dark'"
-			          row-key="ID"
-			          highlight-current-row
-			          @row-click="tableRowClicklcd"
-			          @row-dblclick="updateCompanyFunclcd"
-			          @selection-change="handleSelectionChange">
-			  		
+						ref="multipleTable"
+						style="width: 100%; height: 30vh; verflow: auto;" 
+						:row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
+						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+						:data="tableDatalcd" 
+						:border="true" 
+						:tooltip-effect="'dark'"
+						row-key="ID"
+						highlight-current-row
+						@row-click="tableRowClicklcd"
+						@row-dblclick="updateCompanyFunclcd"
+						@selection-change="handleSelectionChange">
 			  		<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="工序名称" 	 	prop="Gd_cpmc"  />
-			  		
 			          <!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
-			  		
 			        </el-table>
 			      </div>
 			    </div>
@@ -2840,6 +2838,7 @@ const clickybupdate = async (row) => {
 //班组人员及分配比例双击
 const gyupdateCompanyFunc = async (row) => {
   console.log('班组人员及分配比例双击')
+  SetMachineTeams(roww.value)
 }
 //班组人员及分配比例右键
 const bzonRightClick = async (row) => {
@@ -5594,6 +5593,12 @@ const yjupdateCompanyFunc = async(row) => {
   console.log(res)
   selectData.value = res.data;
 }
+const sjsbzyqdCompanyFunc = async(row) => {
+	location.reload();
+	setMachineTeams(rowws.value)
+	ElMessage({type: 'success', message: '切换成功'})
+}
+
 //设备作业清单右键
 const yjonRightClick = async(row) => {
   console.log(rowws.value)
@@ -5834,16 +5839,19 @@ const pd_lcdformData = reactive({
 // 流程单查询按钮
 const processList = ref([]);
 const pd_lcdlistonClick = async () => {
+	console.log(formData)
   if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
-    ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
-    return false;
+	 pd_lcdformData['gdbh'] = formData.value.工单编号;
+	 pd_lcdformData['yjno'] = formData.value.印件号;
+    // ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
+    // return false;
   }else{
     pd_lcdformData['gdbh'] = _Gd_gdbh.value;
     pd_lcdformData['yjno'] = _Gd_yjno.value;
-    pd_lcdlist.value = true;
-    processList.value = []
-    _getOrderProcessLeft_list();
   }
+  pd_lcdlist.value = true;
+  processList.value = []
+  _getOrderProcessLeft_list();
 }
 const pd_lcdProductValue = async () => {
   _getOrderProcessLeft_list();
@@ -5907,6 +5915,7 @@ const scpconClick = async () => {
   console.log(formData.value.工单编号)
   searchInfolcd.value = formData.value.工单编号
   scpconlist.value = true;
+  tableDatalcd.splice(0,tableDatalcd.length,...[]);//表格数据
   onSubmitlcd()//调用接口
 }
 //进入页面默认光标加载
@@ -5934,9 +5943,14 @@ const Enterkeysearch = (event) => {
 const _StaGetOrderList = async (node) => {
   const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value});
   console.log(StaGetOrderListdata)
-  if(StaGetOrderListdata.data.length === 0){
-    ElMessage({type: 'warning',message: '未搜索具体查询条件'})
-  }
+	if (StaGetOrderListdata.data === null) {
+	  ElMessage({
+		type: 'warning',
+		message: '未搜索具体查询条件',
+		customClass: 'custom-message', // 添加自定义类名
+		duration: 3000 // 可选:设置消息显示的持续时间(单位:毫秒)
+	  });
+	}
   tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data);//表格数据
 };
 
@@ -5956,6 +5970,24 @@ const _GetorderDetail = ref(null)
 	弹窗页面
 */
 const popdialog = ref(false);
+const currentRow = ref('');
+// 获取当前行数据
+const tableRowClicklcd = (row) => {
+  currentRow.value = row; // 保存当前选中行
+};
+
+// 按钮点击逻辑
+const onstatsuclick  = async () => {
+	console.log(currentRow)
+  if (!currentRow.value) {
+	ElMessage({
+	  type: "warning",
+	  message: "请先点击选择一行数据",
+	});
+	return;
+  }
+  await updateCompanyFunclcd(currentRow.value);
+};
 //双击
 const updateCompanyFunclcd = async (row) => {
 	console.log("双击",row)
@@ -5971,10 +6003,8 @@ const updateCompanyFunclcd = async (row) => {
 	  }
 	});
 	_GetorderDetail.value = resultData;
-	console.log("_GetorderDetail.value", _GetorderDetail.value);
-	
+	// console.log("_GetorderDetail.value", _GetorderDetail.value);
 	_StaGetList(row)
-	
 }
 
 //左侧树形节点点击事件
@@ -6208,5 +6238,13 @@ const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
 			background: #ff80ff !important;
 		}
 		/* 假设你知道弹窗内部文本的类名或标签名,这里只是一个示例 */
+/* 自定义 ElMessage 样式 */
+:deep(.custom-message .el-message__content) {
+  font-size: 18px; /* 设置文字大小 */
+  font-weight: bold; /* 文字加粗 */
+}
 
+:deep(.custom-message) {
+  width: 400px; /* 设置消息框的宽度 */
+}
 </style>

+ 103 - 29
src/view/yunyin/shengchanguanli/components/addGongYi.vue

@@ -12,7 +12,7 @@
               <el-input v-model="form['工序']"  id="工序编号" @keydown="add_gyzlent($event, '印件编号', '工序编号', '重点工序')"  style="width: 100px;"/>
             </el-form-item>
             <el-form-item label="重点工序:"  class="mab" prop="keyOrder" label-width=" 90">
-              <el-select  v-model="form['重点工序']" id="重点工序"  @keydown="add_gyzlent($event, '', '重点工序', '开数')"  style="width: 130px;">
+              <el-select  v-model="form['重点工序']" id="重点工序"  @keydown="add_gyzlent($event, '工序编号', '重点工序', '开数')"  style="width: 130px;">
                 <el-option value=""></el-option>
                 <el-option value="重点工序">重点工序</el-option>
               </el-select>
@@ -100,11 +100,16 @@
       </template>
     </el-dialog>
 
-    <el-dialog v-model="yjdisplay" :before-close="()=> yjdisplay = false" style="width: 800px;" :title="'可选列表'" destroy-on-close>
-      <el-tree :data="yjList" :props="{children: 'children',label: 'name', value: 'no'}" @node-click="changeHandle"
-               default-expand-all style="border: 1px solid #ececec; padding: 10px;height: 400px;overflow: auto;">
-      </el-tree>
-    </el-dialog>
+	<!-- 新增工艺印件可选列表 -->
+	<el-dialog v-model="yjdisplay" title="新增工艺印件可选列表" destroy-on-close width="800px"  @keydown="selectGx_yj($event)" style='margin-top: 6%;'>
+	  <el-table tooltip-effect="dark" :data="yjList" row-key="ID" highlight-current-row="true"
+				  :row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
+				  :cell-style="{ padding: '3px' }" :header-row-style="{ height: '20px' }"
+						border style="width: 100%;height: 40vh;" ref="table_fplb"  @row-dblclick="SelectClick" >
+	    <el-table-column prop="no" label="印件号" width="80" />
+		<el-table-column prop="name" label="工序"/>
+	  </el-table>
+	</el-dialog>
 
     <el-dialog v-model="cjdisplay" :before-close="()=> cjdisplay = false" style="width: 800px;" :title="'车间选择'" destroy-on-close>
       <el-tree
@@ -154,7 +159,7 @@
 </template>
 
 <script setup>
-import {ref, reactive,onMounted} from 'vue'
+import {ref, reactive,onMounted,nextTick} from 'vue'
 import {
   gdzl_MachineList,
   PrintDetailList,
@@ -168,13 +173,12 @@ import {
 import { ElMessage } from 'element-plus'
 const form = reactive({})
 const visible = ref(false)
-const yjdisplay = ref(false)
 const shxsdisplay = ref(false)
 const cjdisplay = ref(false)
 const gxshdisplay = ref(false)
 const id = ref()
 const gxList = ref([])
-const yjList = ref()
+const yjList = ref([])
 const cjList = ref([])
 const gdzl_MachineList_address = ref()
 import { useUserStore } from '@/pinia/modules/user'
@@ -184,10 +188,9 @@ _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickNam
 //新增工艺资料弹窗 键盘 input框跳转
 const add_gyzlent = async (event,id1,id2,id3) => {
   if (id2==='印件编号' && event.key==='Tab' || id2 === '印件编号' && event.key=== 'Enter') {
-    console.log(id.value)
-    console.log(form['yjno'])
+    // console.log(id.value)
     const response = await getCouplet({ gdbh:id.value,yjno:form['yjno']});
-    console.log(response)
+    // console.log("response",response)
     form['开数'] = response.data['开数']
     form['联数'] = response.data['联数']
 	form['工序'] = response.data['工序号']
@@ -199,13 +202,12 @@ const add_gyzlent = async (event,id1,id2,id3) => {
       document.getElementById(id3).focus()
     }
   }
+  
   if (id2 === '车间名称' && event.key==='Enter' || id2 === '车间名称' && event.key==='Tab') {
     document.getElementById(id3).focus()
     cjdisplay.value = true
   }
-  // if (id2 === '损耗系数' && event.key==='Tab') {
-  //   document.getElementById(id3).focus()
-  // }
+  
   if (id2 === '工序损耗' &&  event.key==='Enter' || id2 === '工序损耗' &&  event.key==='Tab') {
     if(form['车间名称']){
       await getGxshList();
@@ -213,6 +215,7 @@ const add_gyzlent = async (event,id1,id2,id3) => {
       shxsdisplay.value = true
     }
   }
+  
   if (id2 === '工序名称' &&  event.key==='Tab' || event.key==='Enter') {
     if(form['工艺名称'] === undefined){
       form['工艺名称'] = '';
@@ -230,10 +233,10 @@ const add_gyzlent = async (event,id1,id2,id3) => {
     if(id1!=''){
       document.getElementById(id1).focus()
     }
-  }else if (event.keyCode === 8) { // 删除箭头
-    if(id1!='' && document.getElementById(id2).value==''){
-      document.getElementById(id1).focus()
-    }
+  // }else if (event.keyCode === 8) { // 删除箭头
+  //   if(id1!='' && document.getElementById(id2).value==''){
+  //     document.getElementById(id1).focus()
+  //   }
   }else if (event.keyCode === 37) { // 向左箭头
     if(id1!='' && document.getElementById(id2).selectionStart==0){
       document.getElementById(id1).focus()
@@ -250,7 +253,6 @@ const _shdh = ref('');
 const InSH = async (value) => {
   if(form['工艺名称']){
     const response = await getLossCode({ code:form['工艺名称']});
-    console.log(response)
     if(response.code===0){
       form['shdh']=response.data[0].sys_bh
       // form.工序损耗名称= node.sys_mc
@@ -312,9 +314,16 @@ const selectSHNode = (node,check) => {
 }
 
 
+
 const open = async (gdbh, gxlist,_gdgyrow) => {
   visible.value = true
-	console.log(_gdgyrow.value)
+  //进入新增页面光标自动聚焦
+  setTimeout(() => {
+  const inputElement = document.getElementById('印件编号');
+  	if (inputElement) {
+  		inputElement.focus();		
+  	}
+  }, 100);
 	if(_gdgyrow.value){
 		Object.assign(form,_gdgyrow.value);
 		form['yjno'] = _gdgyrow.value['印件号'];
@@ -336,11 +345,21 @@ const open = async (gdbh, gxlist,_gdgyrow) => {
 		  form[key] = '';
 		});
 	}
-	
+
+  //id.value代表全局工单编号
   id.value = gdbh
   const res = await PrintDetailList({workOrder: id.value})
+  if(res.data.length === 1){
+	 form['yjno'] = res.data[0]['no']
+	 const response = await getCouplet({ gdbh:id.value,yjno:form['yjno']});
+	 form['开数'] = response.data['开数']
+	 form['联数'] = response.data['联数']
+	 form['工序'] = response.data['工序号']
+  }else{
+	  yjList.value = res.data
+  }
+  
   const apiData = await getDepartName()
-  // console.log(apiData)
   function transformDataToTreeFormat(data) {
     return Object.entries(data).map(([key, value]) => {
       // key是车间名称,value是车间内的操作列表
@@ -356,7 +375,6 @@ const open = async (gdbh, gxlist,_gdgyrow) => {
   }
   // 使用ref来管理转换后的数据
   cjList.value = ref(transformDataToTreeFormat(apiData.data));
-  yjList.value = res.data
   gxList.value = gxlist
 }
 
@@ -411,7 +429,15 @@ const selectHandle = async (node)=>{
   await InSH()
 }
 
-const changeHandle = (v) => {
+
+/*
+	新增工艺印件可选列表
+*/	
+const yjdisplay = ref(false)
+const currentIndex = ref(0);
+const table_fplb = ref();
+//点击事件
+const SelectClick = (v) => {
   const no = '0' + v.no
   let list = gxList.value.map(item => {
     const yj = item.split('-')[0]
@@ -421,14 +447,54 @@ const changeHandle = (v) => {
   form['工序'] = (list.sort((a, b) => b-a)[0] + 1)
   yjdisplay.value = false
 }
+//键盘事件
+const selectGx_yj = (event) => {
+	if (event.keyCode === 40) {
+	  // 向下箭头
+	  currentIndex.value = (currentIndex.value + 1) % yjList.value.length;
+	  setCurrents(yjList.value[currentIndex.value]);
+	} else if (event.keyCode === 38) {
+	  // 向上箭头
+	  currentIndex.value = (currentIndex.value - 1 + yjList.value.length) % yjList.value.length;
+	  setCurrents(yjList.value[currentIndex.value]);
+	} else if (event.keyCode === 13) {
+	  // Enter 键
+	  yjdisplay.value = false
+	  //进入新增页面光标自动聚焦
+	  setTimeout(() => {
+	  const inputElement = document.getElementById('重点工序');
+	  	if (inputElement) {
+	  		inputElement.focus();		
+	  	}
+	  }, 100);
+	}
+}
+const setCurrents = async (row) => {
+	console.log(row)
+  setTimeout(() => {
+    table_fplb.value?.setCurrentRow(row);
+    const { no } = row;
+	form['yjno'] = row.no
+	_getCouplet()
+  });
+};
+//调用接口
+const _getCouplet = async () => {
+ const response = await getCouplet({ gdbh:id.value,yjno:form['yjno']});
+	 form['开数'] = response.data['开数']
+	 form['联数'] = response.data['联数']
+	 form['工序'] = response.data['工序号']
+};
+
+
+/*
+	设备编号
+*/
 const _capacityListsbbh = ref(null)
 const sbbhclick = () => {
   _capacityList();
 }
-
-
 const _capacityList = async () => {
-  console.log(111)
   if(form['设备编号'] === ''){
     return false;
   }else{
@@ -505,5 +571,13 @@ defineExpose({ open })
 </script>
 
 <style scoped>
-
+/* tree组件背景高亮 */
+:deep(.el-tree-node:focus > .el-tree-node__content){
+	background: #ff80ff !important;
+}
+/* 选中某行时的背景色*/
+.el-table__body tr.current-row > td {
+  background: #ff80ff !important;
+  /* 背景颜色 */
+}
 </style>