zck hace 3 meses
padre
commit
1ffbc6975c

+ 121 - 1
src/api/mes/huhejob.js

@@ -228,4 +228,124 @@ export const RcDel = (data) => {
     method: 'post',
     data
   })
-}
+}
+
+// 糊盒报工计时左侧菜单
+export const GcgetTab = (params) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/getTab',
+    method: 'get',
+    params
+  })
+}
+
+// 糊盒报工计时列表
+export const GcList = (params) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/getList',
+    method: 'get',
+    params
+  })
+}
+
+// 糊盒报工计时详情
+export const GcDetail = (params) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 糊盒报工计时修改
+export const GcEdit = (data) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/edit',
+    method: 'post',
+    data
+  })
+}
+
+// 糊盒报工计时新增
+export const GcAdd = (data) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/add',
+    method: 'post',
+    data
+  })
+}
+
+// 糊盒报工计时删除
+export const GcDel = (params) => {
+  return service({
+    url: '/mes_server/Glu_Chronograph_Sheet/del',
+    method: 'get',
+    params
+  })
+}
+
+
+// 查询工单资料
+export const getWorkOrderList = (params) => {
+  return service({
+    url: '/mes_server/Gluing_report/getWorkOrderList',
+    method: 'get',
+    params
+  })
+}
+
+// 查询机台编号
+export const getMachineList = (params) => {
+  return service({
+    url: '/mes_server/Gluing_report/getMachineList',
+    method: 'get',
+    params
+  })
+}
+
+// 查询工艺名称
+export const gitProcessList = (params) => {
+  return service({
+    url: '/mes_server/Gluing_report/gitProcessList',
+    method: 'get',
+    params
+  })
+}
+
+// 糊盒工资查询左侧接口
+export const Gluing_Salary_Tab = (params) => {
+  return service({
+    url: '/mes_server/Gluing_Salary/getTab',
+    method: 'get',
+    params
+  })
+}
+
+// 工资查询上方列表
+export const Gluing_Salary_List = (params) => {
+  return service({
+    url: '/mes_server/Gluing_Salary/getList',
+    method: 'get',
+    params
+  })
+}
+
+// 工资查询下方列表
+export const Gluing_Salary_Detail = (params) => {
+  return service({
+    url: '/mes_server/Gluing_Salary/getDetail',
+    method: 'get',
+    params
+  })
+}
+
+// 糊盒工资计算
+export const salaryCalculation = (params) => {
+  return service({
+    url: '/mes_server/Glu_Salary_Calculation/salaryCalculation',
+    method: 'get',
+    params
+  })
+}
+
+

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1129
src/view/job/processSheet/processSheet.vue


+ 1 - 0
src/view/yunyin/chanpinziliao/hhbiaozhungongdan.vue

@@ -843,6 +843,7 @@
                           <el-option label="研发打样" value="研发打样"></el-option>
                           <el-option label="废码利用" value="废码利用"></el-option>
                           <el-option label="翌星订单" value="翌星订单"></el-option>
+                          <el-option label="糊盒标准工单" value="糊盒标准工单"></el-option>
                         </el-select>
                         <!--                      <el-input v-model="add_gdscgdformData['重点工单']"  style="width: 110px;"  id="重点工单"  @keydown="add_gdzlent($event, '备注', '重点工单', '开单日期')" />-->
                       </el-form-item>

+ 390 - 57
src/view/yunyin/huheguanli/huhebaogong.vue

@@ -7,7 +7,7 @@
             <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
               <el-form-item>
                 <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
-				<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: 90px"  @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button> -->
 				<el-button type="primary" class="bt" @click="openRoleDialog" v-if="AddType === true">糊盒角色</el-button>
 				<el-button type="primary" class="bt" @click="openTeamDialog" v-if="AddType === true">糊盒班组</el-button>
                 <!-- <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
@@ -24,7 +24,7 @@
           <!--    左侧树侧形结构-->
 		<layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;" >
 			<div class="JKWTree-tree" style="height: 70vh;" >
-				<h3>设备运行跟踪</h3>
+				<h3>糊盒设备运行跟踪</h3>
 				<el-tree :data="treeData" class="treecolor" highlight-current @node-click="handleNodeClick" />
 			</div>
 		</layout-sider>
@@ -229,12 +229,11 @@
 						highlight-current-row="true" @row-dblclick="gytableDatadoubleClick" 
 						style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" >
 				<el-table-column type="selection" width="55" />
-				<!-- <el-table-column align="left" label="选择" prop="工单编号"  width="100"/> -->
+				<el-table-column fixed align="left" label="机台编号" prop="机台编号"  width="100"/>
 				<el-table-column fixed align="left" label="工单编号" prop="工单编号"  width="100"/>
-				<el-table-column fixed align="left" label="印件号" prop="印件号"  width="90"/>
+				<el-table-column fixed align="left" label="工序名称" prop="工序名称"  width="90"/>
 				<el-table-column fixed align="left" label="产品代号" prop="产品代号"  width="120"/>
 				<el-table-column fixed align="left" label="产品名称" prop="产品名称"  width="300"/>
-				<el-table-column fixed align="left" label="工序号" prop="工序号"  width="90"/>
 				<el-table-column  align="left" label="来料数量" prop="来料数量"  width="120"/>
 				<el-table-column  align="left" label="产量" prop="产量"  width="100"/>
 				<el-table-column align="left" label="制程废品" prop="制程废品" width="85" />
@@ -244,14 +243,7 @@
 				<el-table-column align="left" label="联数" prop="联数"  width="85"/>
 				<el-table-column align="left" label="定额代号" prop="定额代号"  width="100"/>
 				<el-table-column align="left" label="工价系数" prop="工价系数"  width="85"/>
-				<!-- <el-table-column align="left" label="备注" prop="备注"  width="200"/> -->
-				<el-table-column v-for="i in 10" :key="i" 
-					align="left" 
-					:label="`组员${i}`" 
-					:prop="`组员${i}`" 
-					width="160"
-					show-overflow-tooltip
-				/>
+				<el-table-column align="left" label="计件单价" prop="price"  width="85"/>
 				<el-table-column align="left" label="日期" prop="日期" width="120" />
 				<el-table-column align="left" label="开始时间" prop="开始时间" width="120" />
 				<el-table-column align="left" label="结束时间" prop="结束时间"  width="120"/>
@@ -260,15 +252,16 @@
 				<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="110"/>
-				<!-- <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="70" />
-				<el-table-column align="left" label="主电表" prop="主电表"  width="70"/>
-				<el-table-column align="left" label="辅电表" prop="辅电表" width="70" />
-				<el-table-column align="left" label="色度数" prop="色度数" width="70" />
-				<el-table-column align="left" label="印刷方式" prop="印刷方式"  width="85"/> -->
 				<el-table-column align="left" label="创建人员" prop="创建人员" width="210" />
+        <el-table-column align="left" label="上报时间" prop="上报时间" width="160" /> 
 				<el-table-column align="left" label="修改时间" prop="修改时间" width="160" />
+        				<el-table-column v-for="i in 30" :key="i" 
+					align="left" 
+					:label="`组员${i}`" 
+					:prop="`组员${i}`" 
+					width="160"
+					show-overflow-tooltip
+				/>
 			  </el-table>
 			  
 			  <el-table ref="JPmultipleTable"
@@ -425,6 +418,11 @@
 				 <div style="margin-top: 5px;">
 					 <el-row :gutter="24" style="margin-top:0px; margin-bottom: 25px;">
 					<!-- <el-col :span="1" style="margin-top:0px; margin-bottom: 10px;"></el-col> -->
+          <el-col :span="4" style="margin-top:0px; margin-bottom: 10px;">
+					  <el-form-item label="来料数量" prop="" style="margin-top:0px; margin-bottom: 10px;">
+						<el-input v-model="formData3.来料数量" id="来料数量" style="margin-top:0px; margin-bottom: 10px;" @keydown="ent($event, '前工序废', '来料异常', '联数')"  placeholder="" />
+					  </el-form-item>
+					</el-col>
 					<el-col :span="4" style="margin-top:0px; margin-bottom: 10px;">
 					  <el-form-item label="产量" prop="" style="margin-top:0px; margin-bottom: 10px;margin-left:24px">
 					  <el-input v-model="formData3.产量" id="产量" style="margin-top:0px; margin-bottom: 10px;" @keydown="ent($event, '下机时间', '产量', '制程废品')"   placeholder="" />
@@ -449,11 +447,7 @@
 					  </el-form-item>
 					</el-col> -->
   
-					<el-col :span="4" style="margin-top:0px; margin-bottom: 10px;">
-					  <el-form-item label="来料数量" prop="" style="margin-top:0px; margin-bottom: 10px;">
-						<el-input v-model="formData3.来料数量" id="来料数量" style="margin-top:0px; margin-bottom: 10px;" @keydown="ent($event, '前工序废', '来料异常', '联数')"  placeholder="" />
-					  </el-form-item>
-					</el-col>
+
 					<el-col :span="4" style="margin-top:0px; margin-bottom: 10px;">
 						  <el-form-item label="联数" prop="" style="margin-top:0px; margin-bottom: 10px;margin-left:24px">
 						  <el-input v-model="formData3.Gy0_ls" disabled  id="联数" style="margin-top:0px; margin-bottom: 10px;" @keydown="ent($event, '来料异常', '联数', '墨色')"   placeholder="" />
@@ -638,18 +632,6 @@
 				</el-col>
 			  </el-row>
 
-			<el-row :gutter="24" style="height: 40px;">
-				<el-col :span="6">
-				  <el-form-item label="印件号:" prop="flatFeed" class="mab"label-width="70">
-				  <el-input v-model="gyformdata.yjno" id="印件号" @keydown="ent1($event)" />
-				  </el-form-item>
-				</el-col>
-				<!-- <el-col :span="18">
-				  <el-form-item label="印件名称:" prop="perTenThousand" class="mab" label-width="150">
-				  <el-input v-model="gyformdata.yjmc" id="印件名称"  @keydown="ent1($event)"   />
-				  </el-form-item>
-				</el-col> -->
-			</el-row>
 
 			<el-row :gutter="24" style="height: 40px;">
 			  <el-col :span="14">
@@ -658,17 +640,12 @@
 			    <el-input v-model="gyformdata.gxh" id="工序号"  :readonly=true :clearable="true" style="width: 80px;" />
 			    </el-form-item>
 			  </el-col>
-			  <!-- <el-col :span="10">
-			    <el-form-item label="工艺名称:" prop="perTenThousand" class="mab">
-			  	  <el-input v-model="gyformdata.gymc" id="工艺名称"  @keydown="ent1($event)" :readonly=true :clearable="true" style="width: 200px;" />
-			    </el-form-item>
-			  </el-col> -->
 			</el-row>
 			
 			<el-row :gutter="24" style="height: 40px;">
 			  <el-col :span="6">
 			    <el-form-item label="日期:" prop="flatFeed" class="mab" label-width="70">
-				 <el-date-picker v-model="gyformdata.rq" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="ent1($event)"/>
+				 <el-date-picker v-model="gyformdata.rq" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @keydown="ent1($event)"/>
 			    </el-form-item>
 			  </el-col>
 			  <el-col :span="6">
@@ -788,6 +765,12 @@
 			  	</el-form-item>
 			  	</el-col>
 
+          <el-col :span="4">
+			      <el-form-item label="计件单价:" prop="flatFeed" class="mab">
+			      <el-input v-model="gyformdata.price"  id="计件单价"  @keydown="ent1($event)" style="width: 100px;" />
+			      </el-form-item>
+			    </el-col>
+
 			  </el-row>
 
 
@@ -820,7 +803,7 @@
 			  <!-- <div style="">拉料人员</div> -->
 		  </div>
 
-		  <el-row :gutter="10" style="margin-top: 10px;">
+		  <!-- <el-row :gutter="10" style="margin-top: 10px;">
           <el-col :span="2"><el-input v-model="gyformdata.组员1['角色']" id="role1"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员2['角色']" id="role2"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员3['角色']" id="role3"/></el-col>
@@ -831,10 +814,10 @@
           <el-col :span="2"><el-input v-model="gyformdata.组员8['角色']" id="role8"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员9['角色']" id="role9"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员10['角色']" id="role10"/></el-col>
-        </el-row>
+        </el-row> -->
 
 		    <el-row :gutter="10" style="margin-top: 10px;">
-          <!-- <el-col :span="2"><el-input v-model="gyformdata.bzdh" id="bzdh"  @keydown="ent1($event)"/></el-col> -->
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">编号</el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员1['编号']" id="bh1"   @keyup.enter.native="GetYg($event, '1')"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员2['编号']" id="bh2"   @keyup.enter.native="GetYg($event, '2')"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员3['编号']" id="bh3"   @keyup.enter.native="GetYg($event, '3')"/></el-col>
@@ -848,6 +831,7 @@
 		  	</el-row>
 
         <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">姓名</el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员1['姓名']" id="name1"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员2['姓名']" id="name2"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员3['姓名']" id="name3"/></el-col>
@@ -858,10 +842,10 @@
           <el-col :span="2"><el-input v-model="gyformdata.组员8['姓名']" id="name8"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员9['姓名']" id="name9"/></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员10['姓名']" id="name10"/></el-col>
-          <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
         </el-row>
 
         <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">比例</el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员1['比例']" id="rate1" @input="updateTotal"  @keydown="ent($event, 'bh11', 'rate1', 'rate2')"   placeholder="" /></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员2['比例']" id="rate2" @input="updateTotal" @keydown="ent($event, 'rate1', 'rate2', 'rate3')"   placeholder="" /></el-col>
           <el-col :span="2"><el-input v-model="gyformdata.组员3['比例']" id="rate3" @input="updateTotal" @keydown="ent($event, 'rate2', 'rate3', 'rate4')"   placeholder="" /></el-col>
@@ -874,9 +858,95 @@
           <el-col :span="2"><el-input v-model="gyformdata.组员10['比例']" id="rate10" @input="updateTotal" @keydown="ent($event, 'rate9', 'rate10', '工单编号')"  placeholder="" /></el-col>
           <el-col :span="2"></el-col>
          </el-row>
+
+         <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">编号</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员11['编号']" id="bh11"   @keyup.enter.native="GetYg($event, '11')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员12['编号']" id="bh12"   @keyup.enter.native="GetYg($event, '12')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员13['编号']" id="bh13"   @keyup.enter.native="GetYg($event, '13')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员14['编号']" id="bh14"   @keyup.enter.native="GetYg($event, '14')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员15['编号']" id="bh15"   @keyup.enter.native="GetYg($event, '15')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员16['编号']" id="bh16"   @keyup.enter.native="GetYg($event, '16')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员17['编号']" id="bh17"   @keyup.enter.native="GetYg($event, '17')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员18['编号']" id="bh18"   @keyup.enter.native="GetYg($event, '18')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员19['编号']" id="bh19"   @keyup.enter.native="GetYg($event, '19')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员20['编号']" id="bh20"   @keyup.enter.native="GetYg($event, '20')"/></el-col>
+		  	</el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">姓名</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员11['姓名']" id="name11"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员12['姓名']" id="name12"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员13['姓名']" id="name13"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员14['姓名']" id="name14"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员15['姓名']" id="name15"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员16['姓名']" id="name16"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员17['姓名']" id="name17"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员18['姓名']" id="name18"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员19['姓名']" id="name19"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员20['姓名']" id="name20"/></el-col>
+        </el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">比例</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员11['比例']" id="rate11" @input="updateTotal"  @keydown="ent($event, 'bh11', 'rate11', 'rate12')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员12['比例']" id="rate12" @input="updateTotal" @keydown="ent($event, 'rate1', 'rate12', 'rate13')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员13['比例']" id="rate13" @input="updateTotal" @keydown="ent($event, 'rate12', 'rate13', 'rate14')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员14['比例']" id="rate14" @input="updateTotal" @keydown="ent($event, 'rate13', 'rate14', 'rate15')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员15['比例']" id="rate15" @input="updateTotal" @keydown="ent($event, 'rate14', 'rate15', 'rate16')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员16['比例']" id="rate16" @input="updateTotal" @keydown="ent($event, 'rate15', 'rate16', 'rate17')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员17['比例']" id="rate17" @input="updateTotal" @keydown="ent($event, 'rate16', 'rate17', 'rate18')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员18['比例']" id="rate18" @input="updateTotal" @keydown="ent($event, 'rate17', 'rate18', 'rate19')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员19['比例']" id="rate19" @input="updateTotal" @keydown="ent($event, 'rate18', 'rate19', 'rate10')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员20['比例']" id="rate20" @input="updateTotal" @keydown="ent($event, 'rate19', 'rate20', '工单编号')"  placeholder="" /></el-col>
+          <el-col :span="2"></el-col>
+         </el-row>
+
+         <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">编号</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员21['编号']" id="bh21"   @keyup.enter.native="GetYg($event, '21')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员22['编号']" id="bh22"   @keyup.enter.native="GetYg($event, '22')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员23['编号']" id="bh23"   @keyup.enter.native="GetYg($event, '23')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员24['编号']" id="bh24"   @keyup.enter.native="GetYg($event, '24')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员25['编号']" id="bh25"   @keyup.enter.native="GetYg($event, '25')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员26['编号']" id="bh26"   @keyup.enter.native="GetYg($event, '26')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员27['编号']" id="bh27"   @keyup.enter.native="GetYg($event, '27')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员28['编号']" id="bh28"   @keyup.enter.native="GetYg($event, '28')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员29['编号']" id="bh29"   @keyup.enter.native="GetYg($event, '29')"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员30['编号']" id="bh30" @keyup.enter.native="GetYg($event, '30')"/></el-col>
+		  	</el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">姓名</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员21['姓名']" id="name21"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员22['姓名']" id="name22"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员23['姓名']" id="name23"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员24['姓名']" id="name24"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员25['姓名']" id="name25"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员26['姓名']" id="name26"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员27['姓名']" id="name27"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员28['姓名']" id="name28"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员29['姓名']" id="name29"/></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员30['姓名']" id="name30"/></el-col>
+        </el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="1" style="margin-left: 10px;margin-top: 8px;">比例</el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员21['比例']" id="rate21" @input="updateTotal"  @keydown="ent($event, 'bh11', 'rate21', 'rate22')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员22['比例']" id="rate22" @input="updateTotal" @keydown="ent($event, 'rate21', 'rate22', 'rate23')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员23['比例']" id="rate23" @input="updateTotal" @keydown="ent($event, 'rate22', 'rate23', 'rate24')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员24['比例']" id="rate24" @input="updateTotal" @keydown="ent($event, 'rate23', 'rate24', 'rate25')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员25['比例']" id="rate25" @input="updateTotal" @keydown="ent($event, 'rate24', 'rate25', 'rate26')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员26['比例']" id="rate26" @input="updateTotal" @keydown="ent($event, 'rate25', 'rate26', 'rate27')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员27['比例']" id="rate27" @input="updateTotal" @keydown="ent($event, 'rate26', 'rate27', 'rate28')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员28['比例']" id="rate28" @input="updateTotal" @keydown="ent($event, 'rate27', 'rate28', 'rate29')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员29['比例']" id="rate29" @input="updateTotal" @keydown="ent($event, 'rate28', 'rate29', 'rate10')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="gyformdata.组员30['比例']" id="rate30" @input="updateTotal" @keydown="ent($event, 'rate29', 'rate30', '工单编号')"  placeholder="" /></el-col>
+          <el-col :span="2"></el-col>
+         </el-row>
 		  <template #footer>
 		    <div class="dialog-footer">	
-			  <el-button type="primary" @click="bzenterDialog">班组修改</el-button>
+			  <!-- <el-button type="primary" @click="bzenterDialog">班组修改</el-button> -->
 		      <el-button @click="gycloseDialog">取 消</el-button>
 		      <el-button type="primary" @click="gychanliangenterDialog">确 定</el-button>
 		    </div>
@@ -1366,6 +1436,21 @@
             </el-form>
           </el-dialog>
 
+                    <!--当日上报产量 组员及分配比例-->
+                    <el-dialog v-model="blModellist" :before-close="() => blModellist = false" style="width: 20%" @keydown="selectBZRRs($event)">
+            <el-form>
+              <div>
+                <el-table :data="employeeDatalist" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass"
+					ref="tableBZRRs"
+					highlight-current-row="true"
+				  @row-click="tablebllickHandlerlist($event)">
+                  <el-table-column prop="员工编号" label="员工编号"></el-table-column>
+                  <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </el-dialog>
+
   
           </el-main>
         </layout-content>
@@ -2091,7 +2176,7 @@ const mapClassMembers = (item) => {
     item.class.forEach((member, index) => {
       if (index < 10) { // 最多10个组员
         const memberField = `组员${index + 1}`;
-        item[memberField] = `${member.姓名} (${member.角色}) ${(parseFloat(member.比例) * 100).toFixed(1)}%`;
+        item[memberField] = `${member.姓名} ${member.编号} (${(parseFloat(member.比例) * 100).toFixed(1)}%)`;
       }
     });
   }
@@ -2150,6 +2235,8 @@ const gyformdata = ref({
   主电表: '',
   辅电表: '',
   bzdh: '',
+  role: '',
+  price: '',
   // 初始化组员数据结构
   组员1: { 角色:'', 编号: '', 姓名: '', 比例: '' },
   组员2: { 角色:'', 编号: '', 姓名: '', 比例: '' },
@@ -2160,7 +2247,27 @@ const gyformdata = ref({
   组员7: { 角色:'', 编号: '', 姓名: '', 比例: '' },
   组员8: { 角色:'', 编号: '', 姓名: '', 比例: '' },
   组员9: { 角色:'', 编号: '', 姓名: '', 比例: '' },
-  组员10: { 角色:'', 编号: '', 姓名: '', 比例: '' }
+  组员10: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员11: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员12: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员13: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员14: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员15: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员16: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员17: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员18: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员19: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员20: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员21: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员22: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员23: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员24: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员25: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员26: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员27: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员28: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员29: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  组员30: { 角色:'', 编号: '', 姓名: '', 比例: '' },
 })
 
 const gychanliangVisible = ref(false)
@@ -2177,7 +2284,71 @@ const gytableDatadoubleClick = async(row) => {
       Object.assign(gyformdata.value, {
         工单编号: '',
         cpmc: '',
-        // ... 其他字段重置
+        yjno: '',
+        yjmc: '',
+        gxmc: '',
+        gxh: '',
+        gymc: '',
+        rq: '',
+        starttime: '',
+        num: '',
+        sj1: '',
+        sj2: '',
+        色度数: '',
+        联数: '',
+        产量: '',
+        制程废品: '',
+        制程次品: '',
+        前工序废: '',
+        来料异常: '',
+        装版总工时: '',
+        装版工时: '',
+        打样总工时: '',
+        打样工时: '',
+        保养工时: '',
+        异常总工时: '',
+        异常类型: '',
+        异常补时: '',
+        通电工时: '',
+        dedh: '',
+        码包: '',
+        码开始行: '',
+        码结束行: '',
+        主电表: '',
+        辅电表: '',
+        bzdh: '',
+        role: '',
+        price: '',
+        组员1: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员2: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员3: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员4: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员5: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员6: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员7: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员8: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员9: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员10: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员11: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员12: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员13: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员14: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员15: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员16: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员17: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员18: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员19: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员20: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员21: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员22: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员23: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员24: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员25: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员26: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员27: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员28: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员29: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+        组员30: { 角色:'', 编号: '', 姓名: '', 比例: '' },
       })
       
       // 映射API数据到表单
@@ -2192,7 +2363,7 @@ const gytableDatadoubleClick = async(row) => {
         gxmc: apiData.工序名称 || '',
         gxh: apiData.工序号 || '',
         dedh: apiData.定额代号 || '',
-		rq: nodedate.value || '',
+		rq: apiData.日期 || '',
         starttime: apiData.日期 || '',
         sj1: apiData.开始时间 || '',
 		sj2: apiData.结束时间 || '',
@@ -2201,13 +2372,15 @@ const gytableDatadoubleClick = async(row) => {
         制程废品: apiData.制程废品 || '',
         异常类型: apiData.异常类型 || '',
         保养工时: apiData.保养工时 || '',
-        装版工时: apiData.装版工时 || ''
+        装版工时: apiData.装版工时 || '',
+        role: apiData.role || '',
+        price: apiData.price || '',
       }
       
       // 处理组员数据
       if (apiData.class && Array.isArray(apiData.class)) {
         apiData.class.forEach((member, index) => {
-          if (index < 10) {
+          if (index < 30) {
             const memberKey = `组员${index + 1}`
             gyformdata.value[memberKey] = {
 			  角色: member.角色 || '',
@@ -2343,17 +2516,16 @@ const handleBzConfirm = async () => {
 
 const gychanliangenterDialog = async(row) => {
 	console.log(gyformdata.value)
+  // return;
 	const params = {
 		sczl_gdbh: gyformdata.value.工单编号,
-		sczl_yjno: gyformdata.value.yjno,
-		sczl_gxh: gyformdata.value.gxh,
 		sczl_gxmc: gyformdata.value.gxmc,
 		来料数量: gyformdata.value.来料数量,
 		sczl_cl: gyformdata.value.产量,
 		sczl_zcfp: gyformdata.value.制程废品,
 		startTime: gyformdata.value.starttime,
 		endTime: gyformdata.value.sj2,
-		sczl_rq: gyformdata.value.日期,
+		sczl_rq: gyformdata.value.rq,
 		sczl_ls: gyformdata.value.联数,
 		sczl_dedh: gyformdata.value.定额代号,
 		工价系数: gyformdata.value.工价系数,
@@ -2364,6 +2536,71 @@ const gychanliangenterDialog = async(row) => {
 		设备运行工时: gyformdata.value.设备运行工时,
 		sczl_jtbh:gyformdata.value.sczl_jtbh,
 		id: gyformdata.value.Uid,
+    role: gyformdata.value.role,
+    price: gyformdata.value.price,
+    bh1: gyformdata.value.组员1['编号'],
+    bh2: gyformdata.value.组员2['编号'],
+    bh3: gyformdata.value.组员3['编号'],
+    bh4: gyformdata.value.组员4['编号'],
+    bh5: gyformdata.value.组员5['编号'],
+    bh6: gyformdata.value.组员6['编号'],
+    bh7: gyformdata.value.组员7['编号'],
+    bh8: gyformdata.value.组员8['编号'],
+    bh9: gyformdata.value.组员9['编号'],
+    bh10: gyformdata.value.组员10['编号'],
+    bh11: gyformdata.value.组员11['编号'],
+    bh12: gyformdata.value.组员12['编号'],
+    bh13: gyformdata.value.组员13['编号'],
+    bh14: gyformdata.value.组员14['编号'],
+    bh15: gyformdata.value.组员15['编号'],
+    bh16: gyformdata.value.组员16['编号'],
+    bh17: gyformdata.value.组员17['编号'],
+    bh18: gyformdata.value.组员18['编号'],
+    bh19: gyformdata.value.组员19['编号'],
+    bh20: gyformdata.value.组员20['编号'],
+    bh21: gyformdata.value.组员21['编号'],
+    bh22: gyformdata.value.组员22['编号'],
+    bh23: gyformdata.value.组员23['编号'],
+    bh24: gyformdata.value.组员24['编号'],
+    bh25: gyformdata.value.组员25['编号'],
+    bh26: gyformdata.value.组员26['编号'],
+    bh27: gyformdata.value.组员27['编号'],
+    bh28: gyformdata.value.组员28['编号'],
+    bh29: gyformdata.value.组员29['编号'],
+    bh30: gyformdata.value.组员30['编号'],
+    rate1: gyformdata.value.组员1['比例'],
+    rate2: gyformdata.value.组员2['比例'],
+    rate3: gyformdata.value.组员3['比例'],
+    rate4: gyformdata.value.组员4['比例'],
+    rate5: gyformdata.value.组员5['比例'],
+    rate6: gyformdata.value.组员6['比例'],
+    rate7: gyformdata.value.组员7['比例'],
+    rate8: gyformdata.value.组员8['比例'],
+    rate9: gyformdata.value.组员9['比例'],
+    rate10: gyformdata.value.组员10['比例'],
+    rate11: gyformdata.value.组员11['比例'],
+    rate12: gyformdata.value.组员12['比例'],
+    rate13: gyformdata.value.组员13['比例'],
+    rate14: gyformdata.value.组员14['比例'],
+    rate15: gyformdata.value.组员15['比例'],
+    rate16: gyformdata.value.组员16['比例'],
+    rate17: gyformdata.value.组员17['比例'],
+    rate18: gyformdata.value.组员18['比例'],
+    rate19: gyformdata.value.组员19['比例'],
+    rate20: gyformdata.value.组员20['比例'],
+    rate21: gyformdata.value.组员21['比例'],
+    rate22: gyformdata.value.组员22['比例'],
+    rate23: gyformdata.value.组员23['比例'],
+    rate24: gyformdata.value.组员24['比例'],
+    rate25: gyformdata.value.组员25['比例'],
+    rate26: gyformdata.value.组员26['比例'],
+    rate27: gyformdata.value.组员27['比例'],
+    rate28: gyformdata.value.组员28['比例'],
+    rate29: gyformdata.value.组员29['比例'],
+    rate30: gyformdata.value.组员30['比例'],
+
+
+
 	}
 	console.log(params)
 	const res = await getGluingReportDetailUpdate(params)
@@ -3119,6 +3356,102 @@ const tablebllickHandler = async (row, column, event) => {
 };
 
 
+
+const blModellist = ref(false)
+  const employeeDatalist = ref('')
+  const GetYg = async (event,key) => {
+  let bzyg=''
+  bzyg=`组员${key}`
+  let bzxm=''
+  bzxm=`组员${key}`
+  const response = await getYg({sczl_bh:gyformdata.value[bzyg]['编号']});
+	gyformdata.value[bzyg]['编号'] = ""
+  if (response.code === 0) {
+    if(response.data.length === 1){
+      gyformdata.value[bzxm]['姓名'] = response.data[0].ygxm
+      gyformdata.value[bzyg]['编号'] = response.data[0].员工编号
+    }else{
+      blModellist.value = true;
+      employeeDatalist.value = response.data // 假设响应数据是数组
+    }
+  }
+}
+
+
+const clickeds = ref(false);
+const currentIndexs  = ref(0);
+const tableBZRRs  = ref();
+// 模拟点击某一行
+const setCurrents = (row) => {
+  setTimeout(() => {
+    tableBZRRs .value?.setCurrentRow(row); // 高亮选中当前行
+    const { 员工编号, ygxm } = row;
+    console.log("选中行数据:", row);
+  });
+};
+// 键盘事件处理逻辑
+const selectBZRRs = (event) => {
+  if (event.keyCode === 40) {
+    // 向下箭头
+    if (currentIndexs.value < employeeDatalist.value.length - 1) {
+      currentIndexs.value++;
+    } else {
+      // 如果是最后一行,回到第一行
+      currentIndexs.value = 0;
+    }
+  } else if (event.keyCode === 38) {
+    // 向上箭头
+    if (currentIndexs.value > 0) {
+      currentIndexs.value--;
+    } else {
+      // 如果是第一行,跳到最后一行
+      currentIndexs.value = employeeDatalist.value.length - 1;
+    }
+  } else if (event.keyCode === 13) {
+    // 回车键,模拟触发点击事件
+    const row = employeeDatalist.value[currentIndexs.value];
+    tablebllickHandlerlist(row); // 手动调用行点击事件
+  }
+  setCurrents(employeeDatalist.value[currentIndexs.value]); // 高亮当前选中的行
+};
+
+// 表格行点击事件处理
+const tablebllickHandlerlist = async (row, column, event) => {
+  if (clickeds.value) {
+    // 如果已经点击过一次,则不再执行操作
+    return;
+  }
+  let nextIndex = 1;
+  // 检查每个组员是否有空位
+  while (gyformdata.value[`组员${nextIndex}`]['编号'] !== '' && gyformdata.value[`组员${nextIndex}`]['姓名'] !== '') {
+    nextIndex++;
+    if (nextIndex > 30) {
+      // 如果所有组员字段已填满,则不做任何操作,直接退出
+      return;
+    }
+  }
+  // 在填充数据之前,检查当前组员编号是否包含字母,如果包含字母,则清空该组员的编号和姓名
+  const current编号 = gyformdata.value[`组员${nextIndex}`]['编号'];
+  if (/[a-zA-Z]/.test(current编号)) { // 判断编号中是否包含字母
+    gyformdata.value[`组员${nextIndex}`]['编号'] = "";
+    gyformdata.value[`组员${nextIndex}`]['姓名'] = "";
+    console.log(`组员${nextIndex}的编号包含字母,已清空编号和姓名`);
+  }
+  
+    // 否则填充到下一个空的组员位置
+    gyformdata.value[`组员${nextIndex}`]['编号'] = row.员工编号;
+    gyformdata.value[`组员${nextIndex}`]['姓名'] = row.ygxm;
+    blModellist.value = false;
+    clickedlist.value = true;
+  // 设置点击锁,防止短时间内重复点击
+  setTimeout(() => {
+    clickedlist.value = false;
+  }, 300); // 300毫秒内再次点击不会触发事件,可以根据需要调整这个延迟时间
+};
+
+
+
+
 //键盘input框跳转
 const add_gdzlent = async (event,id1,id2,id3,idx) => {
   console.log(idx)

+ 2589 - 0
src/view/yunyin/huheguanli/huhechejianbaogong.vue

@@ -0,0 +1,2589 @@
+<template>
+	<div style="margin-left: 0px;padding: 2px;">
+	  <header>
+	  </header>
+	  
+	  <el-container> 
+		<el-container>
+		  <el-main style="padding: 0px;">
+
+			<div style="font-size: 1.5vh; font-weight: bold;color: red;">
+
+				<el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
+    <el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+      <el-form-item label="车间名称" prop="workshop" style="margin-top:0px; margin-bottom: 3px;">
+        <el-select
+          v-model="formData3.cjmc"
+          id="车间名称"
+          placeholder="请选择车间"
+          style="width: 100%; margin-top:0px; margin-bottom: 3px;"
+          @change="handleWorkshopChange"
+          @keydown="ent($event, 'rate10', '车间名称', '产品名称')"
+          :loading="workshopLoading"
+          filterable
+          clearable
+        >
+          <el-option
+            v-for="item in workshopOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+    </el-col>
+    <el-col :span="8" style="margin-top:0px; margin-bottom: 3px;">
+      <el-form-item label="机台名称" prop="machine" style="margin-top:0px; margin-bottom: 3px;">
+        <el-select
+          v-model="formData3.jtmc"
+          id="机台名称"
+          placeholder="请先选择车间"
+          style="width: 100%; margin-top:0px; margin-bottom: 3px;"
+          @keydown="ent($event, '车间名称', '机台名称', '工序名称')"
+          @change="handleMachineChange"
+          :disabled="!formData3.cjmc || machineOptions.length === 0"
+          :loading="machineLoading"
+          filterable
+          clearable
+        >
+          <el-option
+            v-for="item in machineOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+    </el-col>
+  </el-row>
+			  <el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
+				<el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+      <el-form-item label="工单编号" prop="order" style="margin-top:0px; margin-bottom: 3px;">
+        <el-select
+          v-model="formData3.order"
+          id="工单编号"
+          placeholder="请输入或选择工单"
+          style="width: 100%; margin-top:0px; margin-bottom: 3px;"
+          @keydown="ent($event, 'rate10', '工单编号', '产品名称')"
+          @change="handleWorkOrderChange"
+          filterable
+          remote
+          :remote-method="searchWorkOrders"
+          :loading="workOrderLoading"
+          clearable
+          :default-first-option="true"
+        >
+          <el-option
+            v-for="item in workOrderOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+    </el-col>
+		  <el-col :span="10" style="margin-top:0px; margin-bottom: 3px;">
+      <el-form-item label="产品名称" prop="product_name" style="margin-top:0px; margin-bottom: 3px;">
+        <el-input
+          v-model="formData3.product_name"
+          id="产品名称"
+          disabled
+          style="margin-top:0px; margin-bottom: 3px;"
+          @keydown="ent($event, '工单编号', '产品名称', '工序名称')"
+          placeholder=""
+        />
+      </el-form-item>
+    </el-col>
+				<el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+      <el-form-item label="工序名称" prop="gxmc" style="margin-top:0px; margin-bottom: 3px;">
+        <el-select
+          v-model="formData3.gxmc"
+          id="工序名称"
+          placeholder="请先选择车间"
+          style="width: 100%; margin-top:0px; margin-bottom: 3px;"
+          @keydown="ent($event, '产品名称', '工序名称', '印件号')"
+          :disabled="!formData3.cjmc || processOptions.length === 0"
+          :loading="processLoading"
+          filterable
+          clearable
+        >
+          <el-option
+            v-for="item in processOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+    </el-col>
+		</el-row>
+			  <!-- <el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
+			<el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+			  <el-form-item label="印件号" prop="id" label-width="60" style="margin-top:0px; margin-bottom: 3px;">
+				<el-input v-model="formData3.yjno" disabled  style="margin-top:0px; margin-bottom: 3px;" id="印件号"  @keydown="ent($event, '工序名称', '印件号', '印件名称')"  placeholder="" />
+			  </el-form-item>
+			</el-col>
+					<el-col :span="10" style="margin-top:0px; margin-bottom: 3px;">
+					</el-col>
+
+					<el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+			  <el-form-item label="工序号" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+				<el-input v-model="formData3.gxh" disabled  id="gxh" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '工艺名称', 'gxh', '日期')"  placeholder="" />
+			  </el-form-item>
+					</el-col>
+		</el-row> -->
+				<el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
+					<!-- <el-col :span="1" style="margin-top:0px; margin-bottom: 3px;">
+					</el-col> -->
+				  <el-col :span="6" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="日期" prop="" style="margin-top:0px; margin-bottom: 3px;margin-left:24px">
+						<el-date-picker
+				         v-model="formData3.日期"
+				         type="date"
+				         format="YYYY-MM-DD HH:mm:ss"
+				         value-format="YYYY-MM-DD HH:mm:ss"
+				       />
+					  </el-form-item>
+				  </el-col>
+
+
+				  <!-- <el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="流程标牌" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-input v-model="formData3.流程标牌" id="流程标牌" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '日期', '流程标牌', '上机时间')"  placeholder="" />
+					  </el-form-item>
+				  </el-col> -->
+			  <el-col :span="6">
+			    <el-form-item label="上机时间:" prop="flatFeed" class="mab">
+				 <el-date-picker
+				         v-model="formData3.上机时间"
+				         type="datetime"
+				         format="YYYY-MM/DD HH:mm:ss"
+				         value-format="YYYY-MM-DD HH:mm:ss"
+				       />
+			    </el-form-item>
+			  </el-col>
+			  <el-col :span="6">
+			    <el-form-item label="下机时间:" prop="flatFeed" class="mab">
+				<el-date-picker
+				        v-model="formData3.下机时间"
+				        type="datetime"
+				        format="YYYY-MM-DD HH:mm:ss"
+				        value-format="YYYY-MM-DD HH:mm:ss"
+				      />
+			    </el-form-item>
+			  </el-col>
+				  </el-row>
+		</div>
+  <!--               <div style="margin-top: 20px;">-->
+				 <div style="margin-top: 5px;">
+					 <el-row :gutter="24" style="margin-top:0px; margin-bottom: 5px;">
+					<!-- <el-col :span="1" style="margin-top:0px; margin-bottom: 3px;"></el-col> -->
+          <el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="来料数量" prop="" style="margin-top:0px; margin-bottom: 3px;">
+						<el-input v-model="formData3.来料数量" id="来料数量" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '前工序废', '来料异常', '联数')"  placeholder="" />
+					  </el-form-item>
+					</el-col>
+					<el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="产量" prop="" style="margin-top:0px; margin-bottom: 3px;margin-left:24px">
+					  <el-input v-model="formData3.产量" id="产量" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '下机时间', '产量', '制程废品')"   placeholder="" />
+					  </el-form-item>
+					</el-col>
+			  
+					<el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="制程废品" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+						<el-input v-model="formData3.制程废品" id="制程废品" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '产量', '制程废品', '制程次品')"  placeholder="" />
+					  </el-form-item>
+					</el-col>
+  
+
+					<el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+						  <el-form-item label="联数" prop="" style="margin-top:0px; margin-bottom: 3px;margin-left:24px">
+						  <el-input v-model="formData3.Gy0_ls" disabled  id="联数" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '来料异常', '联数', '墨色')"   placeholder="" />
+						  </el-form-item>
+					  </el-col>
+				  </el-row>
+  
+				  <el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
+					  <!-- <el-col :span="1" style="margin-top:0px; margin-bottom: 3px;"></el-col> -->
+  
+
+  
+					  <el-col :span="5" style="margin-left:15px; margin-bottom: 3px;">
+						  <el-form-item label="装版工时"  prop="id" style="margin-top:0px; margin-bottom: 3px;margin-left:-12px">
+						  <el-input v-model="formData3.装版工时"  id="装版工时" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '墨色', '装版总时长', '打样总工时')"   placeholder="" />
+						  </el-form-item>
+					  </el-col>
+					  <el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+						<el-form-item label="保养工时"  prop="id" style="margin-top:0px; margin-bottom: 3px;margin-left:-12px">
+						  <el-input v-model="formData3.保养工时"  style="margin-top:0px; margin-bottom: 3px;" id="保养工时"  @keydown="ent($event, '装版总时长', '打样总工时', '通电工时')"  placeholder="" />
+						</el-form-item>
+					  </el-col>
+
+					  <el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+						<el-form-item label="异常类型"  prop="id" style="margin-top:0px; margin-bottom: 3px;margin-left:-12px">
+						  <el-input v-model="formData3.异常类型"  style="margin-top:0px; margin-bottom: 3px;" id="异常类型" disabled  @keydown="ent($event, '装版总时长', '打样总工时', '通电工时')"  placeholder="" />
+						</el-form-item>
+					  </el-col>
+  
+					  <el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
+						<el-form-item label="异常工时"  prop="id" style="margin-top:0px; margin-bottom: 3px;margin-left:-12px">
+						  <el-input v-model="formData3.异常工时"  style="margin-top:0px; margin-bottom: 3px;" id="异常工时"  @keydown="ent($event, '装版总时长', '打样总工时', '通电工时')"  placeholder="" />
+						</el-form-item>
+					  </el-col>
+  
+					  <el-col :span="4" style="margin-top:0px; margin-bottom: 3px;">
+						<el-form-item label="通电工时"  prop="id" style="margin-top:0px; margin-bottom: 3px;">
+						  <el-input v-model="formData3.通电工时" style="margin-top:0px; margin-bottom: 3px;" id="通电工时"  @keydown="ent($event, '打样总工时', '通电工时', '定额代号')"  placeholder="" />
+						</el-form-item>
+					  </el-col>
+					</el-row>
+  
+					  <el-row :gutter="4" style="margin-top:0px; margin-bottom: 1vh;">
+					  <!-- <el-col :span="1" style="margin-top:0px; margin-bottom: 3px;"></el-col> -->
+					  <el-col :span="4" style="margin-top:0px; margin-bottom: 3px;margin-left:0">
+						  <el-form-item label="定额代号" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+						  <el-input v-model="formData3.定额代号" disabled  id="定额代号" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '通电工时', '定额代号', '码开始行')"  placeholder="" />
+						  </el-form-item>
+					  </el-col>
+					</el-row>
+
+  
+
+						<div style="display: flex;">
+			  <div style="width: 95vh;">组员及分配比例</div>
+			  <!-- <div style="width: 9vh;margin-left: 70px;">特殊组员</div> -->
+			  <!-- <div style="">拉料人员</div> -->
+		  </div>
+
+		  <el-row :gutter="10" style="margin-top: 10px;">
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员1['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(1)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员2['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(2)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员3['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(3)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员4['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(4)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员5['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(5)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员6['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(6)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员7['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(7)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员8['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(8)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员9['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(9)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员10['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(10)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+</el-row>
+
+		    <el-row :gutter="10" style="margin-top: 10px;">
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.bzdh" id="bzdh"  @keydown="ent1($event)"/></el-col> -->
+          <el-col :span="2"><el-input v-model="formData3.组员1['编号']" id="bh1"   @keyup.enter.native="GetYg($event, '1')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员2['编号']" id="bh2"   @keyup.enter.native="GetYg($event, '2')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员3['编号']" id="bh3"   @keyup.enter.native="GetYg($event, '3')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员4['编号']" id="bh4"   @keyup.enter.native="GetYg($event, '4')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员5['编号']" id="bh5"   @keyup.enter.native="GetYg($event, '5')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员6['编号']" id="bh6"   @keyup.enter.native="GetYg($event, '6')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员7['编号']" id="bh7"   @keyup.enter.native="GetYg($event, '7')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员8['编号']" id="bh8"   @keyup.enter.native="GetYg($event, '8')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员9['编号']" id="bh9"   @keyup.enter.native="GetYg($event, '9')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员10['编号']" id="bh10"  @keyup.enter.native="GetYg($event, '10')"/></el-col>
+		  	</el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="2"><el-input v-model="formData3.组员1['姓名']" disabled id="name1"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员2['姓名']" disabled id="name2"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员3['姓名']" disabled id="name3"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员4['姓名']" disabled id="name4"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员5['姓名']" disabled id="name5"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员6['姓名']" disabled id="name6"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员7['姓名']" disabled id="name7"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员8['姓名']" disabled id="name8"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员9['姓名']" disabled id="name9"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员10['姓名']"  disabled id="name10"/></el-col>
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
+        </el-row>
+
+
+		 <el-row :gutter="10" style="margin-top: 10px;">
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员11['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(11)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员12['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(12)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员13['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(13)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员14['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(14)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员15['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(15)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员16['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(16)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员17['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(17)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员18['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(18)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员19['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(19)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员20['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(20)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+</el-row>
+
+		    <el-row :gutter="10" style="margin-top: 10px;">
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.bzdh" id="bzdh"  @keydown="ent1($event)"/></el-col> -->
+          <el-col :span="2"><el-input v-model="formData3.组员11['编号']" id="bh11"   @keyup.enter.native="GetYg($event, '11')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员12['编号']" id="bh12"   @keyup.enter.native="GetYg($event, '12')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员13['编号']" id="bh13"   @keyup.enter.native="GetYg($event, '13')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员14['编号']" id="bh14"   @keyup.enter.native="GetYg($event, '14')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员15['编号']" id="bh15"   @keyup.enter.native="GetYg($event, '15')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员16['编号']" id="bh16"   @keyup.enter.native="GetYg($event, '16')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员17['编号']" id="bh17"   @keyup.enter.native="GetYg($event, '17')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员18['编号']" id="bh18"   @keyup.enter.native="GetYg($event, '18')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员19['编号']" id="bh19"   @keyup.enter.native="GetYg($event, '19')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员20['编号']" id="bh20"  @keyup.enter.native="GetYg($event, '20')"/></el-col>
+		  	</el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="2"><el-input v-model="formData3.组员11['姓名']" disabled id="name11"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员12['姓名']" disabled id="name12"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员13['姓名']" disabled id="name13"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员14['姓名']" disabled id="name14"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员15['姓名']" disabled id="name15"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员16['姓名']" disabled id="name16"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员17['姓名']" disabled id="name17"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员18['姓名']" disabled id="name18"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员19['姓名']" disabled id="name19"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员20['姓名']" disabled id="name20"/></el-col>
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
+        </el-row>
+
+
+
+		 <el-row :gutter="10" style="margin-top: 10px;">
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员21['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(21)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员22['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(22)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员23['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(23)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员24['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(24)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员25['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(25)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员26['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(26)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员27['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(27)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员28['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(28)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员29['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(29)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+  <el-col :span="2">
+    <el-select 
+      v-model="formData3.组员30['角色']" 
+      placeholder="请选择角色" 
+      :disabled="roleDisabled"
+      @change="handleRoleChange(30)"
+      clearable
+    >
+      <el-option
+        v-for="item in roleOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      />
+    </el-select>
+  </el-col>
+</el-row>
+
+		    <el-row :gutter="10" style="margin-top: 10px;">
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.bzdh" id="bzdh"  @keydown="ent1($event)"/></el-col> -->
+          <el-col :span="2"><el-input v-model="formData3.组员21['编号']" id="bh21"   @keyup.enter.native="GetYg($event, '21')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员22['编号']" id="bh22"   @keyup.enter.native="GetYg($event, '22')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员23['编号']" id="bh23"   @keyup.enter.native="GetYg($event, '23')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员24['编号']" id="bh24"   @keyup.enter.native="GetYg($event, '24')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员25['编号']" id="bh25"   @keyup.enter.native="GetYg($event, '25')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员26['编号']" id="bh26"   @keyup.enter.native="GetYg($event, '26')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员27['编号']" id="bh27"   @keyup.enter.native="GetYg($event, '27')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员28['编号']" id="bh28"   @keyup.enter.native="GetYg($event, '28')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员29['编号']" id="bh29"   @keyup.enter.native="GetYg($event, '29')"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员30['编号']" id="bh30"  @keyup.enter.native="GetYg($event, '30')"/></el-col>
+		  	</el-row>
+
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="2"><el-input v-model="formData3.组员21['姓名']" disabled id="name21"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员22['姓名']" disabled id="name22"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员23['姓名']" disabled id="name23"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员24['姓名']" disabled id="name24"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员25['姓名']" disabled id="name25"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员26['姓名']" disabled id="name26"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员27['姓名']" disabled id="name27"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员28['姓名']" disabled id="name28"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员29['姓名']" disabled id="name29"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员30['姓名']"  disabled id="name30"/></el-col>
+          <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
+        </el-row>
+
+		 <div class="dialog-footer">	
+			  <el-button type="primary" @click="bzenterDialog">班组修改</el-button>
+		      <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
+          <el-button style="margin-left: 50px; " type="primary" @click="ontimeForm">计时上传</el-button>
+
+		    </div>
+	  
+				 </div>
+
+
+         <el-dialog v-model="dialogFormVisible" :before-close="closeDialog"
+         title="计时上传" destroy-on-close width="800px">
+							<!-- <el-scrollbar height="500px"> -->
+							<el-form id="detail-form" ref="elFormRef" :model="detailData" label-position="left"
+								@keyup="moveFocus">
+
+								<!-- 日期 -->
+								<el-row>
+									<el-form-item label="日期" prop="name">
+										<el-input type="date" max="9999-12-31" id="riqi" v-model="detailData.wgjs_rq"
+											style="width: 100px;" />
+									</el-form-item>
+								</el-row>
+
+								<!-- 标题栏 -->
+								<el-row :gutter="10">
+									<el-col :span="3"> <span>员工编号</span> </el-col>
+									<el-col :span="3"> <span>员工姓名</span> </el-col>
+									<el-col :span="3"> <span>计时</span> </el-col>
+									<el-col :span="12"> <span>原因备注</span> </el-col>
+								</el-row>
+
+								<!-- 员工1 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh1" id="bh" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name1" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js1" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy1">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工2 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh2" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name2" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js2" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy2">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工3 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh3" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name3" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js3" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy3">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工4 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh4" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name4" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js4" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy4">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工5 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh5" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name5" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js5" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy5">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工6 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh6" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name6" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js6" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy6">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+							</el-form>
+
+							<template #footer>
+								<div class="dialog-footer">
+									<el-button @click="closeDialog">取 消</el-button>
+									<el-button type="primary" @click="enterDialog">确 定</el-button>
+								</div>
+							</template>
+						</el-dialog>
+
+
+  
+<!-- 选择修改班组弹窗 -->
+<el-dialog v-model="bzVisible" title="班组选择" width="90%" style="height: 80vh;">
+  
+  <el-table 
+    ref="BZmultipleTable"
+    highlight-current-row="true"
+    :show-overflow-tooltip="true"
+    :row-style="{ height: '20px' }"
+    :cell-style="{ padding: '0px' }" 
+    :header-row-style="{ height: '20px' }"
+    :header-cell-style="{ padding: '0px' }"
+    @row-dblclick="handleBzRowDblClick"
+    :row-class-name="rowClassStyle"
+    style="width: 100%; height: 400px" 
+    border 
+    tooltip-effect="dark" 
+    :data="FPData" 
+    row-key="ID" 
+    @selection-change="handleBzSelectionChange"
+    @row-click="handleBzRowClick"
+  >
+    <el-table-column type="selection" width="55" />
+    <el-table-column sortable align="center" label="班组" prop="bz" width="120" />
+    <el-table-column sortable align="center" label="角色" prop="role" width="120" />
+    <el-table-column sortable align="center" label="比例" prop="rate" width="120" />
+    <el-table-column sortable align="center" label="人员1" prop="bh1" width="120" />
+    <el-table-column sortable align="center" label="姓名1" prop="name1" width="120" />
+    <el-table-column sortable align="center" label="人员2" prop="bh2" width="120" />
+    <el-table-column sortable align="center" label="姓名2" prop="name2" width="120" />
+    <el-table-column sortable align="center" label="人员3" prop="bh3" width="120" />
+    <el-table-column sortable align="center" label="姓名3" prop="name3" width="120" />
+    <el-table-column sortable align="center" label="人员4" prop="bh4" width="120" />
+    <el-table-column sortable align="center" label="姓名4" prop="name4" width="120" />
+    <el-table-column sortable align="center" label="人员5" prop="bh5" width="120" />
+    <el-table-column sortable align="center" label="姓名5" prop="name5" width="120" />
+    <el-table-column sortable align="center" label="人员6" prop="bh6" width="120" />
+    <el-table-column sortable align="center" label="姓名6" prop="name6" width="120" />
+    <el-table-column sortable align="center" label="人员7" prop="bh7" width="120" />
+    <el-table-column sortable align="center" label="姓名7" prop="name7" width="120" />
+    <el-table-column sortable align="center" label="人员8" prop="bh8" width="120" />
+    <el-table-column sortable align="center" label="姓名8" prop="name8" width="120" />
+    <el-table-column sortable align="center" label="人员9" prop="bh9" width="120" />
+    <el-table-column sortable align="center" label="姓名9" prop="name9" width="120" />
+    <el-table-column sortable align="center" label="人员10" prop="bh10" width="120" />
+    <el-table-column sortable align="center" label="姓名10" prop="name10" width="120" />
+    <el-table-column sortable align="center" label="人员11" prop="bh11" width="120" />
+    <el-table-column sortable align="center" label="姓名11" prop="name11" width="120" />
+    <el-table-column sortable align="center" label="人员12" prop="bh12" width="120" />
+    <el-table-column sortable align="center" label="姓名12" prop="name12" width="120" />
+    <el-table-column sortable align="center" label="人员13" prop="bh13" width="120" />
+    <el-table-column sortable align="center" label="姓名13" prop="name13" width="120" />
+    <el-table-column sortable align="center" label="人员14" prop="bh14" width="120" />
+    <el-table-column sortable align="center" label="姓名14" prop="name14" width="120" />
+    <el-table-column sortable align="center" label="人员15" prop="bh15" width="120" />
+    <el-table-column sortable align="center" label="姓名15" prop="name15" width="120" />
+  </el-table>
+
+  <template #footer>
+    <div class="dialog-footer">
+      <el-button @click="bzVisible = false">取消</el-button>
+      <el-button type="primary" @click="handleBzConfirm">确定</el-button>
+    </div>
+  </template>
+</el-dialog>
+
+
+
+		  
+	
+
+          <!--当日上报产量 组员及分配比例-->
+          <el-dialog v-model="blModellist" :before-close="() => blModellist = false" style="width: 20%" @keydown="selectBZRRs($event)">
+            <el-form>
+              <div>
+                <el-table :data="employeeDatalist" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass"
+					ref="tableBZRRs"
+					highlight-current-row="true"
+				  @row-click="tablebllickHandlerlist($event)">
+                  <el-table-column prop="员工编号" label="员工编号"></el-table-column>
+                  <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </el-dialog>
+  
+			
+				  
+
+
+		  <el-dialog v-model="GetDedhVisible" id="tableFplb" @keydown="ent($event)" style="margin-top: 5%;"  >
+		  	<el-form>
+		  			<el-form-item label="选择定额代号" class="mab" prop="keyOrder"></el-form-item>
+		  			<div style="border:1px solid #eee; width:100%; height: 600px; overflow-y: auto;">
+		  				<el-tree :data="GetDedhtreeData" ref="table_fplb" 
+		  					@keydown="handleTreeKeydown" 
+		  					:props="{ children: 'children',label: 'label'}"
+		  					node-key="id" @node-click="handleFplbClick">
+		  				</el-tree>
+		  			</div>
+		  	</el-form>
+		  </el-dialog>
+
+
+
+  
+		  </el-main>
+		</el-container>
+	  </el-container>
+  
+  
+  
+  
+  
+	</div>
+  </template>
+  
+  <script>
+  //点击按钮显示下方表格
+  export default {
+	data() {
+	  return {
+		currentTable: '', // 当前展示的表格
+		activeName: 'first',
+		_GetorderDetail:'',
+	  };
+	},
+	methods: {
+	  
+	}
+  };
+  </script>
+  <script setup>
+  
+
+  
+  import {
+	reportInfo,
+	reportMachineMac,
+	facilityWorklist,
+	setProcessStatus,
+	submitDailyProduction,
+	getYg,
+	JpUploade,
+	getTimelist,
+	getRejectRate,
+	JPproductionDedh
+  } from '@/api/jixiaoguanli/jitairibaobiao'
+  
+  import {
+	demoCustomer
+  } from "@/api/demo";
+  
+  // 全量引入格式化工具 请按需保留
+  import { getWorkOrderList,getMachineList,gitProcessList,getGluingcole,getGluingClassLList,AddGluingReportData,GcAdd } from '@/api/mes/huhejob'
+  import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
+  import { ElMessage, ElMessageBox,ElNotification  } from 'element-plus'
+  import { ref, reactive,watch,nextTick,onMounted } from 'vue'
+  import { useUserStore } from '@/pinia/modules/user'
+import { get } from 'scriptjs';
+
+
+// 成功
+const successres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+        message: `<strong style="font-size: 71px; color: black; background-color: #80FA80; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+
+// 失败
+const errorres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+		message: `<strong style="font-size: 71px; color: white; background-color: red; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+
+// 警告
+const warningres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+		message: `<strong style="font-size: 71px; color: white; background-color: #e6a23c; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+
+const formData3= ref({
+	cjmc: '', // 车间名称
+	jtmc: '', // 机台名称
+	  order:'',
+	  yjno:'',
+	  gxh:'',
+	  gxmc:'',
+	  product_name:'',
+	  yj_name:'',
+	  gy_name:'',
+	  sczl_jtbh:'',
+	  sczl_bzdh:'',
+	  sys_id:'',
+	  sys_rq:'',
+	  mod_rq:'',
+	  UniqId:'',
+	  日期:'',
+	  上机时间:'',
+	  下机时间:'',
+	  产量:'',
+	  制程废品:'',
+	  制程次品:'',
+	  来料数量:'',
+	  Gy0_ls:'',
+	  保养工时:'',
+	  装版工时:'',
+	  异常工时:'',
+	  异常类型:'',
+	  通电工时:'',
+	  定额代号:'',
+	  码开始行:'',
+	  码结束行:'',
+	  码包:'',
+	  主电表:'',
+	  辅电表:'',
+	  formattedArray:'',
+	组员1: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员2: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员3: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员4: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员5: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员6: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员7: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员8: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员9: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员10: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员11: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员12: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员13: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员14: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员15: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员16: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员17: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员18: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员19: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员20: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员21: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员22: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员23: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员24: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员25: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员26: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员27: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员28: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员29: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	组员30: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+  })
+
+
+	 // 获取当前日期
+	 const today = new Date();
+	  const year = today.getFullYear();
+	  const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+	  const day = String(today.getDate()).padStart(2, '0');
+	  const hours = String(today.getHours()).padStart(2, '0');
+	  const minutes = String(today.getMinutes()).padStart(2, '0');
+	  const seconds = String(today.getSeconds()).padStart(2, '0');
+	  const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+	  const currentDates = `${year}-${month}-${day}`;
+  
+  
+  const printPageRef = ref()
+  const userStore = useUserStore()
+  const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
+  defineOptions({
+	  name: 'Company'
+  })
+
+  const dbformData=ref({})
+
+
+  let JTMC=ref()
+  let CJMC=ref()
+
+  // 车间选项 - 固定四个选项
+const workshopOptions = ref([
+  { value: '印后糊盒车间', label: '印后糊盒车间' },
+  { value: '精品手工车间', label: '精品手工车间' },
+  { value: '精品自动化车间', label: '精品自动化车间' },
+  { value: '数字化车间', label: '数字化车间' }
+])
+
+// 其他选项
+const machineOptions = ref([])
+const processOptions = ref([])
+const workOrderOptions = ref([])
+
+// 工单缓存 - 存储所有已搜索的工单数据
+const workOrderCache = ref({})
+
+// 加载状态
+const workshopLoading = ref(false)
+const machineLoading = ref(false)
+const processLoading = ref(false)
+const workOrderLoading = ref(false)
+
+// 防抖计时器
+let debounceTimer = null
+let workOrderSearchTimer = null
+
+// 车间选择变化时的处理
+const handleWorkshopChange = async (selectedWorkshop) => {
+  console.log('选择的车间:', selectedWorkshop)
+  
+  if (!selectedWorkshop) {
+    // 清空相关数据和选择
+    machineOptions.value = []
+    processOptions.value = []
+    formData3.value.jtmc = ''
+    formData3.value.gxmc = ''
+    return
+  }
+  
+  // 防抖处理
+  if (debounceTimer) {
+    clearTimeout(debounceTimer)
+  }
+  
+  debounceTimer = setTimeout(async () => {
+    try {
+      workshopLoading.value = true
+      machineLoading.value = true
+      processLoading.value = true
+      
+      // 并行获取机台列表和工序列表
+      const [machineResponse, processResponse] = await Promise.all([
+        getMachineList({ search: selectedWorkshop }),
+        gitProcessList({ search: selectedWorkshop })
+      ])
+      
+      // 处理机台数据
+      if (machineResponse.code === 0) {
+        const machineData = machineResponse.data || {}
+        const formattedMachines = Object.entries(machineData).map(([key, value]) => ({
+          value: key, // 如 "HXH04#"
+          label: `${key}-${value}`, // 如 "HXH04#-征图2#小盒机"
+          machineName: value // 原始名称,备用
+        }))
+        
+        machineOptions.value = formattedMachines
+        
+        // 如果有数据,自动选择第一个机台
+        if (formattedMachines.length > 0) {
+          formData3.value.jtmc = formattedMachines[0].value
+        } else {
+          formData3.value.jtmc = ''
+          ElMessage.warning(`该车间暂无可用机台数据`)
+        }
+      } else {
+        ElMessage.error(machineResponse.msg || '获取机台数据失败')
+        machineOptions.value = []
+        formData3.value.jtmc = ''
+      }
+      
+      // 处理工序数据
+      if (processResponse.code === 0) {
+        const processData = processResponse.data || []
+        const formattedProcesses = processData.map(item => ({
+          value: item, // 如 "组装"
+          label: item // 显示名称
+        }))
+        
+        processOptions.value = formattedProcesses
+        
+        // 如果有数据,自动选择第一个工序
+        if (formattedProcesses.length > 0) {
+          formData3.value.gxmc = formattedProcesses[0].value
+          ElMessage.success(`已加载${selectedWorkshop}的${formattedProcesses.length}个工序`)
+        } else {
+          formData3.value.gxmc = ''
+          ElMessage.warning(`该车间暂无可用工序数据`)
+        }
+      } else {
+        ElMessage.error(processResponse.msg || '获取工序数据失败')
+        processOptions.value = []
+        formData3.value.gxmc = ''
+      }
+      
+    } catch (error) {
+      console.error('获取车间数据失败:', error)
+      ElMessage.error('获取数据失败,请检查网络或稍后重试')
+      machineOptions.value = []
+      processOptions.value = []
+      formData3.value.jtmc = ''
+      formData3.value.gxmc = ''
+    } finally {
+      workshopLoading.value = false
+      machineLoading.value = false
+      processLoading.value = false
+    }
+  }, 300) // 300ms防抖
+}
+
+// 机台选择变化时的处理
+const handleMachineChange = (selectedMachine) => {
+  console.log('选择的机台:', selectedMachine)
+  getGluingcoleData()
+  
+  if (!selectedMachine) return
+  
+  // 可以在这里添加机台选择后的其他逻辑
+  const selectedMachineInfo = machineOptions.value.find(item => item.value === selectedMachine)
+  if (selectedMachineInfo) {
+    console.log('机台详细信息:', selectedMachineInfo)
+  }
+}
+
+// 工单编号搜索方法
+const searchWorkOrders = async (query) => {
+  if (!query || query.trim() === '') {
+    workOrderOptions.value = []
+    return
+  }
+  
+  // 防抖处理
+  if (workOrderSearchTimer) {
+    clearTimeout(workOrderSearchTimer)
+  }
+  
+  workOrderSearchTimer = setTimeout(async () => {
+    try {
+      workOrderLoading.value = true
+      
+      // 如果缓存中有数据,先检查缓存
+      if (workOrderCache.value[query]) {
+        workOrderOptions.value = workOrderCache.value[query]
+        workOrderLoading.value = false
+        return
+      }
+      
+      const response = await getWorkOrderList({
+        search: query.trim()
+      })
+      
+      if (response.code === 0) {
+        const data = response.data || []
+        
+        // 格式化工单数据,去除重复的工单编号
+        const uniqueWorkOrders = []
+        const seenOrders = new Set()
+        
+        data.forEach(item => {
+          if (!seenOrders.has(item['工单编号'])) {
+            seenOrders.add(item['工单编号'])
+            uniqueWorkOrders.push({
+              value: item['工单编号'], // 工单编号作为value
+              label: item['工单编号'], // 显示格式
+              productName: item['产品名称'], // 产品名称存储
+              originalData: item // 原始数据备份
+            })
+          }
+        })
+        
+        workOrderOptions.value = uniqueWorkOrders
+        
+        // 缓存搜索结果
+        workOrderCache.value[query] = uniqueWorkOrders
+        
+        if (uniqueWorkOrders.length === 0) {
+          ElMessage.warning('未找到相关工单')
+        }
+      } else {
+        ElMessage.error(response.msg || '搜索工单失败')
+        workOrderOptions.value = []
+      }
+      
+    } catch (error) {
+      console.error('搜索工单失败:', error)
+      ElMessage.error('搜索失败,请检查网络或稍后重试')
+      workOrderOptions.value = []
+    } finally {
+      workOrderLoading.value = false
+    }
+  }, 500) // 500ms防抖
+}
+
+// 工单选择变化时的处理
+const handleWorkOrderChange = (selectedOrder) => {
+  console.log('选择的工单:', selectedOrder)
+  
+  if (!selectedOrder) {
+    formData3.value.product_name = ''
+    return
+  }
+  
+  // 找到选中的工单信息
+  const selectedWorkOrder = workOrderOptions.value.find(item => item.value === selectedOrder)
+  if (selectedWorkOrder) {
+	console.log('选择的工单:', selectedWorkOrder.originalData.工单编号)
+    // 自动填充产品名称
+    formData3.value.product_name = selectedWorkOrder.productName
+    console.log('工单详细信息:', selectedWorkOrder.originalData)
+    
+    // 可以在这里添加其他逻辑,比如根据工单获取更多信息
+  } else {
+    // 如果不在选项中,可能是手动输入的,清空产品名称
+    formData3.value.product_name = ''
+  }
+}
+
+// 页面加载时预加载常用工单(可选)
+onMounted(() => {
+  // 可以预加载一些常用工单
+  // searchWorkOrders('Y25')
+})
+
+// 如果需要,可以添加一个重置方法
+const resetForm = () => {
+  formData3.value = {
+    cjmc: '',
+    jtmc: '',
+    order: '',
+    product_name: '',
+    gxmc: ''
+  }
+  machineOptions.value = []
+  processOptions.value = []
+  workOrderOptions.value = []
+}
+
+// 获取当前选中的机台显示文本
+const getSelectedMachineLabel = () => {
+  if (!formData3.value.jtmc) return ''
+  const selectedMachine = machineOptions.value.find(item => item.value === formData3.value.jtmc)
+  return selectedMachine ? selectedMachine.label : formData3.value.jtmc
+}
+
+
+
+
+const getCurrentDate = async () => {
+const today = new Date();
+	  const year = today.getFullYear();
+	  const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+	  const day = String(today.getDate()).padStart(2, '0');
+	  const hours = String(today.getHours()).padStart(2, '0');
+	  const minutes = String(today.getMinutes()).padStart(2, '0');
+	  const seconds = String(today.getSeconds()).padStart(2, '0');
+	  const currentHour = today.getHours(); // 获取当前的小时
+	  let currentDate = `${year}-${month}-${day}`;
+const getTimelistss = await getTimelist();
+formData3.value.日期 = `${getTimelistss.data.date} 00:00:00`;
+formData3.value.下机时间 = getTimelistss.data.hours;
+if (currentHour < 8 || (currentHour === 8 && minutes < 30)) {
+				  // 如果当前时间早于08:30, 则设置为前一天的晚班时间20:30
+				  // 需要将日期减一天
+				  const yesterDay = new Date(today.getTime() - 86400000); // 减去一天的毫秒数
+				  const yearYesterday = yesterDay.getFullYear();
+				  const monthYesterday = String(yesterDay.getMonth() + 1).padStart(2, '0');
+				  const dayYesterday = String(yesterDay.getDate()).padStart(2, '0');
+				  formData3.value.上机时间 = `${yearYesterday}-${monthYesterday}-${dayYesterday} 20:00:00`;
+			  } else {
+				  // 如果当前时间晚于或等于08:30, 则设置为当天的白班时间08:30
+				  formData3.value.上机时间 = `${currentDate} 08:00:00`;
+			  }
+			}
+getCurrentDate();
+
+
+
+// 响应式数据
+const roleOptions = ref([]) // 角色下拉选项
+const gluingcoleData = ref({}) // 存储接口返回的完整数据
+const roleDisabled = ref(false) // 控制角色下拉框是否禁用,根据您的需求设置
+
+// 获取下拉框数据的方法
+const getGluingcoleData = async () => {
+  try {
+    const response = await getGluingcole({ machine: formData3.value.jtmc })
+    console.log('获取胶合角色数据:', response)
+    
+    if (response.code === 0) {
+      gluingcoleData.value = response.data
+      
+      // 处理角色选项:从role1到role10中过滤掉空值
+      roleOptions.value = []
+      for (let i = 1; i <= 10; i++) {
+        const roleKey = `role${i}`
+        const roleValue = response.data[roleKey]
+        if (roleValue && roleValue.trim() !== '') {
+          roleOptions.value.push({
+            label: roleValue,
+            value: roleValue,
+            // 存储对应比例字段的映射关系
+            rateMapping: {
+              rateKey: `rate${i}`, // 接口返回的比例字段名
+              formDataKey: `rate${i}` // formData3中的比例字段名
+            }
+          })
+        }
+      }
+      
+    //   // 如果需要初始化表单数据中的角色
+    //   initializeFormRoles(response.data)
+    }
+  } catch (error) {
+    console.error('获取胶合班组和角色数据失败:', error)
+  }
+}
+
+// 初始化表单角色数据(如果需要)
+const initializeFormRoles = (apiData) => {
+  // 根据接口数据初始化formData3中的角色
+  for (let i = 1; i <= 10; i++) {
+    const roleKey = `role${i}`
+    const memberKey = `组员${i}`
+    const roleValue = apiData[roleKey]
+    
+    if (roleValue && roleValue.trim() !== '' && formData3.value[memberKey]) {
+      formData3.value[memberKey]['角色'] = roleValue
+    }
+  }
+}
+
+// 角色选择变化事件处理
+const handleRoleChange = (memberNumber) => {
+  const memberKey = `组员${memberNumber}`
+  const selectedRole = formData3.value[memberKey]['角色']
+  
+  if (selectedRole && gluingcoleData.value) {
+    // 找到选中的角色对应的选项
+    const selectedOption = roleOptions.value.find(item => item.value === selectedRole)
+    
+    if (selectedOption && selectedOption.rateMapping) {
+      // 获取接口中对应的比例值
+      const apiRateValue = gluingcoleData.value[selectedOption.rateMapping.rateKey]
+      
+      // 设置到formData3对应的比例字段
+      if (apiRateValue !== undefined && formData3.value[memberKey]) {
+        formData3.value[memberKey]['比例'] = apiRateValue
+      }
+    }
+  }
+  
+  // 如果需要触发总比例更新
+//   updateTotal()
+}
+
+// 监听所有角色字段的变化(如果需要更全面的监听)
+watch(() => {
+  // 监听所有组员的角色字段变化
+  const watches = []
+  for (let i = 1; i <= 10; i++) {
+    const memberKey = `组员${i}`
+    if (formData3.value && formData3.value[memberKey]) {
+      watches.push(formData3.value[memberKey]['角色'])
+    }
+  }
+  return watches
+}, () => {
+  // 如果有需要可以在这里处理
+}, { deep: true })
+
+// // 更新总比例的方法(根据您的需求实现)
+// const updateTotal = () => {
+//   // 您的总比例计算逻辑
+//   console.log('比例已更新')
+// }
+
+// 初始化时获取数据
+onMounted(() => {
+  if (formData3.value.jtmc) {
+    getGluingcoleData()
+  }
+})
+
+
+
+
+
+
+
+
+
+
+const bzVisible = ref(false)
+const FPData = ref()
+const GYID = ref('')
+const BZID = ref('')
+let BZMC=ref()
+const bzenterDialog = (row) => {
+	getGluingClassLLists(formData3.value.jtmc)
+	bzVisible.value = true
+}
+
+const getGluingClassLLists = async (value) => {
+	console.log('222')
+	const listRes = await getGluingClassLList({ machine: value })
+      if (listRes.code === 0) {
+		BZMC.value=listRes.data[0].bz
+        FPData.value = listRes.data
+      }
+}
+
+const selectedRows = ref([]) // 用于存储选中的行
+
+// 修改 handleBzSelectionChange 函数来存储选中的行
+const handleBzSelectionChange = (selection) => {
+  console.log('选中的行:', selection)
+  selectedRows.value = selection
+}
+
+
+
+
+const handleBzConfirm = () => {
+	console.log('选中的班组数据:', selectedRows.value)
+  
+  if (!selectedRows.value || selectedRows.value.length === 0) {
+    console.warn('没有选中任何班组数据')
+    ElMessage.warning('请先选择班组数据')
+    return
+  }
+  
+  // 重置或初始化 formData3
+  // 如果需要重置所有组员数据
+  for (let i = 1; i <= 30; i++) {
+    const memberKey = `组员${i}`
+    if (!formData3.value[memberKey]) {
+      formData3.value[memberKey] = {
+        角色: '',
+        编号: '',
+        姓名: '',
+        比例: ''
+      }
+    } else {
+      formData3.value[memberKey]['角色'] = ''
+      formData3.value[memberKey]['编号'] = ''
+      formData3.value[memberKey]['姓名'] = ''
+      formData3.value[memberKey]['比例'] = ''
+    }
+  }
+  
+  // 当前要填充的组员起始索引
+  let currentMemberIndex = 1
+  
+  // 遍历选中的每个班组
+  selectedRows.value.forEach((row, rowIndex) => {
+    console.log(`处理第 ${rowIndex + 1} 个班组数据:`, row)
+    
+    // 遍历每个班组中的组员(最多15个)
+    for (let i = 1; i <= 15; i++) {
+      const bhKey = `bh${i}`
+      const nameKey = `name${i}`
+      
+      // 如果该组员有编号(非空且非null)
+      if (row[bhKey] && row[bhKey] !== null && row[bhKey] !== '') {
+        const memberKey = `组员${currentMemberIndex}`
+        
+        // 确保当前组员位置有效(不超过10个组员)
+        if (currentMemberIndex > 10) {
+          console.warn('超过最大组员数量10个,停止填充')
+          return // 或者使用 break 跳出循环
+        }
+        
+        // 填充数据到 formData3
+        formData3.value[memberKey]['角色'] = row.role || ''
+        formData3.value[memberKey]['比例'] = row.rate || ''
+        formData3.value[memberKey]['编号'] = row[bhKey] || ''
+        formData3.value[memberKey]['姓名'] = row[nameKey] || ''
+        
+        console.log(`填充 ${memberKey}:`, {
+          角色: row.role,
+          比例: row.rate,
+          编号: row[bhKey],
+          姓名: row[nameKey]
+        })
+        
+        currentMemberIndex++
+      }
+    }
+  })
+  
+  console.log('填充完成后的 formData3:', formData3.value)
+  bzVisible.value = false
+}
+
+
+
+
+
+  //键盘 input框跳转
+  const ent = (event,id1,id2,id3) => {
+  
+	if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+	  const idMap = {
+		 'bh1': '1',
+		 'bh2': '2',
+		 'bh3': '3',
+		 'bh4': '4',
+		 'bh5': '5',
+		 'bh6': '6',
+		 'bh7': '7',
+		 'bh8': '8',
+		 'bh9': '9',
+		 'bh10': '10',
+		 'bh11': '11',
+	   };
+	   if(id2 === '定额代号'){
+		getDedhsubmit();
+	   }
+	   if (idMap.hasOwnProperty(id2) && event.keyCode === 13) {
+		   getygsubmit('', idMap[id2]);
+		 }else if(id3!=''){
+		document.getElementById(id3).focus()
+	  }
+	} else if (event.keyCode === 38) { // 向上箭头
+	  if(id1!=''){
+		document.getElementById(id1).focus()
+	  }
+  //   }
+  //   else if (event.keyCode === 8) { // 删除箭头
+  //     if(id1!='' && document.getElementById(id2).value==''){
+  //       document.getElementById(id1).focus()
+  //     }
+  //     console.log(document.getElementById(id2).value)
+	}else if (event.keyCode === 37) { // 向左箭头
+	  if(id1!='' && document.getElementById(id2).selectionStart==0){
+		document.getElementById(id1).focus()
+	  }
+	}else if (event.keyCode === 39) { // 向右箭头
+	  if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
+		document.getElementById(id3).focus()
+	  }
+	}
+  }
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+  
+
+  //日报表上传
+  const chanliangenterDialog = async () => {
+	console.log(formData3.value)
+	const restoredData = {
+	  sczl_gdbh:formData3.value.order,
+	//   sczl_yjno:formData3.value.yjno,
+	//   sczl_gxh:formData3.value.gxh,
+	  sczl_gxmc: formData3.value.gxmc,
+		来料数量: formData3.value.来料数量,
+		sczl_cl: formData3.value.产量,
+		sczl_zcfp: formData3.value.制程废品,
+		startTime: formData3.value.上机时间,
+		endTime: formData3.value.下机时间,
+		sczl_rq: formData3.value.日期,
+		sczl_ls: formData3.value.Gy0_ls,
+		sczl_dedh: formData3.value.定额代号,
+		工价系数:formData3.value.工价系数 || 0,
+		保养工时:formData3.value.保养工时 || 0,
+		装版工时:formData3.value.装版工时 || 0,
+		异常工时:formData3.value.异常工时 || 0,
+		异常类型:formData3.value.异常类型 || '',
+		设备运行工时:formData3.value.通电工时 || 0,
+		sys_id: userStore.userInfo.nickName,
+		sczl_jtbh: formData3.value.jtmc,
+		bh1: formData3.value.组员1['编号'],
+		bh2: formData3.value.组员2['编号'],
+		bh3: formData3.value.组员3['编号'],
+		bh4: formData3.value.组员4['编号'],
+		bh5: formData3.value.组员5['编号'],
+		bh6: formData3.value.组员6['编号'],
+		bh7: formData3.value.组员7['编号'],
+		bh8: formData3.value.组员8['编号'],
+		bh9: formData3.value.组员9['编号'],
+		bh10: formData3.value.组员10['编号'],
+		bh11: formData3.value.组员11['编号'],
+		bh12: formData3.value.组员12['编号'],
+		bh13: formData3.value.组员13['编号'],
+		bh14: formData3.value.组员14['编号'],
+		bh15: formData3.value.组员15['编号'],
+		bh16: formData3.value.组员16['编号'],
+		bh17: formData3.value.组员17['编号'],
+		bh18: formData3.value.组员18['编号'],
+		bh19: formData3.value.组员19['编号'],
+		bh20: formData3.value.组员20['编号'],
+		bh21: formData3.value.组员21['编号'],
+		bh22: formData3.value.组员22['编号'],
+		bh23: formData3.value.组员23['编号'],
+		bh24: formData3.value.组员24['编号'],
+		bh25: formData3.value.组员25['编号'],
+		bh26: formData3.value.组员26['编号'],
+		bh27: formData3.value.组员27['编号'],
+		bh28: formData3.value.组员28['编号'],
+		bh29: formData3.value.组员29['编号'],
+		bh30: formData3.value.组员30['编号'],
+		rate1: formData3.value.组员1['比例'],
+		rate2: formData3.value.组员2['比例'],
+		rate3: formData3.value.组员3['比例'],
+		rate4: formData3.value.组员4['比例'],
+		rate5: formData3.value.组员5['比例'],
+		rate6: formData3.value.组员6['比例'],
+		rate7: formData3.value.组员7['比例'],
+		rate8: formData3.value.组员8['比例'],
+		rate9: formData3.value.组员9['比例'],
+		rate10: formData3.value.组员10['比例'],
+		rate11: formData3.value.组员11['比例'],
+		rate12: formData3.value.组员12['比例'],
+		rate13: formData3.value.组员13['比例'],
+		rate14: formData3.value.组员14['比例'],
+		rate15: formData3.value.组员15['比例'],
+		rate16: formData3.value.组员16['比例'],
+		rate17: formData3.value.组员17['比例'],
+		rate18: formData3.value.组员18['比例'],
+		rate19: formData3.value.组员19['比例'],
+		rate20: formData3.value.组员20['比例'],
+		rate21: formData3.value.组员21['比例'],
+		rate22: formData3.value.组员22['比例'],
+		rate23: formData3.value.组员23['比例'],
+		rate24: formData3.value.组员24['比例'],
+		rate25: formData3.value.组员25['比例'],
+		rate26: formData3.value.组员26['比例'],
+		rate27: formData3.value.组员27['比例'],
+		rate28: formData3.value.组员28['比例'],
+		rate29: formData3.value.组员29['比例'],
+		rate30: formData3.value.组员30['比例'],
+	}
+	console.log(restoredData)
+//   return;
+  //   4.2日产量上报 添加
+	const response = await AddGluingReportData(restoredData);
+	console.log(response)
+	if (response.code === 0) {
+		ElMessage({
+			type: '',
+			dangerouslyUseHTMLString: true,
+			// duration: 0,  // 不自动关闭
+			message: '<strong style="font-size: 71px; color: black; background-color: #80FA80; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">报工成功</strong>',
+			customClass: 'custom-warning-message'
+		});
+	}else{
+	  ElMessage({
+	type: '',
+	dangerouslyUseHTMLString: true,
+  //   duration: 0,  // 不自动关闭
+	message: '<strong style="font-size: 71px; color: white; background-color: red; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">报工失败</strong>',
+	customClass: 'custom-warning-message'
+  });	
+	}
+  }
+  
+  
+
+
+  const blModellist = ref(false);
+const employeeDatalist = ref('');
+const memberIds = ref({}); // 存储已填写的编号用于查重
+
+// 检查编号是否重复的方法
+const checkDuplicateId = (id, currentKey) => {
+  if (!id || id.trim() === '') return { isDuplicate: false };
+  
+  for (let i = 1; i <= 30; i++) {
+    if (i.toString() === currentKey) continue;
+    
+    const compareKey = `组员${i}`;
+    const compareId = formData3.value[compareKey]?.['编号'];
+    
+    if (compareId && compareId === id) {
+      return { isDuplicate: true, duplicateMember: i };
+    }
+  }
+  return { isDuplicate: false };
+};
+
+const GetYg = async (event, key) => {
+  const bzyg = `组员${key}`;
+  const bzxm = `组员${key}`;
+  const bh = formData3.value[bzyg]['编号'];
+  
+  // 功能1:如果编号为空,清空对应数据
+  if (!bh || bh.trim() === '') {
+    formData3.value[bzyg]['姓名'] = '';
+    formData3.value[bzyg]['角色'] = '';
+    delete memberIds.value[key];
+    return;
+  }
+  
+  // 功能2:检查编号是否重复
+  const duplicateCheck = checkDuplicateId(bh, key);
+  if (duplicateCheck.isDuplicate) {
+    ElMessage.error(`编号 ${bh} 已被组员${duplicateCheck.duplicateMember}使用,请勿重复填写!`);
+    formData3.value[bzyg]['编号'] = '';
+    formData3.value[bzyg]['姓名'] = '';
+    formData3.value[bzyg]['角色'] = '';
+    return;
+  }
+  
+  const response = await getYg({sczl_bh: bh});
+  
+  if (response.code === 0) {
+    if (response.data.length === 1) {
+      formData3.value[bzxm]['姓名'] = response.data[0].ygxm;
+      formData3.value[bzyg]['编号'] = response.data[0].员工编号;
+      // 存储已填写的编号
+      memberIds.value[key] = response.data[0].员工编号;
+    } else {
+      console.log('打开')
+      blModellist.value = true;
+      employeeDatalist.value = response.data;
+    }
+  }
+};
+
+// 监听formData3的变化,实时清空功能
+watch(() => formData3.value, (newVal) => {
+  for (let i = 1; i <= 10; i++) {
+    const key = `组员${i}`;
+    const bh = newVal[key]?.['编号'];
+    
+    if (!bh || bh.trim() === '') {
+      if (newVal[key]) {
+        newVal[key]['姓名'] = '';
+        // newVal[key]['角色'] = '';
+        delete memberIds.value[i];
+      }
+    }
+  }
+}, { deep: true });
+
+
+const clickeds = ref(false)
+const currentIndexs  = ref(0);
+const tableBZRRs  = ref();
+// 模拟点击某一行
+const setCurrents = (row) => {
+  setTimeout(() => {
+    tableBZRRs .value?.setCurrentRow(row); // 高亮选中当前行
+    const { 员工编号, ygxm } = row;
+    console.log("选中行数据:", row);
+  });
+};
+// 键盘事件处理逻辑
+const selectBZRRs = (event) => {
+  if (event.keyCode === 40) {
+    // 向下箭头
+    event.preventDefault();
+    event.stopPropagation(); // 阻止事件冒泡
+    if (currentIndexs.value < employeeDatalist.value.length - 1) {
+      currentIndexs.value++;
+    } else {
+      currentIndexs.value = 0;
+    }
+  } else if (event.keyCode === 38) {
+    // 向上箭头
+    event.preventDefault();
+    event.stopPropagation(); // 阻止事件冒泡
+    if (currentIndexs.value > 0) {
+      currentIndexs.value--;
+    } else {
+      currentIndexs.value = employeeDatalist.value.length - 1;
+    }
+  } else if (event.keyCode === 13) {
+    // 回车键
+    event.preventDefault();
+    event.stopPropagation(); // 阻止事件冒泡
+    
+    const row = employeeDatalist.value[currentIndexs.value];
+    if (row) {
+      tablebllickHandlerlist(row);
+    }
+    return; // 直接返回,不执行后面的 setCurrents
+  }
+  
+  setCurrents(employeeDatalist.value[currentIndexs.value]);
+};
+
+// 表格行点击事件处理
+const tablebllickHandlerlist = async (row, column, event) => {
+  // 如果是事件对象(来自行点击),提取 row 数据
+  const actualRow = row?.员工编号 ? row : column;
+  
+  // 检查点击锁
+  if (clickeds.value) {
+    console.log('点击锁已激活,跳过处理');
+    return;
+  }
+  
+  // 立即设置点击锁
+  clickeds.value = true;
+  
+  try {
+    let nextIndex = 1;
+    // 检查每个组员是否有空位
+    while (formData3.value[`组员${nextIndex}`]['编号'] !== '' && 
+           formData3.value[`组员${nextIndex}`]['姓名'] !== '') {
+      nextIndex++;
+      if (nextIndex > 30) {
+        ElMessage.warning('所有组员字段已填满!');
+        return;
+      }
+    }
+    
+    // 在填充数据之前,检查当前组员编号是否包含字母,如果包含字母,则清空该组员的编号和姓名
+    const current编号 = formData3.value[`组员${nextIndex}`]['编号'];
+    if (/[a-zA-Z]/.test(current编号)) {
+      formData3.value[`组员${nextIndex}`]['编号'] = "";
+      formData3.value[`组员${nextIndex}`]['姓名'] = "";
+    }
+    
+    // 检查选择的员工编号是否已经存在
+    const isDuplicate = checkDuplicateInTablebllickHandlerlist(actualRow.员工编号, nextIndex.toString());
+    if (isDuplicate) {
+      ElMessage.error(`员工 ${actualRow.ygxm} (编号: ${actualRow.员工编号}) 已被其他组员选择!`);
+      // 延迟释放点击锁
+      setTimeout(() => {
+        clickeds.value = false;
+      }, 300);
+      return;
+    }
+    
+    // 填充数据
+    formData3.value[`组员${nextIndex}`]['编号'] = actualRow.员工编号;
+    formData3.value[`组员${nextIndex}`]['姓名'] = actualRow.ygxm;
+    // 更新memberIds
+    memberIds.value[nextIndex] = actualRow.员工编号;
+    
+    // 关键:使用 setTimeout 确保数据更新完成后再关闭弹窗
+    setTimeout(() => {
+      console.log('关闭')
+      blModellist.value = false;
+      employeeDatalist.value = []; // 清空数据,避免再次触发
+      currentIndexs.value = 0; // 重置索引
+    }, 0);
+    
+  } finally {
+    // 延迟释放点击锁,防止短时间内重复点击
+    setTimeout(() => {
+      clickeds.value = false;
+    }, 300);
+  }
+};
+
+// 专门用于tablebllickHandlerlist方法的重复检查
+const checkDuplicateInTablebllickHandlerlist = (employeeId, currentIndex) => {
+  if (!employeeId) return false;
+  
+  // 检查除了当前index之外的所有组员
+  for (let i = 1; i <= 30; i++) {
+    if (i.toString() === currentIndex) continue;
+    
+    const compareKey = `组员${i}`;
+    const compareId = formData3.value[compareKey]?.['编号'];
+    
+    if (compareId && compareId === employeeId) {
+      return true;
+    }
+  }
+  return false;
+};
+
+
+//键盘事件
+const handleTreeKeydown = (event) => {
+  const tree = table_fplb.value; // 获取树实例
+  if (!tree) {
+	console.error("树组件未加载");
+	return;
+  }
+
+  const focusedElement = document.activeElement;
+  const focusedNodeId = focusedElement?.getAttribute("data-key"); // 获取 DOM 的 data-key 属性
+
+  if (event.keyCode === 13 && focusedNodeId) { // 判断是否是回车键
+	tree.setCurrentKey(focusedNodeId); // 设置当前节点为选中
+	tree.$nextTick(() => {
+	  const currentNode = tree.getCurrentNode(); // 获取当前选中的节点
+	  if (!currentNode) {
+		console.warn("没有选中的节点");
+		return;
+	  }
+	// 清除上一次的选中状态
+	clearPreviousSelection(tree);
+	  // 收起所有其他节点
+	  Object.keys(tree.store.nodesMap).forEach((key) => {
+		tree.store.nodesMap[key].expanded = false; // 收起所有节点
+	  });
+
+	  // 展开当前节点
+	  tree.store.nodesMap[currentNode.id].expanded = true;
+
+	  // 如果当前节点有子节点,选中第一个子节点
+	  if (currentNode.children && currentNode.children.length > 0) {
+		const firstChild = currentNode.children[0];
+		if (firstChild) {
+		  const firstChildKey = firstChild.id.toString();
+		  tree.setCurrentKey(firstChildKey); // 设置第一个子节点为选中
+		  setTimeout(() => {
+			const firstChildDom = tree.$el.querySelector(`[data-key="${firstChildKey}"]`);
+			if (firstChildDom) {
+			  firstChildDom.focus();
+			  firstChildDom.scrollIntoView({ block: "nearest" });
+			}
+		  });
+		}
+	  } else {
+		console.log("当前子节点:", currentNode.label);
+	  // 如果节点没有子节点,打印节点名称
+	  JPformdata['定额代号'] = currentNode.label.split("【")[0];
+	  GetDedhVisible.value = false;
+	  }
+	});
+  } else if (event.keyCode === 38 || event.keyCode === 40) { // 上下箭头键
+	const currentNode = tree.getCurrentNode();
+	if (currentNode) {
+	  const currentNodeDom = tree.$el.querySelector(`[data-key="${currentNode.id}"]`);
+	  if (currentNodeDom) {
+		currentNodeDom.focus();
+	  }
+	}
+  }
+};
+
+// 清除之前的选中状态
+const clearPreviousSelection = (tree) => {
+  const selectedNodes = tree.getCheckedNodes();
+  selectedNodes.forEach(node => {
+	tree.setChecked(node, false);
+  });
+  tree.setCurrentKey(null);
+};
+
+// // 弹出框键盘事件
+// const ent = (event) => {
+//   if (document.activeElement.id === "tableFplb") {
+// 	if (table_fplb.value) {
+// 	  const tree = table_fplb.value?.$el;
+// 	  if (tree) {
+// 		const node = tree.querySelector("[data-key]");
+// 		if (event.keyCode === 13) {
+// 		  // GetDedhVisible.value = false;
+// 		}
+// 		if (node) {
+// 		  node.scrollIntoView({ block: "nearest" }); // 确保节点可见
+// 		  node.focus(); // 确保焦点正确
+// 		}
+// 	  }
+// 	}
+//   }
+// };
+
+//点击事件
+const handleFplbClick = (nodeData, node, component) => {
+  //存放当前节点的nodeId
+  if (!nodeData.children || nodeData.children.length === 0) {
+	// 如果节点没有子节点,打印节点名称
+	JPformdata['定额代号']= nodeData.label.split("【")[0];
+	dbformData.value.定额代号 = nodeData.label.split("【")[0];
+	GetDedhVisible.value = false;
+  }
+};
+
+
+const dialogFormVisible = ref(false);
+const detailData = ref({})
+const ontimeForm = () => {
+  console.log('计时上传')
+  
+  // 设置日期
+  detailData.value.wgjs_rq = formData3.value.日期.split(' ')[0];
+  
+  // 将 formData3 中的 1-6 号员工数据赋值到 detailData
+  for (let i = 1; i <= 6; i++) {
+    // 获取组员数据,例如:formData3.value.组员1['编号']、formData3.value.组员1['姓名']
+    const memberData = formData3.value[`组员${i}`];
+    
+    if (memberData) {
+      // 赋值编号和姓名到 detailData
+      detailData.value[`wgjs_bh${i}`] = memberData['编号'] || '';
+      detailData.value[`name${i}`] = memberData['姓名'] || '';
+    } else {
+      // 如果没有对应组员数据,清空相关字段
+      detailData.value[`wgjs_bh${i}`] = '';
+      detailData.value[`name${i}`] = '';
+    }
+  }
+  
+  console.log('赋值后的 detailData:', detailData.value)
+  dialogFormVisible.value = true;
+}
+
+	// 更新数据
+	const enterDialog = async () => {
+			addDetailData()
+	}
+// 新增
+const addDetailData = async () => {
+  try {
+    // 1. 构建干净的 restoredData 对象
+    const restoredData = {
+      wgjs_rq: detailData.value.wgjs_rq || '',
+      sys_id: sys_id || ''
+    };
+    
+    // 添加员工数据,只添加有值的字段(避免传输大量空值)
+    for (let i = 1; i <= 6; i++) {
+      const bh = detailData.value[`wgjs_bh${i}`];
+      const js = detailData.value[`wgjs_js${i}`];
+      const yy = detailData.value[`wgjs_yy${i}`];
+      
+      // 只有当任意一个字段有值时,才添加这组数据
+      if (bh || js || yy) {
+        restoredData[`wgjs_bh${i}`] = bh || '';
+        restoredData[`wgjs_js${i}`] = js || '';
+        restoredData[`wgjs_yy${i}`] = yy || '';
+      } else {
+        // 如果都是空值,也可以选择不添加这些字段
+        restoredData[`wgjs_bh${i}`] = '';
+        restoredData[`wgjs_js${i}`] = '';
+        restoredData[`wgjs_yy${i}`] = '';
+      }
+    }
+    
+    console.log('提交的数据:', restoredData);
+    
+    const res = await GcAdd(restoredData)
+    if (res.code === 0) {
+      ElMessage({ 
+        type: 'success', 
+        message: '新增成功' 
+      });
+      
+      // 清空表单数据
+      clearFormData();
+      
+      dialogFormVisible.value = false;
+    } else {
+      ElMessage.error(res.msg || '新增失败');
+    }
+  } catch (error) {
+    console.error('新增数据错误:', error);
+    ElMessage.error('请求失败,请检查网络或联系管理员');
+  }
+};
+
+// 清空表单数据的函数
+const clearFormData = () => {
+  // 清空日期
+  detailData.value.wgjs_rq = '';
+  
+  // 清空所有员工字段
+  for (let i = 1; i <= 6; i++) {
+    detailData.value[`wgjs_bh${i}`] = '';
+    detailData.value[`name${i}`] = '';
+    detailData.value[`wgjs_js${i}`] = '';
+    detailData.value[`wgjs_yy${i}`] = '';
+  }
+};
+  
+const closeDialog = () => {
+  dialogFormVisible.value = false;
+};
+  
+  </script>
+  <style scoped>
+  /* 设备作业清单 正在生产中 背景颜色 */
+  :deep(.status-plan-usage-low ) {
+	background: yellow !important;
+  }
+	  
+  .JKWTree-container {
+	display: flex;
+  }
+  
+  .JKWTree-tree {
+	width: 300px;
+	background-color: #fff;
+	padding: 10px;
+	margin-right: 20px;
+  }
+  
+  .JKWTree-tree h3 {
+	font-size: 15px;
+	font-weight: 700;
+	margin: 10px 0;
+  }
+  
+  .JKWTree-content {
+	flex: 1;
+  }
+  .groupbox
+		{margin:10px;
+		width:500px;
+		height:500px;
+	   border:thin solid black;
+	   padding:10px}
+	.grouptitle
+		{display:block;
+	   margin-top:-24px;
+	   margin-left:20px;
+	   width:150px;
+	   text-align:center;
+	   background-color:white}
+	   .gva-search-box{
+		  font-size:1.5vh;
+		  color:red;
+		  font-weight: bold;
+	   }
+	   .bt {
+		 margin-top: 1vh;
+		 margin-bottom: 10px;
+		 height: 5vh;
+		 width: 9vh;
+		 font-size:1.6vh;
+		 color:black;
+		 font-weight: bold;
+	   }
+		.gva-table-box{
+		 font-size: 15px;
+	  }
+	  .red-input input {
+		  color: red !important;
+		  }
+  
+  .buleaa-input input{
+	color: red !important;
+  }
+  /*!* 流程单查询按钮颜色控制未完成*/
+  :deep(.custom-button.el-button--info) {
+	  background-color: palegreen !important;
+	color: #155724;
+	font-size: 20px;
+	border-color: #c3e6cb;
+  }
+  /* 已完成 */
+  :deep(.custom-button.el-button--danger) {
+	  background-color: rgb(236, 135, 135) !important;
+	color: #721c24;
+	font-size: 20px;
+	border-color: #f5c6cb;
+  }
+  
+  
+  /*!* 选中某行时的背景色*!font-weight: bold;*/
+  :deep(.el-table__body tr.current-row)>td {
+	background: #ff80ff !important;
+  }
+  /*input*/
+  ::v-deep .el-input__inner {
+	color: #000000 !important;
+	font-weight: bold;
+  }
+  ::v-deep .el-input__wrapper {
+	border: 1px #00000b8f solid !important;
+  }
+  ::v-deep .el-form-item__label {
+	color: #000000 !important;
+	font-weight: bold;
+	font-size: 12px;
+  }
+  ::v-deep .el-tabs__item {
+	/*color: #000000 !important;*/
+	font-weight: bold;
+  }
+  ::v-deep .el-dialog__headerbtn {
+	width: 100px;
+	height: 85px;
+  }
+  ::v-deep .el-tabs__item {
+	/*background-color: #4d70ff;*/
+	/*color: white;*/
+  }
+  :deep(.plan-usage-low div) {
+	color: blue !important;
+	font-size: 16px;
+	font-weight: bold;
+  }
+  ::v-deep  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
+	color: white;        /* 文字颜色 */
+	background-color: #4d70ff; /* 背景颜色 */
+  }
+  /*::v-deep .el-table__header .el-table_2_column_3{*/
+  /*  border-right: 2px #000000 solid;*/
+  /*}*/
+  ::v-deep .el-table__header .el-table_2_column_3{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_4{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_5{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_6{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_7{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_8{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_9{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_10{
+	border-right: 2px #000000 solid;
+  }
+  ::v-deep .el-table__header .el-table_2_column_11{
+	border-right: 2px #000000 solid;
+  }
+  
+  /*::v-deep .el-table_2_column_3{*/
+  /*  border-right: 1px #000000 solid;*/
+  /*}*/
+  /*::v-deep .el-table_2_column_4{*/
+  /*  border-right: 1px #000000 solid;*/
+  /*}*/
+  :deep(.plan-usage-low div) {
+	color: blue !important;
+	font-size: 16px;
+	font-weight: bold;
+  }
+  /* tree组件背景高亮 */
+:deep(.el-tree-node:focus > .el-tree-node__content){
+		background: #ff80ff !important;
+}
+  
+  :deep(.my-custom-messagebox) {
+	background-color: #ff0000 !important; /* 背景色 */
+	
+	/* 标题样式 */
+	.el-message-box__title {
+	  color: #1e90ff !important;
+	  font-size: 20px !important;
+	}
+	
+	/* 内容样式 */
+	.el-message-box__content {
+	  color: #df1e1e !important;
+	  font-size: 16px !important;
+	}
+	
+	/* 按钮样式 */
+	.el-message-box__btns .el-button {
+	  font-size: 14px !important;
+	}
+  }
+
+  /* 表不格选中表变文字字体 */
+:deep(.el-table td .cell) {
+	color: blue;
+	font-size: 12px;
+}
+/* 表格选中表变文字字体 */
+:deep(.el-table__body tr.current-row)>td .el-tooltip  {
+	font-size: 16px;
+	color: black;
+}
+/* 默认表格边框 */
+:deep(.el-table__body td.el-table__cell) {
+	border: 1px solid #000000;
+}
+
+  </style>

+ 1000 - 0
src/view/yunyin/huheguanli/huhetiming.vue

@@ -0,0 +1,1000 @@
+<template>
+	<div>
+		<!--    左侧树侧形结构-->
+		<el-container>
+			<layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;">
+				<div class="JKWTree-tree" style="height: 70vh;">
+					<h3>计件工计时单维护</h3>
+					<el-tree :data="treeData" highlight-current="true" @node-click="handleNodeClick" />
+				</div>
+
+			</layout-sider>
+			<el-container>
+				<el-main>
+					<!-- 按钮 -->
+					<div class="gva-table-box">
+						<el-form>
+							<el-form-item>
+								<!-- <el-input v-model="searchInfo" placeholder="搜索产品编号或产品名称" clearable style="width: 180px;" />
+								<el-button type="primary" icon="Search" class="search" @click="handleSearch" /> -->
+								<el-button type="primary" icon="edit" class="bt" @click="handleShowDetail">查改 </el-button>
+								<el-button type="primary" icon="plus" class="bt" @click="handleShowAdd">新增 </el-button>
+								<el-button type="primary" class="bt" icon="delete" @click="onDel">删除</el-button>
+								<el-button type="primary" class="bt" icon="Download" @click="exportToExcel">导出到Excel</el-button>
+
+							</el-form-item>
+						</el-form>
+						<!-- 数据展示 -->
+						<el-table ref="table" style="width: 100%;height: 62vh;" tooltip-effect="dark" :data="tableData" row-key="ID"
+							highlight-current-row border show-overflow-tooltip="true" :row-style="{ height: '20px' }"
+							:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+							:header-cell-style="{ padding: '0px' }" @selection-change="handleSelectionChange"
+							@row-dblclick="handleShowDetail" @row-click="Click"
+							@current-change="(row, oldRow) => { currentRow = row}">
+							<!-- 循环渲染列 -->
+							<el-table-column v-for=" column in tableColumns " :key="column.prop" :prop="column.prop"
+								:label="column.label" :width="column.width" sortable />
+
+						</el-table>
+						<!-- 分页 -->
+						<div class="gva-pagination">
+							<el-pagination v-model:current-page="page" v-model:page-size="limit"
+								layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 30, 50, 100]"
+								:total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+						</div>
+					</div>
+					<!-- 弹出框 -->
+					<div>
+						<!-- 弹出框 -->
+						<el-dialog v-model="dialogFormVisible" :before-close="closeDialog"
+							:title="type === 'add' ? '新增' : '修改'" destroy-on-close width="800px">
+							<!-- <el-scrollbar height="500px"> -->
+							<el-form id="detail-form" ref="elFormRef" :model="detailData" label-position="left"
+								@keyup="moveFocus">
+
+								<!-- 日期 -->
+								<el-row>
+									<el-form-item label="日期" prop="name">
+										<el-input type="date" max="9999-12-31" id="riqi" v-model="detailData.wgjs_rq"
+											style="width: 100px;" />
+									</el-form-item>
+								</el-row>
+
+								<!-- 标题栏 -->
+								<el-row :gutter="10">
+									<el-col :span="3"> <span>员工编号</span> </el-col>
+									<el-col :span="3"> <span>员工姓名</span> </el-col>
+									<el-col :span="3"> <span>计时</span> </el-col>
+									<el-col :span="12"> <span>原因备注</span> </el-col>
+								</el-row>
+
+								<!-- 员工1 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh1" id="bh" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name1" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js1" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy1">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工2 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh2" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name2" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js2" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy2">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工3 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh3" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name3" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js3" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy3">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工4 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh4" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name4" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js4" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy4">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工5 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh5" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name5" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js5" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy5">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+								<!-- 员工6 -->
+								<el-row :gutter="5" style="margin-top: 10px;">
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_bh6" :formatter="val => val.toUpperCase()"
+											placeholder="Enter回车" />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.name6" readonly />
+									</el-col>
+									<el-col :span="3">
+										<el-input v-model="detailData.wgjs_js6" />
+									</el-col>
+									<el-col :span="12">
+										<el-select v-model="detailData.wgjs_yy6">
+											<el-option label="" value="" />
+											<el-option label="换型清场" value="换型清场" />
+											<el-option label="异常工时" value="异常工时" />
+											<el-option label="设备维修" value="设备维修" />
+											<el-option label="设备保养" value="设备保养" />
+										</el-select>
+									</el-col>
+								</el-row>
+
+							</el-form>
+
+							<template #footer>
+								<div class="dialog-footer">
+									<el-button @click="closeDialog">取 消</el-button>
+									<el-button type="primary" @click="enterDialog">确 定</el-button>
+								</div>
+							</template>
+						</el-dialog>
+						
+						<!-- 员工选择 -->
+						<el-dialog v-model="dialogSelectVisible_Yg" title="选择" destroy-on-close width="300px"
+							@keydown="selectGX_Yg($event)">
+							<el-table tooltip-effect="dark" :data="selectData_Yg" row-key="ID" highlight-current-row="true"
+								border style="width:100%" @row-dblclick="handleSelectClick_Yg" ref="table_Yg">
+								<el-table-column prop="员工编号" label="员工编号" width="100" />
+								<el-table-column prop="ygxm" label="员工姓名" width="200" />
+							</el-table>
+						</el-dialog>
+
+					</div>
+				</el-main>
+			</el-container>
+		</el-container>
+	</div>
+</template>
+
+<script setup>
+	// 全量引入格式化工具 请按需保留
+	import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import LuckyExcel from 'luckyexcel';
+	import {
+		Layout,
+		LayoutContent,
+		LayoutHeader,
+		LayoutSider
+	} from '@arco-design/web-vue'
+	import {
+		ElMessage,
+		ElMessageBox,
+		dayjs
+	} from 'element-plus'
+	import {ref,reactive} from 'vue'
+	import {getSide,getTable,getDetail,updateData,getLocate,createData,getYg,deleteData} from '@/api/mes_api_gty/timesheet'
+	import {GcgetTab,GcList,GcDetail,GcAdd,GcEdit,GcDel, RcEdit } from '@/api/mes/huhejob'
+	import {useUserStore} from '@/pinia/modules/user'
+	const userStore = useUserStore()
+	const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
+	defineOptions({name: '08Timesheet'})
+	// 侧边栏数据请求
+	const treeData = reactive([])
+	const getSideData = async () => {
+		const response = await GcgetTab()
+		if (response.code === 0) {
+			const transformedData = response.data.map(item => ({
+				label: item.date,
+				params: {
+					date: item.date.substring(0, 4) + '-' + item.date.substring(4),
+				},
+			}))
+			treeData.splice(0, treeData.length, ...transformedData)
+		}
+	}
+	getSideData()
+
+	const elFormRef = ref()
+	// const elSearchFormRef = ref()
+
+	// ============== 表格页面 ==============
+	const tableColumns = [{
+			prop: 'wgjs_rq',
+			label: '日期',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh1',
+			label: '员工编号1',
+			width: 115
+		},
+		{
+			prop: 'name1',
+			label: '姓名1',
+			width: 100
+		},
+		{
+			prop: 'department',
+			label: '所在部门',
+			width: 120
+		},
+		{
+			prop: 'wgjs_js1',
+			label: '计时1',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy1',
+			label: '原因1',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh2',
+			label: '员工编号2',
+			width: 120
+		},
+		{
+			prop: 'name2',
+			label: '姓名2',
+			width: 100
+		},
+		{
+			prop: 'wgjs_js2',
+			label: '计时2',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy2',
+			label: '原因2',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh3',
+			label: '员工编号3',
+			width: 120
+		},
+		{
+			prop: 'name3',
+			label: '姓名3',
+			width: 100
+		},
+		{
+			prop: 'wgjs_js3',
+			label: '计时3',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy3',
+			label: '原因3',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh4',
+			label: '员工编号4',
+			width: 120
+		},
+		{
+			prop: 'name4',
+			label: '姓名4',
+			width: 100
+		},
+		{
+			prop: 'wgjs_js4',
+			label: '计时4',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy4',
+			label: '原因4',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh5',
+			label: '员工编号5',
+			width: 120
+		},
+		{
+			prop: 'name5',
+			label: '姓名5',
+			width: 120
+		},
+		{
+			prop: 'wgjs_js5',
+			label: '计时5',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy5',
+			label: '原因5',
+			width: 100
+		},
+		{
+			prop: 'wgjs_bh6',
+			label: '员工编号6',
+			width: 120
+		},
+		{
+			prop: 'name6',
+			label: '姓名6',
+			width: 100
+		},
+		{
+			prop: 'wgjs_js6',
+			label: '计时6',
+			width: 100
+		},
+		{
+			prop: 'wgjs_yy6',
+			label: '原因6',
+			width: 100
+		},
+	]
+	const table = ref(null)
+	const tableData = reactive([])
+	const page = ref(1)
+	const total = ref(0)
+	const limit = ref(50)
+	const searchInfo = ref('')
+	const params = {
+		date: '',
+		search: '',
+		type: '',
+	}
+
+	const getTableData = async (params) => {
+		const response = await GcList(params)
+		if (response.code === 0) {
+			total.value = response.data.total
+			tableData.splice(0, tableData.length, ...response.data.rows)
+			table.value?.setCurrentRow(tableData[0])
+		}
+	}
+
+	// 搜索
+	const getLocateData = async (params) => {
+		const res = await getLocate(params)
+		if (res.code === 0) {
+			total.value = res.data.total
+			tableData.splice(0, tableData.length, ...res.data.rows)
+			table.value?.setCurrentRow(tableData[0])
+		}
+	}
+
+	// 分页设置
+	const handleSizeChange = () => {
+		switch (params.type) {
+			case 'getTableData':
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+				break
+			case 'getLocateData':
+				getLocateData({
+					date: params.date.replace('-', ''),
+					search: params.search,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+				break
+			default:
+				break
+		}
+	}
+
+	// 页面跳转
+	const handleCurrentChange = () => {
+		switch (params.type) {
+			case 'getTableData':
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+				break
+			case 'getLocateData':
+				getLocateData({
+					date: params.date.replace('-', ''),
+					search: params.search,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+				break
+			default:
+				break
+		}
+	}
+
+	const handleNodeClick = (node, check) => {
+		if (node.params) {
+			params.date = node.params.date
+			params.type = 'getTableData'
+			page.value = 1
+			handleCurrentChange()
+		}
+	}
+
+	// 搜索
+	function handleSearch() {
+		params.search = searchInfo.value
+		params.type = 'getLocateData'
+		page.value = 1
+		handleCurrentChange()
+	}
+
+	// ============== 详情页面 ==============
+	const detailData = reactive({})
+	const currentRow = ref()
+
+	// 行为控制标记(弹窗内部需要增还是改)
+	const type = ref('')
+	// 弹窗控制标记
+	const dialogFormVisible = ref(false)
+
+	// 查改
+	const handleShowDetail = async () => {
+		type.value = 'update'
+		const {
+			UniqId
+		} = currentRow.value
+		const res = await GcDetail({
+			UniqId
+		})
+		if (res.code === 0) {
+			Object.assign(detailData, res.data)
+			// dialogFormVisible.value = true
+			showDialog()
+		}
+	}
+
+	// 新增数据
+	const handleShowAdd = () => {
+		type.value = 'add';
+		
+			detailData.wgjs_rq = '';
+
+			detailData.wgjs_bh1 = '';
+			detailData.name1 = '';
+			detailData.wgjs_js1 = '';
+			detailData.wgjs_yy1 = '';
+
+			detailData.wgjs_bh2 = '';
+			detailData.name2 = '';
+			detailData.wgjs_js2 = '';
+			detailData.wgjs_yy2 = '';
+
+			detailData.wgjs_bh3 = '';
+			detailData.name3 = '';
+			detailData.wgjs_js3 = '';
+			detailData.wgjs_yy3 = '';
+
+			detailData.wgjs_bh4 = '';
+			detailData.name4 = '';
+			detailData.wgjs_js4 = '';
+			detailData.wgjs_yy4 = '';
+
+			detailData.wgjs_bh5 = '';
+			detailData.name5 = '';
+			detailData.wgjs_js5 = '';
+			detailData.wgjs_yy5 = '';
+
+			detailData.wgjs_bh6 = '';
+			detailData.name6 = '';
+			detailData.wgjs_js6 = '';
+			detailData.wgjs_yy6 = '';
+
+		
+
+		// dialogFormVisible.value = true
+		const date = dayjs().format('YYYY-MM-DD')
+		detailData.wgjs_rq = date
+		showDialog()
+	}
+
+	// 更新数据
+	const enterDialog = async () => {
+		if (type.value === 'update') {
+			updateDetailData()
+		} else if (type.value === 'add') {
+			addDetailData()
+		}
+	}
+	// 新增
+	const addDetailData = async () => {
+		const restoredData = {
+			wgjs_rq: detailData.wgjs_rq,
+
+			wgjs_bh1: detailData.wgjs_bh1,
+			wgjs_js1: detailData.wgjs_js1,
+			wgjs_yy1: detailData.wgjs_yy1,
+
+			wgjs_bh2: detailData.wgjs_bh2,
+			wgjs_js2: detailData.wgjs_js2,
+			wgjs_yy2: detailData.wgjs_yy2,
+
+			wgjs_bh3: detailData.wgjs_bh3,
+			wgjs_js3: detailData.wgjs_js3,
+			wgjs_yy3: detailData.wgjs_yy3,
+
+			wgjs_bh4: detailData.wgjs_bh4,
+			wgjs_js4: detailData.wgjs_js4,
+			wgjs_yy4: detailData.wgjs_yy4,
+
+			wgjs_bh5: detailData.wgjs_bh5,
+			wgjs_js5: detailData.wgjs_js5,
+			wgjs_yy5: detailData.wgjs_yy5,
+
+			wgjs_bh6: detailData.wgjs_bh6,
+			wgjs_js6: detailData.wgjs_js6,
+			wgjs_yy6: detailData.wgjs_yy6,
+		}
+		restoredData.sys_id = sys_id;
+		const res = await GcAdd(restoredData)
+		if (res.code === 0) {
+			ElMessage({type: 'success',message: '新增成功',})
+			//刷新
+			if (params.date != '') {
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+			}
+			getSideData()
+			detailData.wgjs_bh1 = '';
+			detailData.name1 = '';
+			detailData.wgjs_js1 = '';
+			detailData.wgjs_yy1 = '';
+
+			detailData.wgjs_bh2 = '';
+			detailData.name2 = '';
+			detailData.wgjs_js2 = '';
+			detailData.wgjs_yy2 = '';
+
+			detailData.wgjs_bh3 = '';
+			detailData.name3 = '';
+			detailData.wgjs_js3 = '';
+			detailData.wgjs_yy3 = '';
+
+			detailData.wgjs_bh4 = '';
+			detailData.name4 = '';
+			detailData.wgjs_js4 = '';
+			detailData.wgjs_yy4 = '';
+
+			detailData.wgjs_bh5 = '';
+			detailData.name5 = '';
+			detailData.wgjs_js5 = '';
+			detailData.wgjs_yy5 = '';
+
+			detailData.wgjs_bh6 = '';
+			detailData.name6 = '';
+			detailData.wgjs_js6 = '';
+			detailData.wgjs_yy6 = '';
+			//自动聚焦光标
+			  setTimeout(() => {
+				const inputElement = document.getElementById('bh');
+				if (inputElement) {
+					inputElement.focus();		
+				}
+			}, 100);
+			// dialogFormVisible.value = false
+		}
+	}
+	// 修改
+	const updateDetailData = async () => {
+		const obj = detailData
+		for (let i = 1; i <= 6; i++) {
+			delete obj[`name${i}`]
+		}
+		const res = await GcEdit(obj)
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '更新成功'
+			})
+			params.type = 'getTableData'
+			if (params.date != '') {
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+			}
+			dialogFormVisible.value = false
+		}
+	}
+
+	// 开启弹窗
+	const showDialog = () => {
+		dialogFormVisible.value = true
+		// 在 setTimeout 中获取元素,确保在 DOM 渲染完毕后执行
+		setTimeout(() => {
+			formElements = document.getElementById('detail-form').elements
+			formElements[0].focus()
+		}, 0)
+	}
+
+	// 关闭弹窗
+	const closeDialog = () => {
+		dialogFormVisible.value = false
+	}
+
+	let index_Yg = '';
+	let formElements
+	const moveFocus = async (event) => {
+		const index = Array.from(formElements).indexOf(event.target)
+		console.log(event)
+		console.log(index)
+		index_Yg = index
+		const key = event.key
+		event.preventDefault()
+
+		// 切换焦点
+		const focusNext = (step) => {
+			const nextIndex = (index + step + formElements.length) % formElements.length
+			formElements[nextIndex].focus()
+			formElements[nextIndex].select()
+		}
+
+		switch (index) {
+			case 1:
+			case 5:
+			case 9:
+			case 13:
+			case 17:
+			case 21:
+				if (key === 'ArrowDown') {
+					formElements[index + 1].focus()
+				} else if (key === 'ArrowUp') {
+					formElements[index - 1].focus()
+				} else if (key === 'Enter') {
+					formElements[index + 1].focus()
+
+					const sczl_bh = formElements[index]?.value
+					if (sczl_bh === '') {
+						detailData[`name${(index - 1) / 4 + 1}`] = ''
+						break
+					}
+					const response = await getYg({
+						sczl_bh
+					})
+					if (response.code == 0) {
+						if (response.data.length == 1) {
+							detailData[`name${(index - 1) / 4 + 1}`] = response.data[0].ygxm;
+							detailData[`wgjs_bh${(index - 1) / 4 + 1}`] = response.data[0].员工编号;
+						} else if (response.data.length > 1) {
+							selectData_Yg.splice(0, selectData_Yg.length, ...response.data)
+							setGXCurrent_Yg(selectData_Yg[0])
+							dialogSelectVisible_Yg.value = true
+						} else {
+							ElMessage({
+								type: 'warning',
+								message: '未查询到该员工'
+							})
+							detailData[`name${(index - 1) / 4 + 1}`] = '';
+							detailData[`wgjs_bh${(index - 1) / 4 + 1}`] = '';
+						}
+					} else {
+						detailData[`name${(index - 1) / 4 + 1}`] = '';
+						detailData[`wgjs_bh${(index - 1) / 4 + 1}`] = '';
+					}
+
+				}
+				break
+			case 5:
+			case 10:
+			case 15:
+			case 20:
+			case 25:
+			case 30:
+			 if (key === 'Enter') {
+					focusNext(1)
+				}
+			break
+			default:
+				if (key === 'ArrowDown') {
+					focusNext(1)
+				} else if (key === 'ArrowUp') {
+					focusNext(-1)
+				} else if (key === 'Enter') {
+					focusNext(1)
+				}
+				break
+		}
+	}
+	const dialogSelectVisible_Yg = ref(false)
+	const selectData_Yg = reactive([])
+	// 处理选择框
+	const handleSelectClick_Yg = (row, column, event) => {
+		detailData[`name${(index_Yg - 1) / 5 + 1}`] = row.ygxm
+		detailData[`wgjs_bh${(index_Yg - 1) / 5 + 1}`] = row.员工编号
+		dialogSelectVisible_Yg.value = false
+	}
+	const currentIndex_Yg = ref(0);
+	const GXCurrent_Yg = ref(0);
+	const selectGX_Yg = (event) => {
+		if (event.keyCode === 40) { // 向下箭头
+			if (currentIndex_Yg.value < selectData_Yg.length - 1) {
+				currentIndex_Yg.value++;
+				setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
+			} else {
+				currentIndex_Yg.value = 0;
+				setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达最后一行时回到第一行			
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (currentIndex_Yg.value > 0) {
+				currentIndex_Yg.value--;
+				setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]);
+			} else {
+				currentIndex_Yg.value = selectData_Yg.length - 1;
+				setGXCurrent_Yg(selectData_Yg[currentIndex_Yg.value]); // 到达第一行时回到最后一行
+			}
+		} else if (event.keyCode === 13) { // 回车键
+			dialogSelectVisible_Yg.value = false;
+		}
+	}
+	const table_Yg = ref()
+	const setGXCurrent_Yg = (row) => {
+		setTimeout(() => {
+			table_Yg.value?.setCurrentRow(row)
+			detailData[`name${(index_Yg - 1) / 4 + 1}`] = row.ygxm
+			detailData[`wgjs_bh${(index_Yg - 1) / 4 + 1}`] = row.员工编号
+		})
+	}
+
+	//删除
+	const onDel = (value) => {
+		if (currentRow.value == undefined) {
+			ElMessage({
+				type: 'warning',
+				message: '未选中记录',
+			})
+			return
+		}
+		ElMessageBox.confirm(
+			`确认删除这条数据么?`,
+			'警告', {
+				confirmButtonText: '确认',
+				cancelButtonText: '取消',
+				type: 'warning',
+			}
+		).then(async () => {
+			const response = await GcDel({
+				UniqId: currentRow.value.UniqId
+			});
+			if (response.code === 0) {
+				ElMessage({
+					type: 'success',
+					message: '删除成功',
+				})
+				//刷新页面
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+			}
+		})
+	}
+
+	//导出按钮(汇总)
+	const exportToExcel = async () => { 
+  try {
+    // 获取数据
+    const response = await GcList({ date: params.date });
+    const originalData = response.data.rows;
+    console.log('原始数据:', originalData);
+
+    // 1. 定义需要转换为数字的列及其小数位数配置
+    const numberColumnsConfig = {
+      4: 1,
+      8: 1,
+      12: 1,  
+      16: 1,
+      20: 1,
+      24: 1 
+    };
+
+    // 2. 准备表头行 - 使用tableColumns中的label
+    const headerRow = tableColumns.map(col => col.label);
+    
+    // 3. 准备数据行 - 按照tableColumns中的prop顺序提取数据
+    const dataRows = originalData.map(item => {
+      return tableColumns.map(col => {
+        const value = item[col.prop] || '';
+        return value;
+      });
+    });
+
+    // 4. 合并表头和数据
+    const excelData = [headerRow, ...dataRows];
+    
+    // 5. 创建工作表
+    const worksheet = XLSX.utils.aoa_to_sheet(excelData);
+    
+    // 6. 设置数字格式 - 根据配置处理指定列
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    
+    // 处理配置的数字列
+    Object.keys(numberColumnsConfig).forEach(colIndex => {
+      const decimalPlaces = numberColumnsConfig[colIndex];
+      const colNum = parseInt(colIndex);
+      
+      for (let row = range.s.r + 1; row <= range.e.r; row++) {
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: colNum });
+        if (worksheet[cellAddress]) {
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 设置为数字类型
+            worksheet[cellAddress].v = numValue; // 更新数值
+            
+            // 设置数字格式 (0=整数, 0.0=1位小数, 0.00=2位小数等)
+            worksheet[cellAddress].z = decimalPlaces > 0 
+              ? `0.${'0'.repeat(decimalPlaces)}` 
+              : '0';
+          }
+        }
+      }
+    });
+    
+    // 7. 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, '工时数据');
+    
+    // 生成带日期的文件名
+    const fileName = `工时数据_${new Date().toISOString().slice(0, 10)}.xlsx`;
+    XLSX.writeFile(workbook, fileName);
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败: ' + (error.message || '请重试'));
+  }
+};
+
+</script>
+
+<style scoped>
+	.JKWTree-container {
+		display: flex;
+	}
+
+	.JKWTree-tree {
+		width: 100%;
+		background-color: #fff;
+		padding: 10px;
+		margin-right: 20px;
+	}
+
+	.JKWTree-tree h3 {
+		font-size: 15px;
+		font-weight: 700;
+		margin: 10px 0;
+	}
+
+	.JKWTree-content {
+		flex: 1;
+	}
+
+	/* 选中某行时的背景色 */
+	:deep(.el-table__body tr.current-row)>td {
+		background: #ff80ff !important;
+	}
+</style>
+
+<style scoped>
+	: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>

+ 1147 - 0
src/view/yunyin/huheguanli/huheyuangongrigongzi.vue

@@ -0,0 +1,1147 @@
+<template>
+  <div>
+    <!-- 左侧树形结构 -->
+    <el-container>
+      <!-- <el-aside width="250px">
+        <div class="JKWTree-tree-rgz">
+          <h3>包装工序产量维护</h3>
+          <el-tree :data="treeData" :props="defaultProps" highlight-current="true"
+            @node-click="handleNodeClick"></el-tree>
+        </div>
+      </el-aside> -->
+	  
+	  <layout-sider
+	    :resize-directions="['right']"
+	    :width="180"
+	    style="margin-right: 10px;"
+	  >
+	    <div
+	      class="JKWTree-tree-rgz"
+	      style="height: 81vh;"
+	    >
+	      <h3>员工日工资查询</h3>
+	      <el-tree
+	        :data="treeData"
+	        highlight-current
+	        @node-click="handleNodeClick"
+	      />
+	    </div>
+	  </layout-sider>
+
+      <el-container>
+        <el-main>
+          <!-- 按钮区域 -->
+          <div class="gva-table-box">
+            <div class="gva-btn-list">
+              <el-row :span="6">
+                <el-input v-model="searchInfo" placeholder="输入员工编号或姓名缩写"  @keyup.enter.native="onSearch" />
+              </el-row>
+              <el-button type="primary"  :icon="Search" class="bt" @click="onSearch">搜索</el-button>
+              <!-- <el-button type="primary" :icon="Refresh">重置</el-button> -->
+			  <!-- <el-button type="primary" :icon="Search" class="bt" @click="onposition">定位</el-button> -->
+			  <!-- <el-button type="primary" :icon="Search">查改</el-button> -->
+			  <!-- <el-button type="primary"  class="bt" @click="handlePrint">员工计件明细</el-button> -->
+              <el-button type="primary" :icon="Search" class="bt" @click="onSalary">工资计算</el-button>
+              <div style="margin-left: auto;">
+                <el-button type="primary" :icon="Download" class="bt" @click="exportExcel">导出到Excel(汇总)</el-button>
+				<el-button type="primary" :icon="Download" class="bt" @click="exportExcel2">导出到Excel(明细)</el-button>
+              </div>
+            </div>
+            <!-- 数据展示 -->
+            <el-table ref="multipleTable" style="width: 100%;height: 40vh;" tooltip-effect="dark" :data="tableData" row-key="ID" 
+              highlight-current-row="true" border @selection-change="handleSelectionChange" :show-overflow-tooltip="true"
+			   :row-style="{ height: '20px' }" 
+			   :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+			   :header-cell-style="{ padding: '0px' }" 
+			   @row-click="ontable" @row-dblclick="doubleClick">
+              <el-table-column type="selection" width="40" />
+			  <el-table-column
+			    v-for="column in tableCols1"
+			    :key="column.prop"
+			    :prop="column.prop"
+			    :label="column.label"
+			    :width="column.width"
+			    show-overflow-tooltip="true"
+			  				sortable
+			  />  
+            </el-table>
+            <!-- 分页 -->
+            <!-- <div class="gva-pagination">
+              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="limit"
+                :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange"
+                @size-change="handleSizeChange" />
+            </div> -->
+          </div>
+		  
+		  
+		  <div class="gva-table-box">
+		    <!-- 数据展示 -->
+		    <el-table ref="multipleTable2" class="lower-table" style="width: 100%;height: 30vh;" tooltip-effect="dark" :data="tableData2" row-key="ID"
+		      highlight-current-row="true" border 
+			  :row-style="{ height: '20px' }"
+			  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+			  :header-cell-style="{ padding: '0px' }"
+			  @selection-change="handleSelectionChange" 
+			  :show-overflow-tooltip="true" 
+			  @row-dblclick="doubleClick">
+		      <el-table-column type="selection" width="40" />
+		  	  <el-table-column
+		  	    v-for="column in tableCols2"
+		  	    :key="column.prop"
+		  	    :prop="column.prop"
+		  	    :label="column.label"
+		  	    :width="column.width"
+		  	    :fixed="column.fixed"
+		  	    show-overflow-tooltip="true"
+		  	  				sortable
+		  	  />
+		    </el-table>
+		    <!-- 分页 -->
+		    <!-- <div class="gva-pagination">
+		      <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="limit"
+		        :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange"
+		        @size-change="handleSizeChange" />
+		    </div> -->
+		  </div>
+          <!-- 弹出框 -->
+          <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '添加' : '修改'"
+            destroy-on-close width="1200px">
+            <!-- <el-scrollbar height="500px"> -->
+            <el-form :model="formData" label-position="left" ref="elFormRef" :rules="rule">
+
+              <el-row :gutter="20">
+
+                <el-col :span="6">
+                  <el-form-item label="日期" prop="name">
+                    <el-row :gutter="20">
+                      <el-col :span="12">
+                        <el-input v-model="formData.code" :clearable="true" placeholder="ZT01733" />
+                      </el-col>
+                    </el-row>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+                            <!-- 标题栏 -->
+                            <el-row :gutter="10">
+                              <el-col :span="3">
+                                <span>工单编号</span>
+                              </el-col>
+                              <el-col :span="3">
+                                <span>印件工序</span>
+                              </el-col>
+                              <el-col :span="3">
+                                <span>工序名称</span>
+                              </el-col>
+                              <el-col :span="9">
+                                <span>印件名称</span>
+                              </el-col>
+                              <el-col :span="2">
+                                <span>包装产量</span>
+                              </el-col>
+							  <el-col :span="2">
+							    <span>每箱数量</span>
+							  </el-col>
+							  <el-col :span="2">
+							    <span>零头</span>
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工1 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工2 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工3 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工4 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工5 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+              
+                            <!-- 员工6 -->
+                            <el-row :gutter="5" style="margin-top: 10px;">
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                              </el-col>
+                              <el-col :span="3">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                              </el-col>
+                              <el-col :span="9">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                              </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+							  <el-col :span="2">
+							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							  </el-col>
+                            </el-row>
+			  
+            </el-form>
+            <!-- </el-scrollbar> -->
+            <template #footer>
+              <div class="dialog-footer">
+                <el-button @click="closeDialog">取 消</el-button>
+                <el-button type="primary" @click="enterDialog">确 定</el-button>
+              </div>
+            </template>
+          </el-dialog>
+
+		<!-- 员工选择 -->
+		  <el-dialog v-model="YgbhVisible" title="选择"
+		    destroy-on-close width="200px" @keydown="selectYgbh($event)" >
+		    <el-table tooltip-effect="dark" :data="YgbhselectData" row-key="ID"
+		      highlight-current-row="true" border style="width:100%"
+		      :row-style="{ height: '30px' }"
+		      @row-dblclick="YgbhSelectClick"
+		  			  ref="tableYgbh"
+		    >
+		      <el-table-column prop="ygxm" label="" width="160" />		      	 
+		    </el-table>
+		  </el-dialog>
+
+          <el-dialog v-model="positioningVisibleshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
+            <el-card>
+          				<el-form-item label="员工编号" prop="name">
+          				  <el-row :gutter="20">
+          				    <el-col :span="12">
+          				      <el-input v-model="positionvalue" :clearable="true" placeholder="ZT01733" />
+          				    </el-col>                      
+          				  </el-row>
+          				</el-form-item>
+          			</el-card>
+          			<el-button type="primary" @click="enterpositioning">确 定</el-button>
+          </el-dialog>
+         
+        </el-main>
+      </el-container>
+    </el-container>
+
+
+          <!-- 员工计件明细 -->
+          <el-dialog
+        v-model="dialogYgjjmx"
+        title="员工计件明细"
+        destroy-on-close
+      >
+        <Ygjjmx :ygbh="currentRow?.['bh']" />
+      </el-dialog>
+
+
+      <el-dialog
+      v-model="dialogVisible"
+      title="计算工资"
+      width="40%"
+      :before-close="handleClose"
+    >
+      <div>
+        <el-form-item label="考勤年月:" class="mab" prop="keyOrder" label-width="100">
+          <el-input v-model="jjgzzhysformData.date" @keyup.enter="jgzzhysProductValue" style="width: 130px;"/>
+        </el-form-item>
+
+        <el-form-item label="从:" class="mab" prop="keyOrder" label-width="100">
+          <el-date-picker v-model="jjgzzhysformData.start_date" type="date" placeholder="选择日期" style="width: 130px;">
+          </el-date-picker>
+          &nbsp;到:&nbsp;&nbsp;
+          <el-date-picker v-model="jjgzzhysformData.end_date" type="date" placeholder="选择日期" style="width: 130px;">
+          </el-date-picker>
+        </el-form-item>
+      </div>
+      
+      <template #footer>
+        <el-button @click="dialogVisible = false">取消</el-button>
+        <el-button type="primary" @click="jjgzzhysclick">计算</el-button>
+      </template>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script setup>
+import {
+  getList,
+  getTab,
+  dailygetTab,
+  dailygetList,
+  dailygetAllList,
+  dailygetDetail,
+  dailysearch,
+  getYg
+} from '@/api/jixiaoguanli/jitairibaobiao'
+import { Gluing_Salary_Tab,Gluing_Salary_List,Gluing_Salary_Detail,salaryCalculation } from '@/api/mes/huhejob'
+
+// 全量引入格式化工具 请按需保留
+import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { Search, Refresh, Download } from '@element-plus/icons-vue'
+import { ref, reactive, onMounted, nextTick, onBeforeMount } from 'vue'
+// import Ygjjmx from './printYgjjmx.vue'
+import * as XLSX from "xlsx";
+import { useUserStore } from '@/pinia/modules/user'
+const userStore = useUserStore() 
+const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
+defineOptions({
+  name: '06-packingDocuments'
+})
+const tableCols1 = [
+  { label: '员工编号', prop: '员工编号', width: '105' },
+  { label: '员工姓名', prop: '员工姓名', width: '105' },
+  { label: '日期', prop: '日期', width: '120' },
+  { label: '计件工资', prop: '计件工资', width: '105' },
+  // { label: '加班工资', prop: '加班工资', width: '105' },
+  // { label: '计时时数', prop: '计时时数', width: '105' },
+  // { label: '计时工资', prop: '计时工资', width: '135' },
+  // { label: '日工资合计', prop: '日工资合计', width: '135' },
+  { label: '月工资总和', prop: '月工资总和', width: '135' },
+]
+const tableCols2 = [
+  { label: '日期', prop: '日期', width: '105', fixed: true },
+  { label: '工单编号', prop: 'sczl_gdbh', width: '105', fixed: true },
+  { label: '产品名称', prop: 'cpmc', width: '120' },
+  { label: '工序名称', prop: 'sczl_gxmc', width: '120' },
+  { label: '机台编号', prop: 'sczl_jtbh', width: '105' },
+  { label: '分配比例', prop: '分配比例', width: '105' },
+  { label: '产量', prop: 'sczl_cl', width: '135' },
+  { label: '计件单价', prop: 'price', width: '105' },
+  // { label: '班组换算产量', prop: '班组换算产量', width: '135' },
+  // { label: '工序难度系数', prop: '工序难度系数', width: '135' },
+  // { label: '个人计件工资', prop: '个人计件工资', width: '135' },
+  // { label: '个人加班工资', prop: '个人加班工资', width: '135' },
+  { label: '装版工时', prop: '装版工时', width: '120' },
+  { label: '保养工时', prop: '保养工时', width: '105' },
+  // { label: '打样工时', prop: '打样工时', width: '105' },
+  { label: '异常停机工时', prop: '异常工时', width: '145' },
+  // { label: '车头产量占用机时', prop: '车头产量占用机时', width: '175' },
+  // { label: '日定额', prop: '日定额', width: '135' },
+  // { label: '达标定额', prop: '达标定额', width: '105' },
+  // { label: '千件工价', prop: '千件工价', width: '105' },
+  // { label: '补产标准', prop: '补产标准', width: '120' },
+  // { label: '员工编号', prop: 'bh', width: '105' },
+  // { label: '姓名', prop: 'xm', width: '105' },
+  // { label: '比例', prop: 'Rate', width: '105' },
+]
+// 侧边栏数据请求
+const treeData = reactive([]);
+const multipleTable=ref()
+const getTabdata = async () => {
+    //接口调用函数
+    const response  = await Gluing_Salary_Tab();
+	
+	const transformedData = response.data.map(item => ({
+	      label: `${item.label}`,
+	      children: item.children.map(sysItem => ({
+	        label: `${sysItem.label}`,
+	        params: {
+	          date: item.label,
+	          sys_id: sysItem.label,
+	          total:'',
+	        },
+	      })),
+	    }));
+	    treeData.splice(0, treeData.length, ...transformedData);
+	}
+	
+
+getTabdata();
+
+// 自动化生成的字典(可能为空)以及字段
+const formData = ref({
+  id: '',
+  name: '',
+  date: '',
+  group: '',
+  packingOutput: '',
+  reworkOutput: '',
+  pieceOutput: '',
+  order: '',
+  user: '',
+  createTime: '',
+  updateTime: '',
+  uniqid: '',
+})
+
+// 验证规则
+const rule = reactive({
+})
+
+const elFormRef = ref()
+const elSearchFormRef = ref()
+
+// =========== 表格控制部分 ===========
+const tableData = ref([])
+const tableData2 = ref([])
+const detailData = reactive([])
+const total = ref(0)
+const page = ref(1)
+const limit = ref(10)
+const searchInfo = ref('')
+const params = {
+  date: '',
+  sys_id: '',
+  page: page.value.toString(),
+  limit: limit.value.toString(),
+}
+
+// 分页设置
+const handleSizeChange = (val) => {
+  limit.value = val;
+  params.limit = val.toString();
+  getTableData();
+}
+
+// 页面跳转
+const handleCurrentChange = (val) => {
+  page.value = val
+  params.page = val.toString();
+  getTableData()
+}
+
+const getTableData = async () => {
+  console.log(params.date.split('(')[0])
+  
+  try {
+    const response = await Gluing_Salary_List({
+      date: params.date.split('(')[0].replace(/(\d{4})(\d{2})/, '$1-$2'), 
+      department: params.sys_id.split('(')[0],
+    });
+    
+    if (response.code === 0) {
+      // 创建分组结构:先放合计行,再放每日明细
+      const groupedData = [];
+      response.data.forEach(employee => {
+        // 先添加月工资合计行
+        groupedData.push({
+          '员工编号': employee.员工编号,
+          '员工姓名': employee.姓名,
+          '日期': '月工资合计',
+          '计件工资': employee.月工资总和,
+          '月工资总和': employee.月工资总和,
+          'rowType': 'summary', // 标识行类型
+        });
+        
+        // 如果有每日明细数据
+        if (employee.每日明细 && employee.每日明细.length > 0) {
+          // 添加每日明细
+          employee.每日明细.forEach(daily => {
+            groupedData.push({
+              '员工编号': employee.员工编号,
+              '员工姓名': employee.姓名,
+              '日期': daily.日期,
+              '计件工资': daily.计件工资,
+              '月工资总和': '', // 每日明细不显示月总和
+              'rowType': 'daily', // 标识行类型
+            });
+          });
+        }
+      });
+      
+      tableData.value = groupedData;
+      console.log('分组显示表格数据:', tableData.value);
+    } else {
+      console.error('获取数据失败:', response.msg);
+      tableData.value = [];
+    }
+  } catch (error) {
+    console.error('请求失败:', error);
+    tableData.value = [];
+  }
+}
+
+const generateSummaryData = (data) => {
+  const summaryData = [];
+  let currentName = null;
+  let currentSummary = null;
+
+  data.forEach((item) => {
+    const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
+    if (name !== currentName) {
+      // 如果员工姓名发生改变,说明需要插入合计数据
+      if (currentSummary) {
+        // 将上一个员工的合计数据插入到数组中
+        summaryData.push(currentSummary);
+      }
+      // 创建新的合计数据
+      currentSummary = {
+        '员工姓名': name,
+		'日期': 0,
+        '计件工资': 0,
+        '加班工资': 0,
+        '计时时数': 0,
+        '计时工资': 0,
+        '日工资合计': 0
+      };
+      currentName = name;
+    }
+
+    // 更新合计数据
+	currentSummary['日期']++;
+    currentSummary['计件工资'] += parseFloat(item['计件工资']);
+    currentSummary['加班工资'] += parseFloat(item['加班工资']);
+    currentSummary['计时时数'] += parseFloat(item['计时时数']);
+    currentSummary['计时工资'] += parseFloat(item['计时工资']);
+    currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
+	currentSummary['员工姓名']='合计('+currentSummary['日期']+'天)';
+  });
+
+  // 将最后一个员工的合计数据插入到数组中
+  if (currentSummary) {
+    summaryData.push(currentSummary);
+  }
+
+  // 将日期填充到表格中
+  summaryData.forEach((summary) => {
+    summary['计件工资'] = summary['计件工资'].toFixed(2); // 保留两位小数
+	summary['加班工资'] = summary['加班工资'].toFixed(2);
+	summary['计时时数'] = summary['计时时数'].toFixed(2);
+	summary['计时工资'] = summary['计时工资'].toFixed(2);
+	summary['日工资合计'] = summary['日工资合计'].toFixed(2);
+  });
+
+  return summaryData;
+};
+const rq_date = ref('')
+const handleNodeClick = (node, check) => {
+  //存放当前节点的nodeId
+  console.log(node) 
+  if (node.label) {
+    rq_date.value = node.label;
+    console.log(rq_date.value)
+  }
+  if (node.params) {
+    params.date = node.params.date;
+    params.sys_id = node.params.sys_id;
+    total.value = node.params.total;
+    getTableData();
+  }
+ 
+}
+
+// 定位
+function onposition() {
+  positioningVisibleshow.value=true
+}
+const enterpositioning = async () => {
+ let parts = params.date.split('-')
+ 
+ // # 截取第一个"-"之前的内容并赋值给新变量1
+ let new_variable1 = parts[0]
+ 
+ // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
+ let new_variable2 = parts[1]
+ Getlocate(new_variable1+new_variable2)
+ positioningVisibleshow.value=false
+}
+let positionvalue=ref()
+
+const Getlocate = async () => {
+  try {
+    // 是否点击车间
+    const dateToUse = (params.date === undefined || params.date === '') ? rq_date.value : params.date;
+    
+    const response = await Gluing_Salary_List({
+      date: dateToUse.split('(')[0].replace(/(\d{4})(\d{2})/, '$1-$2'),
+      search: searchInfo.value,
+      department: params.sys_id?.split('(')[0], // 可选参数
+    });
+    
+    console.log('搜索返回:', response);
+    
+    if (response.code === 0) {
+      if (response.data.length === 0) {
+        tableData.value = [];
+        return;
+      }
+      
+      // 创建分组结构:先放合计行,再放每日明细
+      const groupedData = [];
+      response.data.forEach(employee => {
+        // 先添加月工资合计行
+        groupedData.push({
+          '员工编号': employee.员工编号,
+          '员工姓名': employee.姓名,
+          '日期': '月工资合计',
+          '计件工资': employee.月工资总和,
+          '月工资总和': employee.月工资总和,
+          'rowType': 'summary', // 标识行类型
+          'employeeId': employee.员工编号,
+        });
+        
+        // 如果有每日明细数据
+        if (employee.每日明细 && employee.每日明细.length > 0) {
+          // 添加每日明细
+          employee.每日明细.forEach(daily => {
+            groupedData.push({
+              '员工编号': employee.员工编号,
+              '员工姓名': employee.姓名,
+              '日期': daily.日期,
+              '计件工资': daily.计件工资,
+              '月工资总和': '', // 每日明细不显示月总和
+              'rowType': 'daily', // 标识行类型
+              'employeeId': employee.员工编号,
+            });
+          });
+        }
+      });
+      
+      tableData.value = groupedData;
+      console.log('搜索后的分组显示数据:', tableData.value);
+    } else {
+      console.error('搜索失败:', response.msg);
+      tableData.value = [];
+    }
+  } catch (error) {
+    console.error('搜索请求失败:', error);
+    tableData.value = [];
+  }
+}
+
+// 搜索
+function onSearch() {
+	// if(!params.date){
+	// 	ElMessage({
+	// 	  type: 'warning',
+	// 	  message: '请先选择日期'
+	// 	})
+	// 	return
+	// }
+	if(searchInfo.value){
+		getYg({sczl_bh:searchInfo.value}).then(res=>{
+			if (res.code === 0) {
+			  if(res.data.length === 0){
+				  const originalData = []
+				  tableData.splice(0, tableData.length, ...originalData)
+				  return
+			  }else if(res.data.length === 1){
+				  searchInfo.value = res.data[0]['员工编号']
+			      Getlocate()
+			  }else{
+				  YgbhselectData.splice(0, YgbhselectData.length, ...res.data)
+				  setYgbhCurrent(YgbhselectData[0])
+				  YgbhVisible.value=true
+			  }
+			}
+		});
+	}else{
+		getTableData();
+	}
+ 
+}
+
+const YgbhVisible = ref(false)
+const YgbhselectData = reactive([])
+//选择
+const YgbhSelectClick = (row, column, event) => {
+  searchInfo.value = row['员工编号']
+  YgbhVisible.value = false
+  Getlocate()
+}
+const tableYgbh=ref()
+const setYgbhCurrent = (row) => {
+  setTimeout(()=>{
+	  tableYgbh.value?.setCurrentRow(row) 
+	  searchInfo.value = row['员工编号']
+  })
+}
+const YgbhIndex = ref(0);
+const YgbhCurrent = ref(0);
+const selectYgbh = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (YgbhIndex.value < YgbhselectData.length - 1) {
+            YgbhIndex.value++;
+            setYgbhCurrent(YgbhselectData[YgbhIndex.value]);
+        } else {
+            YgbhIndex.value = 0;
+            setYgbhCurrent(YgbhselectData[YgbhIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (YgbhIndex.value > 0) {
+            YgbhIndex.value--;
+            setYgbhCurrent(YgbhselectData[YgbhIndex.value]);
+        } else {
+            YgbhIndex.value = YgbhselectData.length - 1;
+            setYgbhCurrent(YgbhselectData[YgbhIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        YgbhVisible.value = false
+		Getlocate()
+    }
+}
+
+// ============== 表格控制部分结束 ===============
+
+// 获取需要的字典 可能为空 按需保留
+const setOptions = async () => {
+}
+
+// 获取需要的字典 可能为空 按需保留
+setOptions()
+
+// 多选数据
+const multipleSelection = ref([])
+// 多选
+const handleSelectionChange = (val) => {
+  // multipleSelection.value = val
+  
+}
+
+// 批量删除控制标记
+const deleteVisible = ref(false)
+
+// 多选删除
+const onDelete = async () => {
+  const ids = []
+  if (multipleSelection.value.length === 0) {
+    ElMessage({
+      type: 'warning',
+      message: '请选择要删除的数据'
+    })
+    return
+  }
+  multipleSelection.value &&
+    multipleSelection.value.map(item => {
+      ids.push(item.ID)
+    })
+  const res = await deleteCompanyByIds({ ids })
+  if (res.code === 0) {
+    ElMessage({
+      type: 'success',
+      message: '删除成功'
+    })
+    if (tableData.value.length === ids.length && page.value > 1) {
+      page.value--
+    }
+    deleteVisible.value = false
+    getTableData()
+  }
+}
+
+// 行为控制标记(弹窗内部需要增还是改)
+const type = ref('')
+
+// 更新行
+const updateCompanyFunc = async (row) => {
+  const res = await findCompany({ ID: row.ID })
+  type.value = 'update'
+  if (res.code === 0) {
+    formData.value = res.data.recompany
+    dialogFormVisible.value = true
+  }
+}
+
+// 弹窗控制标记
+const dialogFormVisible = ref(false)
+const positioningVisibleshow = ref(false)
+// 打开弹窗
+const openDialog = () => {
+  type.value = 'create'
+  dialogFormVisible.value = true
+}
+
+// 关闭弹窗
+const closeDialog = () => {
+  dialogFormVisible.value = false
+  formData.value = {
+    address: '',
+    image: '',
+    name: '',
+  }
+}
+// 弹窗确定
+const enterDialog = async () => {
+  elFormRef.value?.validate(async (valid) => {
+    if (!valid) return
+    let res
+    switch (type.value) {
+      case 'create':
+        res = await createCompany(formData.value)
+        break
+      case 'update':
+        res = await updateCompany(formData.value)
+        break
+      default:
+        res = await createCompany(formData.value)
+        break
+    }
+    if (res.code === 0) {
+      ElMessage({
+        type: 'success',
+        message: '创建/更改成功'
+      })
+      closeDialog()
+      getTableData()
+    }
+  })
+}
+// 单击表格操作
+function ontable(row, column, event) {
+  currentRow.value = row
+  console.log(121, row)
+// 使用正则匹配并格式化
+// 修改后的正则表达式,匹配到日为止
+const match = row.日期.match(/^(\d{4})\.(\d{2})\.(\d{2})/);
+const new_variable1 = match ? `${match[1]}-${match[2]}` : '';
+console.log(new_variable1); // 输出: 2025-11-04
+  // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
+  if(row.员工编号 == undefined) return
+
+  Gluing_Salary_Detail({date:new_variable1,code:row.员工编号}).then(response=>{
+    console.log(124, response.data)
+	  if(response.code==0){
+	  	   tableData2.value.splice(0, tableData2.value.length, ...response.data);
+        // 为匹配的行添加黄色背景
+        nextTick(() => {
+          let i = 0
+          tableData2.value.forEach((item, index) => {
+          const rowElement = document.querySelector(`.lower-table  .el-table__row:nth-child(${index + 1})`);
+          
+          if (rowElement) {
+            if (item.日期 == row.日期) { // 替换yourProperty为实际的属性名
+              if(i == 0){
+                //第一条数据,设置这条数据到视口顶部
+                rowElement.scrollIntoView();
+                console.log(rowElement)
+              }
+              i++
+              rowElement.style.backgroundColor = 'yellow';
+            }else{
+                rowElement.style.backgroundColor = '';
+            }
+          }
+        })
+       })
+	  }
+  })
+}
+
+// 双击表格操作
+function doubleClick(row, column, event) {
+  // updateCompanyFunc(row);
+  type.value = 'update';
+  // dialogFormVisible.value = true
+}
+
+// 导出excel
+
+function exportExcel() {
+ if(tableData.value.length<1){
+ 	ElMessage({
+ 	  type: 'error',
+ 	  message: '请确认上方表格内是否存在内容'
+ 	})
+ }else{
+ 	exportExcelFile(tableData,tableCols1)
+ }
+};
+function exportExcel2() {
+if(tableData2.value.length<1){
+		ElMessage({
+		  type: 'error',
+		  message: '请确认上方表格内是否存在内容'
+		})
+	}else{
+		exportExcelFile(tableData2,tableCols2)
+	}
+};
+const exportExcelFile = (tableData, tableCols) => {
+  const data = tableData.value.map(row => {
+    const rowData = {};
+    tableCols.forEach(column => {
+      rowData[column.label] = row[column.prop];
+    });
+    return rowData;
+  });
+
+  const worksheet = XLSX.utils.json_to_sheet(data);
+  const workbook = XLSX.utils.book_new();
+  XLSX.utils.book_append_sheet(workbook, worksheet, params.sys_id);
+  XLSX.writeFile(workbook, 'exported_table.xlsx');
+};
+const currentRow = ref()
+const dialogYgjjmx = ref(false)
+function handlePrint() {
+  dialogYgjjmx.value = true
+}
+
+
+
+// 添加弹窗可见性控制变量
+const dialogVisible = ref(false)
+
+const jjgzzhysformData = reactive({
+  date: '',
+  start_date: '',
+  end_date: '',
+  vacation_one_start: '',
+  vacation_one_end: '',
+  vacation_two_start: '',
+  vacation_two_end: '',
+});
+
+// 添加触发弹窗显示的方法(对应您提到的onSalary)
+const onSalary = () => {
+  // 每次打开弹窗时重置或初始化日期
+  const currentDate = new Date();
+  const year = currentDate.getFullYear();
+  const month = currentDate.getMonth() + 1;
+  const formattedMonth = month < 10 ? '0' + month : month;
+  jjgzzhysformData.date = year.toString() + formattedMonth.toString();
+  formatAndSetDates(jjgzzhysformData.date);
+  
+  // 显示弹窗
+  dialogVisible.value = true;
+};
+
+// 弹窗关闭前的处理函数
+const handleClose = () => {
+  dialogVisible.value = false;
+};
+
+// 封装日期格式化和处理月份范围的逻辑为一个函数
+const formatAndSetDates = (yearMonth) => {
+  // 提取年份和月份
+  const yearPart = yearMonth.slice(0, 4);
+  const monthPart = yearMonth.slice(4);
+  // 构建开始日期和结束日期的字符串
+  const startDateString = `${yearPart}-${monthPart}-01`;
+  const endDateString = `${yearPart}-${monthPart}-${new Date(yearPart, monthPart, 0).getDate()}`;
+  // 设置开始日期和结束日期
+  jjgzzhysformData.start_date = startDateString;
+  jjgzzhysformData.end_date = endDateString;
+};
+
+// 考勤年月回车时调用
+const jgzzhysProductValue = () => {
+  formatAndSetDates(jjgzzhysformData.date);
+};
+
+// 考勤年月按钮 继续
+const kqny = ref('')
+const jjgzzhysclick = async () => {
+  var date = jjgzzhysformData.date;//202403
+  var year = date.slice(0, 4);//2024
+  var month = date.slice(4);//03
+  if (month < 1 || month > 12) {
+    ElMessage({type: 'warning',message: '月份必须在1到12月之间'})
+    return false;
+  } else {
+    if (month.length === 1) {
+      month = '0' + month;
+    }
+     kqny.value = year+'-'+month;
+  }
+  
+  function formatDate(dateString) {
+    if (dateString === null || dateString === '') {
+      return '';
+    }
+    const formattedDate = new Date(dateString);
+    const year = formattedDate.getFullYear();
+    const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
+    const day = String(formattedDate.getDate()).padStart(2, '0');
+    return `${year}-${month}-${day}`;
+  }
+  
+  var dateMonth = kqny.value.slice(-2);//获取date后两位月份
+  //开始日期结束日期
+  if (formatDate(jjgzzhysformData.start_date).slice(5, 7) !== dateMonth && formatDate(jjgzzhysformData.end_date).slice(5, 7) !== dateMonth) {
+    ElMessage({type: 'warning',message: '考勤月份和开始日期和结束日期的月份不一致'})
+    return false;
+  }
+  //法定假日1开始日期结束日期
+  if (jjgzzhysformData.vacation_one_start && formatDate(jjgzzhysformData.vacation_one_start).slice(5, 7) !== dateMonth && jjgzzhysformData.vacation_one_end && formatDate(jjgzzhysformData.vacation_one_end).slice(5, 7) !== dateMonth) {
+    ElMessage({ type: 'warning', message: '考勤月份和法定假日1的月份不一致' });
+    return false;
+  }
+  //法定假日2开始日期结束日期
+  if (jjgzzhysformData.vacation_two_start && formatDate(jjgzzhysformData.vacation_two_start).slice(5, 7) !== dateMonth && jjgzzhysformData.vacation_two_end && formatDate(jjgzzhysformData.vacation_two_end).slice(5, 7) !== dateMonth) {
+    ElMessage({ type: 'warning', message: '考勤月份和开法定假日2的月份不一致' });
+    return false;
+  }
+  
+  //返回接口数据
+  const formattedData = {
+    sys_id: userStore.userInfo.nickName,
+    month: kqny.value,
+    startDay: formatDate(jjgzzhysformData.start_date),
+    endDay: formatDate(jjgzzhysformData.end_date),
+    // vacation_one_start: formatDate(jjgzzhysformData.vacation_one_start),
+    // vacation_one_end: formatDate(jjgzzhysformData.vacation_one_end),
+    // vacation_two_start: formatDate(jjgzzhysformData.vacation_two_start),
+    // vacation_two_end: formatDate(jjgzzhysformData.vacation_two_end)
+  };
+  
+  console.log(formattedData);
+  // return;
+  const staffSalaryCount_add = await salaryCalculation(formattedData);//调用接口
+  console.log(staffSalaryCount_add);
+  
+  if (staffSalaryCount_add.code === 0) {
+    ElMessage({type: 'success',message: staffSalaryCount_add.msg})
+    // 成功后关闭弹窗
+    dialogVisible.value = false;
+  } else {
+    ElMessage({type: 'error',message: '更新失败'})
+  }
+};
+
+
+
+// 生命周期钩子
+onMounted(async () => {
+});
+</script>
+
+<style>
+.JKWTree-container {
+  display: flex;
+}
+
+.JKWTree-tree-rgz {
+  width: 150px;
+  background-color: #fff;
+  padding: 10px;
+  margin-right: 20px;
+}
+
+.JKWTree-tree-rgz h3 {
+  font-size: 15px;
+  font-weight: 700;
+  margin: 10px 0;
+}
+
+.JKWTree-content {
+  flex: 1;
+}
+
+/* 选中某行时的背景色*/
+.el-table__body tr.current-row>td {
+  background: #ff80ff !important;
+  /* 背景颜色 */
+}
+.bt {
+  margin-left: 2px !important;
+  padding: 3px !important;
+  font-size: 12px;
+}
+</style>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio