Przeglądaj źródła

计件工计时单删除功能 / 工序大废品、工单核验单、计件工计时单、其他计件单员工回车事件优化代码样式调整

曹鹤洋 1 rok temu
rodzic
commit
1b360857b5

+ 1234 - 1101
src/view/job/related/related.vue

@@ -1,1121 +1,1254 @@
-<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
-	        @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="输入员工编号" style="width: 180px;"/>
-					<el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
-					<el-button type="primary" class="bt" icon="" @click="oncopy">组员复制</el-button>
-					<el-button type="primary" class="bt" icon="edit" @click="onrelevancy">关联工资设置</el-button>
-					<div style="margin-left: auto;">
-						<el-button type="primary" class="bt" icon="download" @click="exportExcel">导出到Excel(汇总)</el-button>
-						<el-button type="primary" class="bt" icon="download" @click="exportExcel2">导出到Excel(明细)</el-button>
-					</div>
-				</el-form-item>
-            </el-form>
-            <!-- 数据展示 -->
-            <el-table ref="multipleTable" style="width: 100%;height: 40vh;" tooltip-effect="dark" :data="tableData" row-key="ID" 
-				highlight-current-row="true" border
-				:row-style="{ height: '0px' }"
-				:header-row-style="{ height: '20px' }"
-				:header-cell-style="{ padding: '0px' }"
-				size="small"
-				:show-overflow-tooltip="true" @row-click="ontable" 
-				@selection-change="handleSelectionChange" @row-dblclick="doubleClick">
-              <!-- <el-table-column type="selection" width="55" /> -->
-			  <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="multipleTable" style="width: 100%" height="300px" tooltip-effect="dark" :data="tableData2" row-key="ID"
-		      highlight-current-row="true" border 
-			  :row-style="{ height: '0px' }"
-			  :header-row-style="{ height: '20px' }"
-			  :header-cell-style="{ padding: '0px' }"
-			  size="small"
-			  @selection-change="handleSelectionChange" 
-			  :show-overflow-tooltip="true" @row-dblclick="doubleClick">
-		      <el-table-column type="selection" width="55" />
-		  	  <el-table-column
-		  	    v-for="column in tableCols2"
-		  	    :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>
-          <!-- 弹出框 -->
-          <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="设置"
-            destroy-on-close width="1000px" style="height: 700px;" >
-            <!-- <el-scrollbar height="500px"> -->
-            <el-form :model="formData" label-position="left" ref="elFormRef" :rules="rule">
-
-              <el-row :gutter="24">
-                <el-col :span="8">
-                  <el-form-item label="关联人员工号" prop="name">
-                    <el-input v-model="formData.关联人员工号" @keyup.enter.native="getygsubmit" :clearable="true" style="width: 110px;" />
-					<el-input v-model="formData.关联人员姓名" :readonly=true style="width: 80px; margin-left: 5px;" />
-                  </el-form-item>
-                </el-col>
-				<el-col :span="5">
-				  <el-form-item label="日期" prop="name">
-				    <el-input type="date" max="9999-12-31" v-model="formData.日期" :clearable="true" style="width: 80px; "/>
-				  </el-form-item>
-				</el-col>
-				<el-col :span="4">
-				  <el-form-item label="关联系数" prop="name">
-				        <el-input v-model="formData.日关联系数" :clearable="true"  style="width: 100px; "/>
-				  </el-form-item>
-				</el-col>
-				<el-col :span="3">
-					  <el-button type="primary" @click="onflushed">刷新</el-button>
-				</el-col>
-				<el-col :span="4">
-				  <el-form-item label="关联人数" prop="name">
-						<el-input v-model="formData.日关联人数" :readonly=true style="width: 50px; "/>
-				  </el-form-item>
-				</el-col>
-              </el-row>
-            </el-form>
-			
-			
-			<el-table tooltip-effect="dark" :data="relevancyselectData" row-key="ID"
-			  highlight-current-row="true" border
-			  style="width:100%;" height="500px"
-			  :row-style="{ height: '0px' }"
-			  :header-row-style="{ height: '20px' }"
-			  :header-cell-style="{ padding: '0px' }"
-			  size="small"
-			  @row-dblclick="relevancySelectClick"
-			  :selectable="row => rowSelectable(row)"
-			  @selection-change="relevancySelectionChange"
-			>
-			  <el-table-column type="selection" width="55" align="center" label=""/>
-			  <el-table-column prop="日期" label="日期" width="165" />
-			  <el-table-column prop="班组员工编号" label="班组员工编号" width="250" />
-			  <el-table-column prop="组员权重" label="组员权重" width="150" />
-			  <el-table-column prop="计件工资基数" label="计件工资基数" width="170" />
-			  <el-table-column prop="加班工资基数" label="加班工资基数" width="170" />
-			</el-table>
-			
-            <!-- </el-scrollbar> -->
-            <template #header>
-              <el-form-item style="margin-bottom: 0px;">
-                <el-button type="primary" class="bt" icon="plus" @click="batchadd">批量附加组员</el-button>
-				<el-button type="primary" class="bt" icon="delete" @click="batchdel">批量删除组员</el-button>
-				<el-button type="primary" class="bt" icon="edit" @click="uprelevancy">更新关联系数</el-button>
-				<!-- <el-button type="success" class="bt" style="margin-left: 20px !important;" icon="plus" @click="zyadd">新增</el-button>
-				<el-button type="success" class="bt" icon="edit" @click="zyedit">修改</el-button>
-				<el-button type="success" class="bt" icon="delete" @click="zydel">删除</el-button> -->
-              </el-form-item>
-            </template>
-          </el-dialog>
-
-
-          <el-dialog v-model="positioningVisibleshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
-            
-          	<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.员工编号" :clearable="true"  />
-          	        </el-col>
-          	      </el-row>				  
-          	    </el-form-item>
-          	  </el-col>
-			  <el-col :span="6">
-			    <el-form-item label="姓名" prop="name">
-			      <el-row :gutter="20">
-			        <el-col :span="12">
-			          <el-input v-model="formData.姓名" :clearable="true"  />
-			        </el-col>
-			      </el-row>				  
-			    </el-form-item>
-			  </el-col>
-          	</el-row>
-			
-			<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.部门名称" :clearable="true"  />
-			        </el-col>
-			      </el-row>				  
-			    </el-form-item>
-			  </el-col>
-			  <el-col :span="6">
-			    <el-form-item label="职务" prop="name">
-			      <el-row :gutter="20">
-			        <el-col :span="12">
-			          <el-input v-model="formData.职务" :clearable="true"  />
-			        </el-col>
-			      </el-row>				  
-			    </el-form-item>
-			  </el-col>
-			</el-row>
-			
-			
-			<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.入职日期" :clearable="true"  />
-			        </el-col>
-			      </el-row>
-			    </el-form-item>
-			  </el-col>
-			</el-row>
-			
-			
-			<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.关联权重" :clearable="true"  />
-			        </el-col>
-			      </el-row>
-			    </el-form-item>
-			  </el-col>
-			</el-row>
-          </el-dialog>
-         
-		 
-		 <el-dialog v-model="batchaddshow" :before-close="closepositioningVisible" :title="批量附加" 
-		 destroy-on-close width="900px" >
-		   <el-row :gutter="24">
-				<el-col :span="12">
-				  <el-form-item label="定位" prop="name">
-					<el-input v-model="formData.定位" @keyup.enter.native="oninvestigate" :clearable="true" style="width: 200px; margin-right: 5px;" />
-					<el-button type="primary" @click="oninvestigate">查找</el-button>
-				  </el-form-item>
-				</el-col>
-		 	</el-row>
-		 	<el-table tooltip-effect="dark" :data="batchaddselectData" row-key="ID"
-		 	  highlight-current-row="true" border
-		 	  style="width:100%" height="400px"
-		 	  @row-dblclick="batchaddSelectClick"
-		 	  :selectable="row => rowSelectable(row)"
-		 	  @selection-change="batchaddSelectionChange"
-		 	>
-		 	  <el-table-column type="selection" width="40" align="center" />
-		 	  <el-table-column prop="日期" label="日期" width="100" />
-		 	  <el-table-column prop="所在部门" label="所在部门" width="115" />
-		 	  <el-table-column prop="班组" label="班组" width="55" />
-		 	  <el-table-column prop="职称职务" label="职称职务" width="150" />
-		 	  <el-table-column prop="班组员工编号" label="班组员工编号" width="160" />
-			  <el-table-column prop="个人计件工资" label="计件工资基数" width="120" />
-			  <el-table-column prop="个人加班工资" label="加班工资基数" width="120" />
-
-		 	</el-table>	
-				
-			<template #footer>
-			  <div class="dialog-footer">
-				<el-button @click="batchup">提 交</el-button>
-			  </div>
-			</template>
-		 </el-dialog>
-		 
-		 
-		 <el-dialog v-model="copyshow" :before-close="closepositioningVisible" :title="复制" destroy-on-close  width="700px" >
-		   <el-row :gutter="24">
-		     <el-col :span="9">
-		       <el-form-item label="日期:" prop="name" class="mab">
-		        <el-input type="date" max="9999-12-31" v-model="formData.old_time" @blur="getcopylist" @keyup.enter.native="getcopylist" :clearable="true" />
-		       </el-form-item>
-		     </el-col>
-		     <el-col :span="9">
-		       <el-form-item label="复制成:" prop="name" class="mab">
-		   			<el-input type="date" max="9999-12-31" v-model="formData.new_time" :clearable="true" />
-		       </el-form-item>
-		     </el-col>
-			<el-col :span="6">
-				<el-button type="primary" @click="oncopyup">执行</el-button>
-			</el-col>		 
-		   </el-row>
-		 	
-		 	<el-table tooltip-effect="dark" :data="copyselectData" row-key="ID"
-		 	  highlight-current-row="true" border
-		 	  style="width:100%" height="400px"
-		 	  @row-dblclick="copySelectClick"
-		 	  :selectable="row => rowSelectable(row)"
-		 	  @selection-change="copySelectionChange"
-		 	>
-		 	  <el-table-column type="selection" width="42" align="center"/>
-		 	  <el-table-column prop="员工编号" label="员工编号" width="120" />
-		 	  <el-table-column prop="员工姓名" label="员工姓名" width="120" />
-			  <el-table-column prop="所在部门" label="所在部门" width="200" />
-		 	  <el-table-column prop="职称职务" label="职称职务" width="200" />
-		 	</el-table>	
-		 				
-		 </el-dialog>
-		 
-        </el-main>
-      </el-container>
-    </el-container>
-
-  </div>
-</template>
-
-<script setup>
-import {
-  getList,
-  getTab,
-  dailygetTab,
-  dailygetList,
-  dailygetAllList,
-  dailygetDetail,
-  dailysearch,
-  relatedTab,
-  relatedList,
-  relatedsearch,
-  relatedAllList,
-  setting,
-  getYg,
-  weightDetail,
-  updateNum,
-  batchAddLst,
-  copyLst,
-  batchAdd,
-  batchDel,
-  copy,
-  batchAddSearch
-} from '@/api/jixiaoguanli/jitairibaobiao'
-
-// 全量引入格式化工具 请按需保留
-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, onBeforeMount, nextTick } from 'vue'
-import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
-import { Value } from 'sass'
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-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' },
-  { label: '关联定额补差', prop: '关联定额补差', width: '130' },
-  { label: '关联计时工资', prop: '关联计时工资', width: '130' },
-  { label: '关联工资合计', prop: '关联工资合计', width: '130' },
-]
-const tableCols2 = [
-  { label: '日期', prop: '日期', width: '105' },
-  { label: '员工编号', prop: '员工编号', width: '105' },
-  { label: '员工姓名', prop: '员工姓名', width: '150' },
-  { label: '所在部门', prop: '所在部门', width: '150' },
-  { label: '被关联员工', prop: '被关联员工', width: '125' },
-  { label: '被关联姓名', prop: '被关联姓名', width: '125' },
-  { label: '权重', prop: '权重', width: '105' },
-  { label: '计件工资', prop: '计件工资', width: '105' },
-  { label: '加班工资', prop: '加班工资', width: '105' },
-  { label: '定额补差', prop: '定额补差', width: '105' },
-  { label: '计时工资', prop: '计时工资', width: '105' },
-]
-// 侧边栏数据请求
-const treeData = reactive([]);
-
-const getTabdata = async () => {
-    //接口调用函数
-    const response  = await relatedTab();
-	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({
- 关联人员工号: '',
- 关联人员姓名: '',
- 日关联系数: '',
- 日关联人数: '',
- 日期: '',
-
- 员工编号:'',
- 姓名:'',
- 部门名称:'',
- 职务:'',
- 入职日期:'',
- 关联权重:'',
- 定位:'',
- 
- old_time:'',
- new_time:'',
-})
-
-// 验证规则
-const rule = reactive({
-})
-
-const elFormRef = ref()
-const elSearchFormRef = ref()
-
-// =========== 表格控制部分 ===========
-const tableData = reactive([])
-const tableData2 = reactive([])
-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 () => {
-  const response = await relatedList({
-	  date: params.date, department: params.sys_id,});
-	  if (response.code === 0) {
-		   const originalData = response.data;
-			  const summaryData = generateSummaryData(originalData);
-			  // 将合计数据插入到原始数据中
-			  const combinedData = [];
-			  originalData.forEach((item, index) => {
-				combinedData.push(item);
-				const nextItem = originalData[index + 1];
-				if (nextItem && nextItem['员工姓名'] !== item['员工姓名']) {
-				  // 如果下一个员工姓名与当前不同,插入合计数据
-				  const currentSummary = summaryData.shift();
-				  combinedData.push(currentSummary);
-				 
-				}
-			  });
-			  // 更新表格数据
-			  tableData.splice(0, tableData.length, ...combinedData);
-			  
-	  }
-}
-
-const generateSummaryData = (data) => {
-  const summaryData = [];
-  let currentName = null;
-  let currentSummary = null;
-
-  data.forEach((item, index) => {
-    const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
-    const nextItem = data[index + 1];
-
-    // 更新合计数据
-    if (currentName === name) {
-      currentSummary['日期']++;
-      currentSummary['计件工资'] += parseFloat(item['计件工资']);
-      currentSummary['加班工资'] += parseFloat(item['加班工资']);
-      currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
-    } else {
-      // 如果员工姓名发生改变,或者已经到达数据结尾,将上一个员工的合计数据插入到数组中
-      if (currentSummary) {
-        currentSummary['员工姓名'] = '合计(' + currentSummary['日期'] + '天)';
-        currentSummary['计件工资'] = currentSummary['计件工资'].toFixed(2); // 保留两位小数
-        currentSummary['加班工资'] = currentSummary['加班工资'].toFixed(2);
-        currentSummary['日工资合计'] = currentSummary['日工资合计'].toFixed(2);
-        summaryData.push(currentSummary);
-      }
-
-      // 创建新的合计数据
-      currentSummary = {
-        '员工姓名': name,
-        '日期': 1,
-        '计件工资': parseFloat(item['计件工资']),
-        '加班工资': parseFloat(item['加班工资']),
-        '日工资合计': parseFloat(item['日工资合计'])
-      };
-      currentName = name;
-    }
-
-    // 如果已经到达数据结尾,将最后一个员工的合计数据插入到数组中
-    if (!nextItem) {
-      currentSummary['员工姓名'] = '合计(' + currentSummary['日期'] + '天)';
-      currentSummary['计件工资'] = currentSummary['计件工资'].toFixed(2); // 保留两位小数
-      currentSummary['加班工资'] = currentSummary['加班工资'].toFixed(2);
-      currentSummary['日工资合计'] = currentSummary['日工资合计'].toFixed(2);
-      summaryData.push(currentSummary);
-    }
-  });
-
-  return summaryData;
-};
-let date=ref()
-const handleNodeClick = (node, check) => {
-  //存放当前节点的nodeId
-  if (node.params) {
-    params.date = node.params.date;
-    params.sys_id = node.params.sys_id;
-    total.value = node.params.total;
-	date=node.params.date
-	relatedList({date: params.date, department: params.sys_id,}).then(response=>{
-		  if (response.code === 0) {
-			   const originalData = response.data;
-				  const summaryData = generateSummaryData(originalData);
-				  // 将合计数据插入到原始数据中
-				  const combinedData = [];
-				  originalData.forEach((item, index) => {
-					combinedData.push(item);
-					const nextItem = originalData[index + 1];
-					if (nextItem && nextItem['员工姓名'] !== item['员工姓名']) {
-					  // 如果下一个员工姓名与当前不同,插入合计数据
-					  const currentSummary = summaryData.shift();
-					  combinedData.push(currentSummary);
-					 
-					}
-				  });
-				  // 更新表格数据
-				  tableData.splice(0, tableData.length, ...combinedData);
-				  //选中第一条记录
-				  // ontable(tableData[0])
-		  }
-	})
-  }
-}
-const relevancyselectData=ref([]);
-// 关联工资设置
-const onrelevancy = () => {
-	if(time.value!=undefined && code.value!=undefined){
-		Setting(time.value,code.value)
-	}else{
-		relevancyselectData.value = []
-		// formData.value.日期 = res.data[0].日期.replace(/\./g, "-")
-		// formData.value.关联人员工号 = res.data[0].关联人员工号
-		// formData.value.关联人员姓名 = res.data[0].关联人员姓名
-		// formData.value.日关联人数 = res.data[0].日关联人数
-		// formData.value.日关联系数 = res.data[0].日关联系数
-		dialogFormVisible.value = true
-		// ElMessage({
-		//   type: 'error',
-		//   message: '请选择树形目录中的节点后,再操作此功能!'
-		// })
-	}
-	
-}
-//获取关联工资信息
-const Setting = async (date,code) => {
-
-  const res = await setting({date:date,code:code})
-  if (res.code === 0) {
-	  relevancyselectData.value = res.data
-	  formData.value.日期 = res.data[0].日期.replace(/\./g, "-")
-	  formData.value.关联人员工号 = res.data[0].关联人员工号
-	  formData.value.关联人员姓名 = res.data[0].关联人员姓名
-	  formData.value.日关联人数 = res.data[0].日关联人数
-	  formData.value.日关联系数 = res.data[0].日关联系数
-	  dialogFormVisible.value = true
-  }
-}
-//员工编号回车事件
-const getygsubmit = (event) => {
-	   GetYg()  
-}
-//获取员工信息
-const GetYg = async () => {
-  const response = await getYg({sczl_bh:formData.value.关联人员工号});
-  console.log(response) 
-  if (response.code === 0) {
-	formData.value.关联人员姓名=response.data[0].ygxm
-	formData.value.关联人员工号=response.data[0].员工编号
-	Setting(formData.value.日期,formData.value.关联人员工号)
-  }
-}
-function onflushed() {
-	Setting(formData.value.日期,formData.value.关联人员工号)
-}
-
-const relevancySelection=ref([])
-//列表勾选
-const relevancySelectionChange = (val) => {
-     relevancySelection.value = val.map(item => {
-          return {
-            UniqID: item.UniqID,
-          };
-        });
-		console.log(relevancySelection.value)
-}
-const copyselectData=ref([])
-// 组员复制
-const oncopy = () => {
-	formData.value.old_time = '';
-	formData.value.new_time = '';
-	copyselectData.value = [];
-	copySelection.value = [];
-	copyshow.value=true
-}
-
-//时间回车/失去焦点事件
-const getcopylist = (event, inputName) => {
-	if(formData.value.old_time){
-		copyLst({date:formData.value.old_time}).then(response=>{
-			if (response.code === 0) {
-				copyselectData.value=response.data
+<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 @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="输入员工编号" style="width: 180px;" />
+								<el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
+								<el-button type="primary" class="bt" icon="" @click="oncopy">组员复制</el-button>
+								<el-button type="primary" class="bt" icon="edit" @click="onrelevancy">关联工资设置</el-button>
+								<div style="margin-left: auto;">
+									<el-button type="primary" class="bt" icon="download"
+										@click="exportExcel">导出到Excel(汇总)</el-button>
+									<el-button type="primary" class="bt" icon="download"
+										@click="exportExcel2">导出到Excel(明细)</el-button>
+								</div>
+							</el-form-item>
+						</el-form>
+						<!-- 数据展示 -->
+						<el-table ref="multipleTable" style="width: 100%;height: 40vh;" tooltip-effect="dark"
+							:data="tableData" row-key="ID" highlight-current-row="true" border
+							:row-style="{ height: '0px' }" :header-row-style="{ height: '20px' }"
+							:header-cell-style="{ padding: '0px' }" size="small" :show-overflow-tooltip="true"
+							@row-click="ontable" @selection-change="handleSelectionChange" @row-dblclick="doubleClick">
+							<!-- <el-table-column type="selection" width="55" /> -->
+							<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="multipleTable" style="width: 100%" height="300px" tooltip-effect="dark"
+							:data="tableData2" row-key="ID" highlight-current-row="true" border
+							:row-style="{ height: '0px' }" :header-row-style="{ height: '20px' }"
+							:header-cell-style="{ padding: '0px' }" size="small"
+							@selection-change="handleSelectionChange" :show-overflow-tooltip="true"
+							@row-dblclick="doubleClick">
+							<el-table-column type="selection" width="55" />
+							<el-table-column v-for="column in tableCols2" :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>
+					<!-- 弹出框 -->
+					<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="设置" destroy-on-close
+						width="1000px" style="height: 700px;">
+						<!-- <el-scrollbar height="500px"> -->
+						<el-form :model="formData" label-position="left" ref="elFormRef" :rules="rule">
+
+							<el-row :gutter="24">
+								<el-col :span="8">
+									<el-form-item label="关联人员工号" prop="name">
+										<el-input v-model="formData.关联人员工号" @keyup.enter.native="getygsubmit"
+											:clearable="true" style="width: 110px;" />
+										<el-input v-model="formData.关联人员姓名" :readonly=true
+											style="width: 80px; margin-left: 5px;" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="日期" prop="name">
+										<el-input type="date" max="9999-12-31" v-model="formData.日期" :clearable="true"
+											style="width: 80px; " />
+									</el-form-item>
+								</el-col>
+								<el-col :span="4">
+									<el-form-item label="关联系数" prop="name">
+										<el-input v-model="formData.日关联系数" :clearable="true" style="width: 100px; " />
+									</el-form-item>
+								</el-col>
+								<el-col :span="3">
+									<el-button type="primary" @click="onflushed">刷新</el-button>
+								</el-col>
+								<el-col :span="4">
+									<el-form-item label="关联人数" prop="name">
+										<el-input v-model="formData.日关联人数" :readonly=true style="width: 50px; " />
+									</el-form-item>
+								</el-col>
+							</el-row>
+						</el-form>
+
+
+						<el-table tooltip-effect="dark" :data="relevancyselectData" row-key="ID"
+							highlight-current-row="true" border style="width:100%;" height="500px"
+							:row-style="{ height: '0px' }" :header-row-style="{ height: '20px' }"
+							:header-cell-style="{ padding: '0px' }" size="small" @row-dblclick="relevancySelectClick"
+							:selectable="row => rowSelectable(row)" @selection-change="relevancySelectionChange">
+							<el-table-column type="selection" width="55" align="center" label="" />
+							<el-table-column prop="日期" label="日期" width="165" />
+							<el-table-column prop="班组员工编号" label="班组员工编号" width="250" />
+							<el-table-column prop="组员权重" label="组员权重" width="150" />
+							<el-table-column prop="计件工资基数" label="计件工资基数" width="170" />
+							<el-table-column prop="加班工资基数" label="加班工资基数" width="170" />
+						</el-table>
+
+						<!-- </el-scrollbar> -->
+						<template #header>
+							<el-form-item style="margin-bottom: 0px;">
+								<el-button type="primary" class="bt" icon="plus" @click="batchadd">批量附加组员</el-button>
+								<el-button type="primary" class="bt" icon="delete" @click="batchdel">批量删除组员</el-button>
+								<el-button type="primary" class="bt" icon="edit" @click="uprelevancy">更新关联系数</el-button>
+								<!-- <el-button type="success" class="bt" style="margin-left: 20px !important;" icon="plus" @click="zyadd">新增</el-button>
+				<el-button type="success" class="bt" icon="edit" @click="zyedit">修改</el-button>
+				<el-button type="success" class="bt" icon="delete" @click="zydel">删除</el-button> -->
+							</el-form-item>
+						</template>
+					</el-dialog>
+
+
+					<el-dialog v-model="positioningVisibleshow" :before-close="closepositioningVisible"
+						:title="type==='create'?'添加':'修改'" destroy-on-close>
+
+						<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.员工编号" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="姓名" prop="name">
+									<el-row :gutter="20">
+										<el-col :span="12">
+											<el-input v-model="formData.姓名" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+						</el-row>
+
+						<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.部门名称" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="职务" prop="name">
+									<el-row :gutter="20">
+										<el-col :span="12">
+											<el-input v-model="formData.职务" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+						</el-row>
+
+
+						<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.入职日期" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+						</el-row>
+
+
+						<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.关联权重" :clearable="true" />
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+						</el-row>
+					</el-dialog>
+
+
+					<el-dialog v-model="batchaddshow" :before-close="closepositioningVisible" :title="批量附加"
+						destroy-on-close width="900px">
+						<el-row :gutter="24">
+							<el-col :span="12">
+								<el-form-item label="定位" prop="name">
+									<el-input v-model="formData.定位" @keyup.enter.native="oninvestigate"
+										:clearable="true" style="width: 200px; margin-right: 5px;" />
+									<el-button type="primary" @click="oninvestigate">查找</el-button>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-table tooltip-effect="dark" :data="batchaddselectData" row-key="ID"
+							highlight-current-row="true" border style="width:100%" height="400px"
+							@row-dblclick="batchaddSelectClick" :selectable="row => rowSelectable(row)"
+							@selection-change="batchaddSelectionChange">
+							<el-table-column type="selection" width="40" align="center" />
+							<el-table-column prop="日期" label="日期" width="100" />
+							<el-table-column prop="所在部门" label="所在部门" width="115" />
+							<el-table-column prop="班组" label="班组" width="55" />
+							<el-table-column prop="职称职务" label="职称职务" width="150" />
+							<el-table-column prop="班组员工编号" label="班组员工编号" width="160" />
+							<el-table-column prop="个人计件工资" label="计件工资基数" width="120" />
+							<el-table-column prop="个人加班工资" label="加班工资基数" width="120" />
+
+						</el-table>
+
+						<template #footer>
+							<div class="dialog-footer">
+								<el-button @click="batchup">提 交</el-button>
+							</div>
+						</template>
+					</el-dialog>
+
+
+					<el-dialog v-model="copyshow" :before-close="closepositioningVisible" :title="复制" destroy-on-close
+						width="700px">
+						<el-row :gutter="24">
+							<el-col :span="9">
+								<el-form-item label="日期:" prop="name" class="mab">
+									<el-input type="date" max="9999-12-31" v-model="formData.old_time"
+										@blur="getcopylist" @keyup.enter.native="getcopylist" :clearable="true" />
+								</el-form-item>
+							</el-col>
+							<el-col :span="9">
+								<el-form-item label="复制成:" prop="name" class="mab">
+									<el-input type="date" max="9999-12-31" v-model="formData.new_time"
+										:clearable="true" />
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-button type="primary" @click="oncopyup">执行</el-button>
+							</el-col>
+						</el-row>
+
+						<el-table tooltip-effect="dark" :data="copyselectData" row-key="ID" highlight-current-row="true"
+							border style="width:100%" height="400px" @row-dblclick="copySelectClick"
+							:selectable="row => rowSelectable(row)" @selection-change="copySelectionChange">
+							<el-table-column type="selection" width="42" align="center" />
+							<el-table-column prop="员工编号" label="员工编号" width="120" />
+							<el-table-column prop="员工姓名" label="员工姓名" width="120" />
+							<el-table-column prop="所在部门" label="所在部门" width="200" />
+							<el-table-column prop="职称职务" label="职称职务" width="200" />
+						</el-table>
+
+					</el-dialog>
+
+				</el-main>
+			</el-container>
+		</el-container>
+
+	</div>
+</template>
+
+<script setup>
+	import {
+		getList,
+		getTab,
+		dailygetTab,
+		dailygetList,
+		dailygetAllList,
+		dailygetDetail,
+		dailysearch,
+		relatedTab,
+		relatedList,
+		relatedsearch,
+		relatedAllList,
+		setting,
+		getYg,
+		weightDetail,
+		updateNum,
+		batchAddLst,
+		copyLst,
+		batchAdd,
+		batchDel,
+		copy,
+		batchAddSearch
+	} from '@/api/jixiaoguanli/jitairibaobiao'
+
+	// 全量引入格式化工具 请按需保留
+	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,
+		onBeforeMount,
+		nextTick
+	} from 'vue'
+	import {
+		getPackingSideTable,
+		getPackingTable
+	} from '@/api/mes_api_gty/myapi'
+	import {
+		Value
+	} from 'sass'
+	import {
+		Layout,
+		LayoutContent,
+		LayoutHeader,
+		LayoutSider
+	} from '@arco-design/web-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'
+		},
+		{
+			label: '关联定额补差',
+			prop: '关联定额补差',
+			width: '130'
+		},
+		{
+			label: '关联计时工资',
+			prop: '关联计时工资',
+			width: '130'
+		},
+		{
+			label: '关联工资合计',
+			prop: '关联工资合计',
+			width: '130'
+		},
+	]
+	const tableCols2 = [{
+			label: '日期',
+			prop: '日期',
+			width: '105'
+		},
+		{
+			label: '员工编号',
+			prop: '员工编号',
+			width: '105'
+		},
+		{
+			label: '员工姓名',
+			prop: '员工姓名',
+			width: '150'
+		},
+		{
+			label: '所在部门',
+			prop: '所在部门',
+			width: '150'
+		},
+		{
+			label: '被关联员工',
+			prop: '被关联员工',
+			width: '125'
+		},
+		{
+			label: '被关联姓名',
+			prop: '被关联姓名',
+			width: '125'
+		},
+		{
+			label: '权重',
+			prop: '权重',
+			width: '105'
+		},
+		{
+			label: '计件工资',
+			prop: '计件工资',
+			width: '105'
+		},
+		{
+			label: '加班工资',
+			prop: '加班工资',
+			width: '105'
+		},
+		{
+			label: '定额补差',
+			prop: '定额补差',
+			width: '105'
+		},
+		{
+			label: '计时工资',
+			prop: '计时工资',
+			width: '105'
+		},
+	]
+	// 侧边栏数据请求
+	const treeData = reactive([]);
+
+	const getTabdata = async () => {
+		//接口调用函数
+		const response = await relatedTab();
+		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({
+		关联人员工号: '',
+		关联人员姓名: '',
+		日关联系数: '',
+		日关联人数: '',
+		日期: '',
+
+		员工编号: '',
+		姓名: '',
+		部门名称: '',
+		职务: '',
+		入职日期: '',
+		关联权重: '',
+		定位: '',
+
+		old_time: '',
+		new_time: '',
+	})
+
+	// 验证规则
+	const rule = reactive({})
+
+	const elFormRef = ref()
+	const elSearchFormRef = ref()
+
+	// =========== 表格控制部分 ===========
+	const tableData = reactive([])
+	const tableData2 = reactive([])
+	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 () => {
+		const response = await relatedList({
+			date: params.date,
+			department: params.sys_id,
+		});
+		if (response.code === 0) {
+			const originalData = response.data;
+			const summaryData = generateSummaryData(originalData);
+			// 将合计数据插入到原始数据中
+			const combinedData = [];
+			originalData.forEach((item, index) => {
+				combinedData.push(item);
+				const nextItem = originalData[index + 1];
+				if (nextItem && nextItem['员工姓名'] !== item['员工姓名']) {
+					// 如果下一个员工姓名与当前不同,插入合计数据
+					const currentSummary = summaryData.shift();
+					combinedData.push(currentSummary);
+
+				}
+			});
+			// 更新表格数据
+			tableData.splice(0, tableData.length, ...combinedData);
+
+		}
+	}
+
+	const generateSummaryData = (data) => {
+		const summaryData = [];
+		let currentName = null;
+		let currentSummary = null;
+
+		data.forEach((item, index) => {
+			const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
+			const nextItem = data[index + 1];
+
+			// 更新合计数据
+			if (currentName === name) {
+				currentSummary['日期']++;
+				currentSummary['计件工资'] += parseFloat(item['计件工资']);
+				currentSummary['加班工资'] += parseFloat(item['加班工资']);
+				currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
+			} else {
+				// 如果员工姓名发生改变,或者已经到达数据结尾,将上一个员工的合计数据插入到数组中
+				if (currentSummary) {
+					currentSummary['员工姓名'] = '合计(' + currentSummary['日期'] + '天)';
+					currentSummary['计件工资'] = currentSummary['计件工资'].toFixed(2); // 保留两位小数
+					currentSummary['加班工资'] = currentSummary['加班工资'].toFixed(2);
+					currentSummary['日工资合计'] = currentSummary['日工资合计'].toFixed(2);
+					summaryData.push(currentSummary);
+				}
+
+				// 创建新的合计数据
+				currentSummary = {
+					'员工姓名': name,
+					'日期': 1,
+					'计件工资': parseFloat(item['计件工资']),
+					'加班工资': parseFloat(item['加班工资']),
+					'日工资合计': parseFloat(item['日工资合计'])
+				};
+				currentName = name;
+			}
+
+			// 如果已经到达数据结尾,将最后一个员工的合计数据插入到数组中
+			if (!nextItem) {
+				currentSummary['员工姓名'] = '合计(' + currentSummary['日期'] + '天)';
+				currentSummary['计件工资'] = currentSummary['计件工资'].toFixed(2); // 保留两位小数
+				currentSummary['加班工资'] = currentSummary['加班工资'].toFixed(2);
+				currentSummary['日工资合计'] = currentSummary['日工资合计'].toFixed(2);
+				summaryData.push(currentSummary);
 			}
+		});
+
+		return summaryData;
+	};
+	let date = ref()
+	const handleNodeClick = (node, check) => {
+		//存放当前节点的nodeId
+		if (node.params) {
+			params.date = node.params.date;
+			params.sys_id = node.params.sys_id;
+			total.value = node.params.total;
+			date = node.params.date
+			relatedList({
+				date: params.date,
+				department: params.sys_id,
+			}).then(response => {
+				if (response.code === 0) {
+					const originalData = response.data;
+					const summaryData = generateSummaryData(originalData);
+					// 将合计数据插入到原始数据中
+					const combinedData = [];
+					originalData.forEach((item, index) => {
+						combinedData.push(item);
+						const nextItem = originalData[index + 1];
+						if (nextItem && nextItem['员工姓名'] !== item['员工姓名']) {
+							// 如果下一个员工姓名与当前不同,插入合计数据
+							const currentSummary = summaryData.shift();
+							combinedData.push(currentSummary);
+
+						}
+					});
+					// 更新表格数据
+					tableData.splice(0, tableData.length, ...combinedData);
+					//选中第一条记录
+					// ontable(tableData[0])
+				}
+			})
+		}
+	}
+	const relevancyselectData = ref([]);
+	// 关联工资设置
+	const onrelevancy = () => {
+		if (time.value != undefined && code.value != undefined) {
+			Setting(time.value, code.value)
+		} else {
+			relevancyselectData.value = []
+			// formData.value.日期 = res.data[0].日期.replace(/\./g, "-")
+			// formData.value.关联人员工号 = res.data[0].关联人员工号
+			// formData.value.关联人员姓名 = res.data[0].关联人员姓名
+			// formData.value.日关联人数 = res.data[0].日关联人数
+			// formData.value.日关联系数 = res.data[0].日关联系数
+			dialogFormVisible.value = true
+			// ElMessage({
+			//   type: 'error',
+			//   message: '请选择树形目录中的节点后,再操作此功能!'
+			// })
+		}
+
+	}
+	//获取关联工资信息
+	const Setting = async (date, code) => {
+
+		const res = await setting({
+			date: date,
+			code: code
 		})
-	}
-}
-const copySelection=ref([])
-//列表勾选
-const copySelectionChange = (val) => {
-       copySelection.value = val.map(item => {
-          return {
-            old_time:formData.value.old_time,
-			new_time:formData.value.new_time,
-            关联员工: item.员工编号
-          };
-        });
-}
-const oncopyup = () => {
-	if(!formData.value.old_time){
-		ElMessage({
-		  type: 'error',
-		  message: '请填写日期'
+		if (res.code === 0) {
+			relevancyselectData.value = res.data
+			formData.value.日期 = res.data[0].日期.replace(/\./g, "-")
+			formData.value.关联人员工号 = res.data[0].关联人员工号
+			formData.value.关联人员姓名 = res.data[0].关联人员姓名
+			formData.value.日关联人数 = res.data[0].日关联人数
+			formData.value.日关联系数 = res.data[0].日关联系数
+			dialogFormVisible.value = true
+		}
+	}
+	//员工编号回车事件
+	const getygsubmit = (event) => {
+		GetYg()
+	}
+	//获取员工信息
+	const GetYg = async () => {
+		const response = await getYg({
+			sczl_bh: formData.value.关联人员工号
+		});
+		console.log(response)
+		if (response.code === 0) {
+			formData.value.关联人员姓名 = response.data[0].ygxm
+			formData.value.关联人员工号 = response.data[0].员工编号
+			Setting(formData.value.日期, formData.value.关联人员工号)
+		}
+	}
+
+	function onflushed() {
+		Setting(formData.value.日期, formData.value.关联人员工号)
+	}
+
+	const relevancySelection = ref([])
+	//列表勾选
+	const relevancySelectionChange = (val) => {
+		relevancySelection.value = val.map(item => {
+			return {
+				UniqID: item.UniqID,
+			};
+		});
+		console.log(relevancySelection.value)
+	}
+	const copyselectData = ref([])
+	// 组员复制
+	const oncopy = () => {
+		formData.value.old_time = '';
+		formData.value.new_time = '';
+		copyselectData.value = [];
+		copySelection.value = [];
+		copyshow.value = true
+	}
+
+	//时间回车/失去焦点事件
+	const getcopylist = (event, inputName) => {
+		if (formData.value.old_time) {
+			copyLst({
+				date: formData.value.old_time
+			}).then(response => {
+				if (response.code === 0) {
+					copyselectData.value = response.data
+				}
+			})
+		}
+	}
+	const copySelection = ref([])
+	//列表勾选
+	const copySelectionChange = (val) => {
+		copySelection.value = val.map(item => {
+			return {
+				old_time: formData.value.old_time,
+				new_time: formData.value.new_time,
+				关联员工: item.员工编号
+			};
+		});
+	}
+	const oncopyup = () => {
+		if (!formData.value.old_time) {
+			ElMessage({
+				type: 'error',
+				message: '请填写日期'
+			})
+			return
+		}
+		if (!formData.value.new_time) {
+			ElMessage({
+				type: 'error',
+				message: '请填写目标日期'
+			})
+			return
+		}
+		if (copySelection.value.length == 0) {
+			ElMessage({
+				type: 'error',
+				message: '请勾选复制人员'
+			})
+			return
+		}
+		copySelection.value.forEach(subArr => {
+			subArr.old_time = formData.value.old_time;
+			subArr.new_time = formData.value.new_time;
+			subArr.sys_id = sys_id;
+		});
+		copy(copySelection.value).then(response => {
+			if (response.code === 0) {
+				ElMessage({
+					type: 'success',
+					message: '复制成功'
+				})
+				getTableData()
+				copyshow.value = false
+			}
 		})
-		return
+
 	}
-	if(!formData.value.new_time){
-		ElMessage({
-		  type: 'error',
-		  message: '请填写目标日期'
+
+	// 更新关联系数
+	const uprelevancy = () => {
+		ElMessageBox.confirm('确定要执行此操作吗?', '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		}).then(() => {
+			UpdateNum()
 		})
-		return
 	}
-	if(copySelection.value.length==0){
-		ElMessage({
-		  type: 'error',
-		  message: '请勾选复制人员'
+	//更新关联系数
+	const UpdateNum = async () => {
+		const response = await updateNum({
+			date: formData.value.日期,
+			code: formData.value.关联人员工号,
+			num: formData.value.日关联系数
+		});
+
+		if (response.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '更新成功'
+			})
+			tableData[rowIndex.value].关联系数 = formData.value.日关联系数
+		}
+	}
+	// 批量删除
+	const batchdel = () => {
+		ElMessageBox.confirm('确定要删除吗?', '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		}).then(() => {
+			BatchDel()
 		})
-		return
 	}
-	copySelection.value.forEach(subArr => {
-	    subArr.old_time = formData.value.old_time;
-	    subArr.new_time = formData.value.new_time;
-	    subArr.sys_id = sys_id;
-	  });
-	copy(copySelection.value).then(response=>{
+	//删除提交
+	const BatchDel = async () => {
+		const response = await batchDel(relevancySelection.value);
 		if (response.code === 0) {
 			ElMessage({
-			  type: 'success',
-			  message: '复制成功'
+				type: 'success',
+				message: '删除成功'
 			})
-			getTableData()
-			copyshow.value=false
+			Setting(formData.value.日期, formData.value.关联人员工号)
 		}
-	})
-		
-}
-
-// 更新关联系数
-const uprelevancy = () => {
-	ElMessageBox.confirm('确定要执行此操作吗?', '提示', {
-	    confirmButtonText: '确定',
-	    cancelButtonText: '取消',
-	    type: 'warning'
-	}).then(() => {
-		UpdateNum()
-	})
-}
-//更新关联系数
-const UpdateNum = async () => {
-  const response = await updateNum({date:formData.value.日期,code:formData.value.关联人员工号,num:formData.value.日关联系数});
-
-  if (response.code === 0) {
-	  ElMessage({
-	    type: 'success',
-	    message: '更新成功'
-	  })
-	 tableData[rowIndex.value].关联系数=formData.value.日关联系数
-  }
-}
-// 批量删除
-const batchdel = () => {
-	ElMessageBox.confirm('确定要删除吗?', '提示', {
-	    confirmButtonText: '确定',
-	    cancelButtonText: '取消',
-	    type: 'warning'
-	}).then(() => {
-		BatchDel()
-	})
-}
-//删除提交
-const BatchDel = async () => {
-  const response = await batchDel(relevancySelection.value);
-  if (response.code === 0) {
-	  ElMessage({
-	    type: 'success',
-	    message: '删除成功'
-	  })
-     Setting(formData.value.日期,formData.value.关联人员工号)
-  }
-}
-//关联表格双击事件
-const relevancySelectClick = (row, column, event) => {
-	console.log(row.日期)
-	console.log(row.班组员工编号)
-    WeightDetail(row.日期,row.班组员工编号)
-}
-//获取关联员工信息
-const WeightDetail = async (date,code) => {
-  const response = await weightDetail({date:date,code:code.split("(")[0]});
-  console.log(response.data[0].员工编号) 
-  if (response.code === 0) {
-	formData.value.员工编号=response.data[0].员工编号
-	formData.value.姓名=response.data[0].姓名
-	formData.value.部门名称=response.data[0].部门名称
-	formData.value.职务=response.data[0].职务
-	formData.value.入职日期=response.data[0].入职日期
-	formData.value.关联权重=response.data[0].关联权重
-	console.log(formData)
-	positioningVisibleshow.value=true
-  }
-}
-
-
-// 批量添加
-const batchadd = () => {
-	if(!formData.value.关联人员工号){
-		ElMessage({
-		  type: 'warning',
-		  message: '请填写关联人员工号'
+	}
+	//关联表格双击事件
+	const relevancySelectClick = (row, column, event) => {
+		console.log(row.日期)
+		console.log(row.班组员工编号)
+		WeightDetail(row.日期, row.班组员工编号)
+	}
+	//获取关联员工信息
+	const WeightDetail = async (date, code) => {
+		const response = await weightDetail({
+			date: date,
+			code: code.split("(")[0]
+		});
+		console.log(response.data[0].员工编号)
+		if (response.code === 0) {
+			formData.value.员工编号 = response.data[0].员工编号
+			formData.value.姓名 = response.data[0].姓名
+			formData.value.部门名称 = response.data[0].部门名称
+			formData.value.职务 = response.data[0].职务
+			formData.value.入职日期 = response.data[0].入职日期
+			formData.value.关联权重 = response.data[0].关联权重
+			console.log(formData)
+			positioningVisibleshow.value = true
+		}
+	}
+
+
+	// 批量添加
+	const batchadd = () => {
+		if (!formData.value.关联人员工号) {
+			ElMessage({
+				type: 'warning',
+				message: '请填写关联人员工号'
+			})
+			return
+		}
+		if (!formData.value.日期) {
+			ElMessage({
+				type: 'warning',
+				message: '请选择日期'
+			})
+			return
+		}
+		if (!formData.value.日关联系数) {
+			ElMessage({
+				type: 'warning',
+				message: '请填写关联系数'
+			})
+			return
+		}
+		BatchAddLst()
+	}
+	const batchaddselectData = ref([])
+
+
+	//批量附加组员列表
+	const BatchAddLst = async () => {
+		const response = await batchAddLst({
+			date: formData.value.日期
+		});
+		if (response.code === 0) {
+			batchaddselectData.value = response.data
+			formData.value.定位 = ''
+			batchaddshow.value = true
+		}
+	}
+
+	// 批量附加组员搜索
+	const oninvestigate = () => {
+		batchAddSearch({
+			date: formData.value.日期,
+			search: formData.value.定位
+		}).then(response => {
+			if (response.code === 0) {
+				batchaddselectData.value = response.data
+			}
 		})
-		return
 	}
-	if(!formData.value.日期){
-		ElMessage({
-		  type: 'warning',
-		  message: '请选择日期'
+
+	const batchaddSelection = ref([])
+	//列表勾选
+	const batchaddSelectionChange = (val) => {
+		batchaddSelection.value = val.map(item => {
+			return {
+				date: formData.value.日期,
+				关联员工: formData.value.关联人员工号,
+				被关联员工: item.bh,
+				关联系数: formData.value.日关联系数,
+			};
+		});
+		console.log(batchaddSelection.value)
+	}
+	//提交
+	const batchup = () => {
+
+		BatchAdd()
+	}
+	//提交数组
+	const BatchAdd = async () => {
+
+		const batch = batchaddSelection.value.map((item) => {
+			return {
+				sys_id: sys_id,
+				...item
+			};
+		});
+		const response = await batchAdd(batch);
+		if (response.code === 0) {
+			Setting(formData.value.日期, formData.value.关联人员工号)
+			batchaddshow.value = false
+		}
+	}
+
+	// 搜索
+	const onSearch = () => {
+		console.log(params.date)
+		console.log(searchInfo.value)
+		console.log(params.sys_id)
+		if (params.date && searchInfo.value && params.sys_id) {
+			Relatedsearch()
+		}
+
+	}
+	//定位
+	const fillTableData = (data) => {
+		tableData.splice(0, tableData.length, ...data);
+	};
+
+	const Relatedsearch = async () => {
+		const response = await relatedsearch({
+			date: params.date,
+			search: searchInfo.value,
+			department: params.sys_id
+		});
+		if (response.code === 0) {
+			const filledData = response.data.map((item) => {
+				return item;
+			});
+
+			// Update table data using await to ensure data is updated before proceeding
+			await fillTableData(filledData);
+		}
+	};
+	// ============== 表格控制部分结束 ===============
+
+	// 获取需要的字典 可能为空 按需保留
+	const setOptions = async () => {}
+
+	// 获取需要的字典 可能为空 按需保留
+	setOptions()
+
+	// 多选数据
+	const multipleSelection = ref([])
+	let code = ref()
+	let time = ref()
+	// 多选
+	const handleSelectionChange = (val, row) => {
+		if (val.length > 0) {
+			multipleSelection.value = val
+			const lenth = val.length
+			code = val[lenth - 1].员工编号
+			time = val[lenth - 1].日期
+			formData.value.员工编号 = val[lenth - 1].员工编号,
+				formData.value.员工姓名 = val[lenth - 1].员工姓名,
+				formData.value.日期 = val[lenth - 1].日期,
+				formData.value.关联系数 = val[lenth - 1].关联系数,
+				formData.value.关联人数 = val[lenth - 1].关联人数
+			val.splice(0, val.length); // 清空 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
 		})
-		return
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '删除成功'
+			})
+			if (tableData.value.length === ids.length && page.value > 1) {
+				page.value--
+			}
+			deleteVisible.value = false
+			getTableData()
+		}
 	}
-	if(!formData.value.日关联系数 ){
-		ElMessage({
-		  type: 'warning',
-		  message: '请填写关联系数'
+
+	// 行为控制标记(弹窗内部需要增还是改)
+	const type = ref('')
+
+	// 更新行
+	const updateCompanyFunc = async (row) => {
+		const res = await findCompany({
+			ID: row.ID
 		})
-		return
-	}
-	BatchAddLst()
-}
-const batchaddselectData=ref([])
-
-
-//批量附加组员列表
-const BatchAddLst = async () => {
-  const response = await batchAddLst({date:formData.value.日期});
-  if (response.code === 0) {
-	  batchaddselectData.value=response.data
-	  formData.value.定位 = ''
-	  batchaddshow.value=true
-  }
-}
-
-// 批量附加组员搜索
-const oninvestigate = () => {
-  batchAddSearch({date:formData.value.日期,search:formData.value.定位}).then(response=>{
-	  if (response.code === 0) {
-	  	  batchaddselectData.value=response.data
-	  }
-  })
-}
-
-const batchaddSelection=ref([])
-//列表勾选
-const batchaddSelectionChange = (val) => {
-     batchaddSelection.value = val.map(item => {
-          return {
-            date: formData.value.日期,
-            关联员工: formData.value.关联人员工号,
-            被关联员工: item.bh,
-            关联系数: formData.value.日关联系数,
-          };
-        });
-		console.log(batchaddSelection.value)
-}
-//提交
-const batchup = () => {
-	
- BatchAdd()
-}
-//提交数组
-const BatchAdd= async () => {
-	
-	const batch = batchaddSelection.value.map((item) => {
-			return { sys_id: sys_id, ...item}; 
-	});
-  const response = await batchAdd(batch);
-  if (response.code === 0) {
-	  Setting(formData.value.日期,formData.value.关联人员工号)
-	  batchaddshow.value=false
-  }
-}
-
-// 搜索
-const onSearch = () => {
-	console.log(params.date)
-	console.log(searchInfo.value)
-	console.log(params.sys_id)
-	if(params.date && searchInfo.value && params.sys_id){
-		Relatedsearch()
-	}
-	
-}
-//定位
-const fillTableData = (data) => {
-  tableData.splice(0, tableData.length, ...data);
-};
-
-const Relatedsearch = async () => {
-  const response = await relatedsearch({
-    date: params.date,
-    search: searchInfo.value,
-    department: params.sys_id
-  });
-  if (response.code === 0) {
-    const filledData = response.data.map((item) => {
-      return item;
-    });
-
-    // Update table data using await to ensure data is updated before proceeding
-    await fillTableData(filledData);
-  }
-};
-// ============== 表格控制部分结束 ===============
-
-// 获取需要的字典 可能为空 按需保留
-const setOptions = async () => {
-}
-
-// 获取需要的字典 可能为空 按需保留
-setOptions()
-
-// 多选数据
-const multipleSelection = ref([])
-let code=ref()
-let time=ref()
-// 多选
-const handleSelectionChange = (val,row) => {
-  if(val.length>0){
-  	multipleSelection.value = val
-  	const lenth=val.length
-  	code=val[lenth-1].员工编号
-	time=val[lenth-1].日期
-	formData.value.员工编号=val[lenth-1].员工编号,
-	formData.value.员工姓名= val[lenth-1].员工姓名,
-	formData.value.日期=val[lenth-1].日期,
-	formData.value.关联系数= val[lenth-1].关联系数,
-	formData.value.关联人数= val[lenth-1].关联人数
-  	val.splice(0, val.length);  // 清空 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 weightDetailVisible = ref(false)
-const batchaddshow = ref(false)
-const copyshow = 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()
-    }
-  })
-}
-// 单击表格操作
-const rowIndex=ref()
-function ontable(row) {
-  console.log(row)
-  code.value=row.员工编号
-  time.value=row.日期
-  rowIndex.value = tableData.indexOf(row);
-  RelatedAllList(time.value.replace(".","").substr(0,6),code.value)
-}
-let temporary = {
-  员工编号: '',
-  员工姓名: '',
-  日期: '',
-  关联系数: '',
-  关联人数: ''
-};
-//获取下列表
-const RelatedAllList = async (date,bh) => {
-  const response = await relatedAllList({date:date,code:bh});
-  if(response.code==0){
-	  console.log(response)
-	   tableData2.splice(0, tableData2.length, ...response.data);
-  }
-}
-// 双击表格操作
-function doubleClick(row, column, event) {
-  // console.log(row, column, event);
-  // // updateCompanyFunc(row);
-  // type.value = 'update';
-  // dialogFormVisible.value = true
-  Setting(time.value,code.value)
-}
-
-// 导出excel
-function exportExcel() {
-	if(tableData.length<1){
-		ElMessage({
-		  type: 'error',
-		  message: '请确认上方表格内是否存在内容'
+		type.value = 'update'
+		if (res.code === 0) {
+			formData.value = res.data.recompany
+			dialogFormVisible.value = true
+		}
+	}
+
+	// 弹窗控制标记
+	const dialogFormVisible = ref(false)
+	const positioningVisibleshow = ref(false)
+	const weightDetailVisible = ref(false)
+	const batchaddshow = ref(false)
+	const copyshow = 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()
+			}
 		})
-	}else{
-		exportExcelFile(tableData,tableCols1)
-	}
- 
-}
-function exportExcel2() {
- 
- if(tableData2.length<1){
- 	ElMessage({
- 	  type: 'error',
- 	  message: '请确认下方表格内是否存在内容'
- 	})
- }else{
- 	exportExcelFile(tableData2,tableCols2)
- }
-}
-const exportExcelFile = (tableData, tableCols) => {
-  const data = tableData.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, 'Sheet1');
-  XLSX.writeFile(workbook, 'exported_table.xlsx');
-};
-
-// 生命周期钩子
-onMounted(async () => {
-});
-</script>
-
-<style>
-.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;
-}
-
-/* 选中某行时的背景色*/
-.el-table__body tr.current-row>td {
-  background: #ff80ff !important;
-  /* 背景颜色 */
-}
+	}
+	// 单击表格操作
+	const rowIndex = ref()
+
+	function ontable(row) {
+		console.log(row)
+		code.value = row.员工编号
+		time.value = row.日期
+		rowIndex.value = tableData.indexOf(row);
+		RelatedAllList(time.value.replace(".", "").substr(0, 6), code.value)
+	}
+	let temporary = {
+		员工编号: '',
+		员工姓名: '',
+		日期: '',
+		关联系数: '',
+		关联人数: ''
+	};
+	//获取下列表
+	const RelatedAllList = async (date, bh) => {
+		const response = await relatedAllList({
+			date: date,
+			code: bh
+		});
+		if (response.code == 0) {
+			console.log(response)
+			tableData2.splice(0, tableData2.length, ...response.data);
+		}
+	}
+	// 双击表格操作
+	function doubleClick(row, column, event) {
+		// console.log(row, column, event);
+		// // updateCompanyFunc(row);
+		// type.value = 'update';
+		// dialogFormVisible.value = true
+		Setting(time.value, code.value)
+	}
+
+	// 导出excel
+	function exportExcel() {
+		if (tableData.length < 1) {
+			ElMessage({
+				type: 'error',
+				message: '请确认上方表格内是否存在内容'
+			})
+		} else {
+			exportExcelFile(tableData, tableCols1)
+		}
+
+	}
+
+	function exportExcel2() {
+
+		if (tableData2.length < 1) {
+			ElMessage({
+				type: 'error',
+				message: '请确认下方表格内是否存在内容'
+			})
+		} else {
+			exportExcelFile(tableData2, tableCols2)
+		}
+	}
+	const exportExcelFile = (tableData, tableCols) => {
+		const data = tableData.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, 'Sheet1');
+		XLSX.writeFile(workbook, 'exported_table.xlsx');
+	};
+
+	// 生命周期钩子
+	onMounted(async () => {});
+</script>
+
+<style>
+	.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;
+	}
+
+	/* 选中某行时的背景色*/
+	.el-table__body tr.current-row>td {
+		background: #ff80ff !important;
+		/* 背景颜色 */
+	}
 </style>
-<style scoped>
-:deep(.el-table td .cell) {
-  line-height: 20px !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;
-}
+<style scoped>
+	:deep(.el-table td .cell) {
+		line-height: 20px !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;
+	}
 </style>

+ 1343 - 1853
src/view/job/rewards/rewards.vue

@@ -1,1859 +1,1349 @@
-<template>
-  <div>
-    <el-container>
-
-      <!-- <el-scrollbar height="550px">
-        <el-aside>
-          <div class="JKWTree-tree">
-            <h3>工序大废品奖惩记录</h3>
-            <el-tree
-              :data="treeData"
-              :props="defaultProps"
-              @node-click="handleNodeClick"
-            />
-          </div>
-        </el-aside>
-      </el-scrollbar> -->
-	  
-	  <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
-	        @node-click="handleNodeClick"
-	      />
-	    </div>
-	  </layout-sider>
-
-      <el-container>
-        <!--        <el-header>dd</el-header>-->
-        <el-main>
-
-          <div class="gva-search-box">
-            <el-form
-              ref="elSearchFormRef"
-              :inline="true"
-              :model="searchInfo"
-              class="demo-form-inline"
-              :rules="searchRule"
-              @keyup.enter="onSubmit"
-            >
-              <el-form-item>
-                <el-input
-                  v-model="detailData.image"
-                  :clearable="true"
-                  placeholder="输入工单编号或产品名称"
-                />
-              </el-form-item>
-              <el-form-item>
-                <el-button
-                  type="primary"
-                  icon="search"
-                  @click="onSubmit"
-				  class="bt"
-                >查询</el-button>
-				<el-button
-				 icon="refresh"
-				 type="primary"
-				 @click="onReset"
-				 class="bt"
-				>切换显示方式</el-button>
-				<el-button
-				  type="primary"
-				  icon="search"
-				  @click="onAdd"
-				  class="bt"
-				>新增</el-button>
-				<el-button
-				  type="primary"
-				  icon="search"
-				  @click="onDel"
-				  class="bt"
-				>删除</el-button>
-                
-              </el-form-item>
-            </el-form>
-          </div>
-          <div class="gva-table-box">
-            <el-table
-              ref="multipleTable"
-              style="width: 100%"
-              border
-              tooltip-effect="dark"
-              :data="tableData"
-              row-key="ID"
-              :show-overflow-tooltip="true"
-              highlight-current-row
-              :row-style="{ height: '20px' }"
-              :cell-style="{ padding: '0px' }"
-              :header-row-style="{ height: '20px' }"
-              :header-cell-style="{ padding: '0px' }"
-              @selection-change="handleSelectionChange"
-              @row-dblclick="handleDoubleClick"
-			  @row-click="Click"
-            >
-              <el-table-column
-                type="selection"
-                width="55"
-              />
-              <el-table-column
-                align="left"
-                label="工单编号"
-                prop="sczl_gdbh"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="印件名称"
-                prop="yj_yjmc"
-                width="210" sortable
-              />
-              <el-table-column
-                align="left"
-                label="日期"
-                prop="sczl_rq"
-                width="100" sortable
-              />
-              <el-table-column
-                align="left"
-                label="流程单备注"
-                prop="sczl_numDesc"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="联数"
-                prop="sczl_ls"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="责任部门"
-                prop="责任部门"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="大废品数"
-                prop="sczl_cl"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="废品类型"
-                prop="sczl_fplxA"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="废品来源"
-                prop="sczl_fplxB"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="奖励班组"
-                prop="Jl_bzdh"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="检验员工"
-                prop="JL_bh1"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="责任班组"
-                prop="sczl_bzdh"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="责任员工1"
-                prop="sczl_bh1"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="责任员工2"
-                prop="sczl_bh2"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="创建用户"
-                prop="sys_id"
-                width="120" sortable
-              />
-              <el-table-column
-                align="left"
-                label="创建时间"
-                prop="sys_rq"
-                width="160" sortable
-              />
-              <el-table-column
-                align="left"
-                label="UNIQID"
-                prop="UniqId"
-                width="120" sortable
-              />
-            </el-table>
-            <div class="gva-pagination">
-              <el-pagination
-                layout="total, sizes, prev, pager, next, jumper"
-                :current-page="page"
-                :page-size="pageSize"
-                :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
-            style="width: 1020px;position: fixed; top: 35%; left: 50%; transform: translate(-50%, -50%);"
-          >
-            <el-scrollbar height="70vh">
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                style="margin-bottom: 0px;"
-                label-position="right"
-                :rules="rule"
-                label-width="80px"
-                aria-="true"
-              >
-                <el-form-item
-                  label="工单编号:"
-                  prop="address"
-                  style="margin-right: 120px;"
-                >
-                  <el-input
-                    v-model="detailData.sczl_gdbh"
-                    @keydown="ent1($event)"
-					@blur="getCPMCsubmit()"
-                    style="width: 120px;"
-                    placeholder="Enter回车"
-                  />
-                </el-form-item>
-                <el-form-item
-                  label="产品名称:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.Gd_cpmc"
-                    @keydown="ent1($event)"
-                    placeholder="请输入产品名称"
-                    style="width: 450px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-                label-width="80px"
-              >
-                <el-form-item
-                  label="印件号:"
-                  prop="address"
-                  style="margin-right: 120px;"
-                >
-                  <el-input
-                    v-model="detailData.sczl_yjno"
-                    @keydown="ent1($event)"
-					@blur="getYJMCsubmit()"
-                    style="width: 120px;"
-                  />
-                </el-form-item>
-                <el-form-item
-                  label="印件名称:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.yj_yjmc"
-                    @keydown="ent1($event)"
-                    style="width: 450px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-                label-width="90px"
-              >
-                <el-form-item
-                  label="工序名称:"
-                  prop="address"
-                >
-                  <el-input
-                    v-model="detailData.sczl_gxmc"
-                    @blur="getGXsubmit()"
-					 @keydown="ent1($event)"
-                    style="width: 300px;"
-                  />
-                </el-form-item>
-                <el-form-item prop="image">
-                  <el-input
-                    v-model="detailData.sczl_gxh"
-                     @keydown="ent1($event)"
-                    style="width: 50px;"
-                  />
-                </el-form-item>
-                <el-form-item
-                  label="流程单备注:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.sczl_numDesc"
-                     @keydown="ent1($event)"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-                label-width="80px"
-              >
-                <el-form-item
-                  label="日期:"
-                  prop="address"
-                  style="margin-right: 120px;"
-                >
-                  <el-input
-                    v-model="detailData.sczl_rq"
-                     @keydown="ent1($event)"
-                    style="width: 120px;"
-                  />
-                </el-form-item>
-                <el-form-item
-                  label="废品数量:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.sczl_cl"
-                     @keydown="ent1($event)"
-                    style="width: 120px;"
-                  />
-                </el-form-item>
-                <el-form-item
-                  label="联数:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.sczl_ls"
-                     @keydown="ent1($event)"
-                    style="width: 120px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-                label-width="90px"
-              >
-                <el-form-item
-                  label="废品备注:"
-                  prop="address"
-                >
-                  <el-input
-                    v-model="detailData.sczl_fplxA"
-                     @keydown="ent1($event)"
-                    style="width: 300px;"
-                  />
-                </el-form-item>
-                <el-form-item>
-                  <el-checkbox
-                    v-model="detailData.sczl_fplxB"
-                    style="width: 30px;"
-					 @keydown="ent1($event)"
-                  >制程废</el-checkbox>
-                </el-form-item>
-                <el-form-item
-                  label="责任部门:"
-                  prop="image"
-                >
-                  <el-input
-                    v-model="detailData.责任部门"
-                     @keydown="ent1($event)"
-                    style="width: 250px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 193px; height: 10px;"
-                  />
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员1</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员2</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员3</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员4</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员5</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员6</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员7</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员8</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员9</div>
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div class="sub-title">奖励班组:</div>
-                  <el-input
-                    v-model="detailData.Jl_bzdh"
-                     @keydown="ent1($event)"
-                    style="width: 45px;"
-                  />
-                  <el-input
-                    v-model="detailData.jl_jtbh"
-                     @blur="getJtbhsubmit('1')"
-					 @keydown="ent1($event)"
-					id="jt"
-                    style="width: 65px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh1"
-                    id="bh1"   @blur="GetYg($event, '2')" @keydown="ent($event, 'jt', 'bh1', 'bh2')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh2"
-                    id="bh2"  @keydown="ent($event, 'bh1', 'bh2', 'bh3')" @blur="GetYg($event, '3')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh3"
-                    id="bh3"  @keydown="ent($event, 'bh2', 'bh3', 'bh4')" @blur="GetYg($event, '4')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh4"
-                    id="bh4"  @keydown="ent($event, 'bh3', 'bh4', 'bh5')" @blur="GetYg($event, '5')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh5"
-                    id="bh5"  @keydown="ent($event, 'bh4', 'bh5', 'bh6')" @blur="GetYg($event, '6')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh6"
-                    id="bh6"  @keydown="ent($event, 'bh5', 'bh6', 'bh7')" @blur="GetYg($event, '7')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh7"
-                    id="bh7"  @keydown="ent($event, 'bh6', 'bh7', 'bh8')" @blur="GetYg($event, '8')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh8"
-                    id="bh8"  @keydown="ent($event, 'bh7', 'bh8', 'bh9')" @blur="GetYg($event, '9')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_bh9"
-                    id="bh9"
-                    @keydown="ent($event, 'bh8', 'bh9', 'name1', '9')"
-                    @blur="GetYg($event, '10')"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 182px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname1"
-                    id="name1"
-					 @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname2"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname3"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname4"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname5"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname6"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname7"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname8"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.jlname9"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 182px;"
-                  >奖励金额:</div>
-                  <el-input
-                    v-model="detailData.JL_Je1"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je2"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je3"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je4"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je5"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je6"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je7"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je8"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.JL_Je9"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 193px; height: 10px;"
-                  />
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员1</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员2</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员3</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员4</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员5</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员6</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员7</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员8</div>
-                  <div
-                    class="sub-title"
-                    style="width: 83.5px; height: 10px;"
-                  >组员9</div>
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div class="sub-title">责任班组:</div>
-                  <el-input
-                    v-model="detailData.sczl_bzdh"
-                     @keydown="ent1($event)"
-                    style="width: 45px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_jtbh"
-                    id="jt2"
-					 @blur="getJtbhsubmit('2')"
-					 @keydown="ent1($event)"
-                    style="width: 65px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh1"
-                    id="dh1"  @keydown="ent($event, 'jt2', 'dh1', 'dh2')" @blur="GetYg($event, '13')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh2"
-                    id="dh2"  @keydown="ent($event, 'dh1', 'dh2', 'dh3')" @blur="GetYg($event, '14')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh3"
-                   id="dh3"  @keydown="ent($event, 'dh2', 'dh3', 'dh4')" @blur="GetYg($event, '15')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh4"
-                   id="dh4"  @keydown="ent($event, 'dh3', 'dh4', 'dh5')" @blur="GetYg($event, '16')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh5"
-                    id="dh5"  @keydown="ent($event, 'dh4', 'dh5', 'dh6')" @blur="GetYg($event, '17')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh6"
-                    id="dh6"  @keydown="ent($event, 'dh5', 'dh6', 'dh7')" @blur="GetYg($event, '18')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh7"
-                    id="dh7"  @keydown="ent($event, 'dh6', 'dh7', 'dh8')" @blur="GetYg($event, '19')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh8"
-                   id="dh8"  @keydown="ent($event, 'dh7', 'dh8', 'dh9')" @blur="GetYg($event, '20')"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_bh9"
-                    id="dh9" @keydown="ent1($event)"  @blur="GetYg($event, '21')"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 182px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname1"
-                    id="name2"
-					 @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname2"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname3"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname4"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname5"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname6"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname7"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname8"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.zrname9"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </el-form>
-              <el-form
-                ref="elFormRef"
-                :model="detailData"
-                :inline="true"
-                label-position="right"
-                :rules="rule"
-              >
-                <el-form-item>
-                  <div
-                    class="sub-title"
-                    style="width: 182px;"
-                  >处罚金额:</div>
-                  <el-input
-                    v-model="detailData.sczl_je1"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je2"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je3"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je4"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je5"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je6"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je7"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je8"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                  <el-input
-                    v-model="detailData.sczl_je9"
-                     @keydown="ent1($event)"
-                    style="width: 85px;"
-                  />
-                </el-form-item>
-              </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="dialogSelectVisible" title="选择" destroy-on-close width="500px" @keydown="selectGX($event)">
-		    <el-table tooltip-effect="dark" :data="selectData" row-key="ID" 
-			highlight-current-row="true" border style="width:100%" @row-dblclick="handleSelectClick" ref="table2">
-		      <el-table-column label="工序名称" width="460">
-		        <template v-slot="{ row }">
-		          {{ row }}
-		        </template>
-		      </el-table-column>
-		    </el-table>
-		  </el-dialog>
-		  <el-dialog v-model="dialogSelectVisible_Yj" title="选择" destroy-on-close width="600px" @keydown="selectGX_Yj($event)" >
-		              <el-table tooltip-effect="dark" :data="selectData_Yj"
-		                row-key="ID" highlight-current-row="true"
-		                border style="width:100%"
-		                @row-dblclick="handleSelectClick_Yj" ref="table_Yj"
-		              >
-		  			  <el-table-column prop="印件号" label="印件号" width="100" />
-		                <el-table-column prop="印件名称" label="印件名称" width="460" />			 
-		              </el-table>
-		            </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>
-		  <el-dialog v-model="JtbhVisible" title="选择" destroy-on-close width="200px" >
-		    <el-table tooltip-effect="dark" :data="selectDataJtbh" row-key="ID"
-		      highlight-current-row="true" border style="width:100%"
-		      @row-dblclick="SelectClickJtbh"
-		    >
-		      <el-table-column prop="设备编号" label="设备编号" width="160" />			        	 			        	 
-		    </el-table>
-		  </el-dialog>
-
-
-		  
-
-          <el-dialog
-            v-model="detailShow"
-            style="width: 800px"
-            lock-scroll
-            :before-close="closeDetailShow"
-            title="查看详情"
-            destroy-on-close
-          >
-            <el-scrollbar height="550px">
-              <el-descriptions
-                column="1"
-                border
-              >
-                <el-descriptions-item label="address字段">
-                  {{ detailData.address }}
-                </el-descriptions-item>
-                <el-descriptions-item label="image字段">
-                  {{ detailData.image }}
-                </el-descriptions-item>
-                <el-descriptions-item label="name字段">
-                  {{ detailData.name }}
-                </el-descriptions-item>
-              </el-descriptions>
-            </el-scrollbar>
-          </el-dialog>
-
-        </el-main>
-
-      </el-container>
-    </el-container>
-
-  </div>
-</template>
-
-<script setup>
-import { getRewardDetail, getRewardList, getRewardTab, getRewardTabByGd,JunkWorkOrderList,PrintCodeList,
-ProcessList,MachineClassList,MachineList,JunkDetailDel,JunkDetailEdit,JunkDetailAdd} from '@/api/mes/job'
-import {getYg} from '@/api/jixiaoguanli/jitairibaobiao'
-import { createCompany, deleteCompany, deleteCompanyByIds, findCompany, updateCompany } from '@/api/company'
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
-// 全量引入格式化工具 请按需保留
-import { ElMessage, ElMessageBox } from 'element-plus'
-import { ref, reactive, nextTick, onMounted, onBeforeMount } from 'vue'
-import { useUserStore } from '@/pinia/modules/user'
-const userStore = useUserStore() 
-const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
-defineOptions({
-  name: 'Company'
-})
-
-const treeData = ref([])
-const displayMod = ref('')
-// 侧边栏
-const RewardTab = async() => {
-  const getRewardTabs = await getRewardTab()
-  if (getRewardTabs.code === 0) {
-    treeData.value = getRewardTabs.data.map((item) => ({
-      label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
-      params: {
-        date: item.date.replace(/\./g, '-'),
-      }
-    }))
-    displayMod.value = 'date'
-  }
-}
-RewardTab()
-
-const RewardTabByGd = async() => {
-  const getRewardTabs = await getRewardTabByGd()
-  if (getRewardTabs.code === 0) {
-    treeData.value = getRewardTabs.data.map((item) => ({
-      label: item.label,
-      params: {
-        date: item.sczl_gdbh
-      }
-    }))
-    displayMod.value = 'gd'
-  }
-}
-
-const handleNodeClick = (node, check) => {
-  // 存放当前节点的nodeId
-  // console.log(node, check)
-  if (node.params) {
-    params.date = node.params.date
-    getTableData()
-  }
-}
-
-// 切换显示方式
-const onReset = () => {
-  if (displayMod.value === 'date') {
-    RewardTabByGd()
-  } else {
-    RewardTab()
-  }
-}
-
-// 验证规则
-const rule = reactive({
-})
-
-const searchRule = reactive({
-  createdAt: [
-    { validator: (rule, value, callback) => {
-      if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
-        callback(new Error('请填写结束日期'))
-      } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
-        callback(new Error('请填写开始日期'))
-      } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
-        callback(new Error('开始日期应当早于结束日期'))
-      } else {
-        callback()
-      }
-    }, trigger: 'change' }
-  ],
-})
-
-const elFormRef = ref()
-const elSearchFormRef = ref()
-
-// =========== 表格控制部分 ===========
-const page = ref(1)
-const total = ref(0)
-const pageSize = ref(10)
-const tableData = ref([])
-const searchInfo = ref({})
-const params = {
-  date: '',
-  page: page.value.toString(),
-  limit: pageSize.value.toString(),
-}
-
-// 搜索
-const onSubmit = () => {
-  elSearchFormRef.value?.validate(async(valid) => {
-    if (!valid) return
-    page.value = 1
-    pageSize.value = 10
-    getTableData()
-  })
-}
-
-// 分页
-const handleSizeChange = (val) => {
-  pageSize.value = val
-  params.limit = val.toString()
-  getTableData()
-}
-
-// 修改页面容量
-const handleCurrentChange = (val) => {
-  page.value = val
-  params.page = val.toString()
-  getTableData()
-}
-
-// 查看详情
-const detailData = reactive({})
-const handleDoubleClick = async(row) => {
-  type.value = 'update';
-  const { UniqId } = row
-  console.log(UniqId)
-  const res = await getRewardDetail({ UniqId })
-  console.log(res)
-  if (res.code === 0) {
-    console.log(res)
-    Object.assign(detailData, res.data[0])
-    dialogFormVisible.value = true
-  }
-}
-let lastCellValue=ref()
-// 单击表格操作
-function Click(row, column, event) {
-    lastCellValue= row['UniqId'];
-	console.log(lastCellValue)
-}
-// 查询
-const getTableData = async() => {
-  const table = await getRewardList(params)
-  if (table.code === 0) {
-    tableData.value = table.data.rows
-    total.value = table.data.total
-  }
-}
-const ADD=ref('0')
-//新增
-function onAdd() {
-	ADD.value='新增'
-	type.value = 'create'
-	GetInfo(lastCellValue)
-	// Productionadd()
-}
-// getTableData()
-//获取详细信息
-const GetInfo = async (value) => {
-  const res = await getRewardDetail({ UniqId:value })
-  if (res.code === 0) {
-	 console.log(res)
-	 Object.assign(detailData, res.data[0])
-	 dialogFormVisible.value = true
-  }
-}
-//工单编号回车事件
-const getCPMCsubmit = () => {
-	if(detailData.sczl_gdbh!=''){
-		JunkWorkOrderList({search:detailData.sczl_gdbh}).then(response=>{
-		  if (response.code === 0) {
-			  detailData.Gd_cpmc = response.data[0].产品名称			  
-			}else{
-				detailData.Gd_cpmch = '';
-			}
-		});
-		PrintCodeList({workorder:detailData.sczl_gdbh}).then(response=>{
-		  if (response.code === 0) {
-			  detailData.sczl_yjno = response.data[0].印件号	
-			  detailData.yj_yjmc = response.data[0].印件名称	
-			}else{
-				detailData.sczl_yjno = ''
-				detailData.yj_yjmc = ''
-			}
-		});
-	}else{
-		ElMessage({
-		  type: 'error',
-		  message: '请注意, 工单编号输入空置, 除非有特殊需要!'
-		})
-	}
-}
-//印件号失去焦点事件
-const getYJMCsubmit = () => {
- if(detailData.sczl_gdbh!=''){
- 	//获取印件名称
-	PrintCodeList({workorder:detailData.sczl_gdbh}).then(response=>{
- 	  if (response.code === 0) {
-		  if(response.data.length==1){
-			  detailData.sczl_yjno = response.data[0]['印件号']
-			  detailData.yj_yjmc = response.data[0]['印件名称']
-		  }else if(response.data.length > 1){
-			  selectData_Yj.splice(0, selectData_Yj.length, ...response.data)
-			  setGXCurrent_Yj(selectData_Yj[0])
-			  dialogSelectVisible_Yj.value=true
-		  }else{
- 			detailData.sczl_yjno = ''
- 			detailData.yj_yjmc = ''
-		  }
- 		  
-		  
- 		}
- 	});
- }
-}
-const dialogSelectVisible_Yj = ref(false)
-const selectData_Yj = reactive([])
-// 处理选择框
-const handleSelectClick_Yj = (row, column, event) => {
-  detailData.sczl_yjno = row.印件号
-  detailData.yj_yjmc = row.印件名称
-  dialogSelectVisible_Yj.value = false
-}
-const currentIndex_Yj = ref(0);
-const GXCurrent_Yj = ref(0);
-const selectGX_Yj = (event) => {
-    if (event.keyCode === 40) { // 向下箭头
-        if (currentIndex_Yj.value < selectData_Yj.length - 1) {
-            currentIndex_Yj.value++;
-            setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]);
-        } else {
-            currentIndex_Yj.value = 0;
-            setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]); // 到达最后一行时回到第一行			
-        }
-    } else if (event.keyCode === 38) { // 向上箭头
-        if (currentIndex_Yj.value > 0) {
-            currentIndex_Yj.value--;
-            setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]);
-        } else {
-            currentIndex_Yj.value = selectData_Yj.length - 1;
-            setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]); // 到达第一行时回到最后一行
-        }
-    } else if (event.keyCode === 13) { // 回车键
-        dialogSelectVisible_Yj.value = false;
-    }
-}
-const table_Yj = ref()
-const setGXCurrent_Yj = (row) => {
-  setTimeout(()=>{
-	  table_Yj.value?.setCurrentRow(row) 
-	  detailData.sczl_yjno = row.印件号
-	  detailData.yj_yjmc = row.印件名称
-  })
-}
-
-const dialogSelectVisible=ref(false)
-const selectData=reactive([])
-//工序失去焦点事件
-const getGXsubmit = () => {
-	//弹出选择
-	ProcessList({workorder:detailData.sczl_gdbh,yjno: detailData.sczl_yjno}).then(response=>{
-		if (response.code === 0) {
-			  selectData.splice(0, selectData.length, ...response.data)
-			  console.log(selectData)
-			  dialogSelectVisible.value=true			
-		  }
-	})		
-}
-// 工单选择框
-const handleSelectClick = (row, column, event) => {
-  console.log(row)
-  detailData.sczl_gxmc=row
-  dialogSelectVisible.value=false
-}
-//机台选择
-const selectDataJtbh = reactive([])
-const JtbhVisible = ref(false)
-const SelectClickJtbh = (row, column, event) => {
-  const {设备编号 } = row
- if(jtbh.value==='JL'){
- 	detailData.jl_jtbh=row.设备编号
- }else if(jtbh.value==='ZR'){
- 	detailData.sczl_jtbh=row.设备编号
- }
-  JtbhVisible.value = false
-}
-const jtbh=ref()
-//机台失去焦点事件
-const getJtbhsubmit = (value) => {
-	if(value==='1'){
-		jtbh.value='JL'
-	}else if(value==='2'){
-		jtbh.value='ZR'
-	}
-	console.log(jtbh.value)
-	MachineList().then(response=>{
-		if (response.code === 0) {			
-		selectDataJtbh.splice(0, selectDataJtbh.length, ...response.data)
-		JtbhVisible.value=true				  
-		}
-	})
-}
-
-let num = '';
-let flag_Yg = true;
-//获取员工信息
-const GetYg = (event, inputName) => {
-  num = parseInt(inputName) - 1;
-  if (num >= 1 && num <= 10) {
-	  if(detailData['JL_bh' + num]==undefined || detailData['JL_bh' + num]==''){
-		  detailData['jlname' + num] = '';
-		  detailData['JL_bh' + num] = '';
-		  return
-	  }
-	  flag_Yg = true;
-    getYg({ sczl_bh: detailData['JL_bh' + num] }).then(response => {
-		if(response.code==0){
-			if(response.data.length==1){
-				detailData['jlname' + num] = response.data[0].ygxm;
-				detailData['JL_bh' + num] = 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: '未查询到该员工'
-				})
+<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 @node-click="handleNodeClick" />
+				</div>
+			</layout-sider>
+
+			<el-container>
+				<el-main>
+					<div class="gva-table-box">
+						<el-form ref="elSearchFormRef" :inline="true" :model="searchInfo" class="demo-form-inline"
+							:rules="searchRule">
+							<el-form-item>
+								<el-input v-model="detailData.image" :clearable="true" placeholder="输入工单编号或产品名称" style="width: 180px;" />
+								<el-button type="primary" icon="search" @click="onSubmit" class="bt">查询</el-button>
+								<el-button type="primary" icon="refresh" @click="onReset" class="bt">切换显示方式</el-button>
+								<el-button type="primary" icon="plus" @click="onAdd" class="bt">新增</el-button>
+								<el-button type="primary" icon="delete" @click="onDel" class="bt">删除</el-button>
+							</el-form-item>
+						</el-form>
+						<el-table ref="multipleTable" style="width: 100%" border tooltip-effect="dark" :data="tableData"
+							row-key="ID" :show-overflow-tooltip="true" highlight-current-row
+							:row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
+							:header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
+							@selection-change="handleSelectionChange" @row-dblclick="handleDoubleClick"
+							@row-click="Click">
+							<el-table-column type="selection" width="55" />
+							<el-table-column align="left" label="工单编号" prop="sczl_gdbh" width="120" sortable />
+							<el-table-column align="left" label="印件名称" prop="yj_yjmc" width="210" sortable />
+							<el-table-column align="left" label="日期" prop="sczl_rq" width="100" sortable />
+							<el-table-column align="left" label="流程单备注" prop="sczl_numDesc" width="120" sortable />
+							<el-table-column align="left" label="联数" prop="sczl_ls" width="120" sortable />
+							<el-table-column align="left" label="责任部门" prop="责任部门" width="120" sortable />
+							<el-table-column align="left" label="大废品数" prop="sczl_cl" width="120" sortable />
+							<el-table-column align="left" label="废品类型" prop="sczl_fplxA" width="120" sortable />
+							<el-table-column align="left" label="废品来源" prop="sczl_fplxB" width="120" sortable />
+							<el-table-column align="left" label="奖励班组" prop="Jl_bzdh" width="120" sortable />
+							<el-table-column align="left" label="检验员工" prop="JL_bh1" width="120" sortable />
+							<el-table-column align="left" label="责任班组" prop="sczl_bzdh" width="120" sortable />
+							<el-table-column align="left" label="责任员工1" prop="sczl_bh1" width="120" sortable />
+							<el-table-column align="left" label="责任员工2" prop="sczl_bh2" width="120" sortable />
+							<el-table-column align="left" label="创建用户" prop="sys_id" width="120" sortable />
+							<el-table-column align="left" label="创建时间" prop="sys_rq" width="160" sortable />
+							<el-table-column align="left" label="UNIQID" prop="UniqId" width="120" sortable />
+						</el-table>
+						<div class="gva-pagination">
+							<el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"
+								:page-size="pageSize" :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
+						style="width: 1020px;position: fixed; top: 35%; left: 50%; transform: translate(-50%, -50%);">
+						<el-scrollbar height="70vh">
+							<el-form ref="elFormRef" :model="detailData" :inline="true" style="margin-bottom: 0px;"
+								label-position="right" :rules="rule" label-width="80px" aria-="true">
+								<el-form-item label="工单编号:" prop="address" style="margin-right: 120px;">
+									<el-input v-model="detailData.sczl_gdbh" @keydown="ent1($event)"
+										@blur="getCPMCsubmit()" style="width: 120px;" placeholder="Enter回车" />
+								</el-form-item>
+								<el-form-item label="产品名称:" prop="image">
+									<el-input v-model="detailData.Gd_cpmc" @keydown="ent1($event)" placeholder="请输入产品名称"
+										style="width: 450px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule" label-width="80px">
+								<el-form-item label="印件号:" prop="address" style="margin-right: 120px;">
+									<el-input v-model="detailData.sczl_yjno" @keydown="ent1($event)"
+										@blur="getYJMCsubmit()" style="width: 120px;" />
+								</el-form-item>
+								<el-form-item label="印件名称:" prop="image">
+									<el-input v-model="detailData.yj_yjmc" @keydown="ent1($event)"
+										style="width: 450px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule" label-width="90px">
+								<el-form-item label="工序名称:" prop="address">
+									<el-input v-model="detailData.sczl_gxmc" @blur="getGXsubmit()"
+										@keydown="ent1($event)" style="width: 300px;" />
+								</el-form-item>
+								<el-form-item prop="image">
+									<el-input v-model="detailData.sczl_gxh" @keydown="ent1($event)"
+										style="width: 50px;" />
+								</el-form-item>
+								<el-form-item label="流程单备注:" prop="image">
+									<el-input v-model="detailData.sczl_numDesc" @keydown="ent1($event)" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule" label-width="80px">
+								<el-form-item label="日期:" prop="address" style="margin-right: 120px;">
+									<el-input v-model="detailData.sczl_rq" @keydown="ent1($event)"
+										style="width: 120px;" />
+								</el-form-item>
+								<el-form-item label="废品数量:" prop="image">
+									<el-input v-model="detailData.sczl_cl" @keydown="ent1($event)"
+										style="width: 120px;" />
+								</el-form-item>
+								<el-form-item label="联数:" prop="image">
+									<el-input v-model="detailData.sczl_ls" @keydown="ent1($event)"
+										style="width: 120px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule" label-width="90px">
+								<el-form-item label="废品备注:" prop="address">
+									<el-input v-model="detailData.sczl_fplxA" @keydown="ent1($event)"
+										style="width: 300px;" />
+								</el-form-item>
+								<el-form-item>
+									<el-checkbox v-model="detailData.sczl_fplxB" style="width: 30px;"
+										@keydown="ent1($event)">制程废</el-checkbox>
+								</el-form-item>
+								<el-form-item label="责任部门:" prop="image">
+									<el-input v-model="detailData.责任部门" @keydown="ent1($event)" style="width: 250px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 193px; height: 10px;" />
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员1</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员2</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员3</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员4</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员5</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员6</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员7</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员8</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员9</div>
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title">奖励班组:</div>
+									<el-input v-model="detailData.Jl_bzdh" @keydown="ent1($event)"
+										style="width: 45px;" />
+									<el-input v-model="detailData.jl_jtbh" @blur="getJtbhsubmit('1')"
+										@keydown="ent1($event)" id="jt" style="width: 65px;" />
+									<el-input v-model="detailData.JL_bh1" id="bh1" @blur="GetYg($event, '2')"
+										@keydown="ent($event, 'jt', 'bh1', 'bh2')" style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh2" id="bh2"
+										@keydown="ent($event, 'bh1', 'bh2', 'bh3')" @blur="GetYg($event, '3')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh3" id="bh3"
+										@keydown="ent($event, 'bh2', 'bh3', 'bh4')" @blur="GetYg($event, '4')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh4" id="bh4"
+										@keydown="ent($event, 'bh3', 'bh4', 'bh5')" @blur="GetYg($event, '5')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh5" id="bh5"
+										@keydown="ent($event, 'bh4', 'bh5', 'bh6')" @blur="GetYg($event, '6')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh6" id="bh6"
+										@keydown="ent($event, 'bh5', 'bh6', 'bh7')" @blur="GetYg($event, '7')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh7" id="bh7"
+										@keydown="ent($event, 'bh6', 'bh7', 'bh8')" @blur="GetYg($event, '8')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh8" id="bh8"
+										@keydown="ent($event, 'bh7', 'bh8', 'bh9')" @blur="GetYg($event, '9')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_bh9" id="bh9"
+										@keydown="ent($event, 'bh8', 'bh9', 'name1', '9')" @blur="GetYg($event, '10')"
+										style="width: 85px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 182px;" />
+									<el-input v-model="detailData.jlname1" id="name1" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname2" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname3" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname4" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname5" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname6" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname7" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname8" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.jlname9" @keydown="ent1($event)"
+										style="width: 85px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 182px;">奖励金额:</div>
+									<el-input v-model="detailData.JL_Je1" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je2" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je3" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je4" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je5" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je6" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je7" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je8" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.JL_Je9" @keydown="ent1($event)"
+										style="width: 85px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 193px; height: 10px;" />
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员1</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员2</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员3</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员4</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员5</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员6</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员7</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员8</div>
+									<div class="sub-title" style="width: 83.5px; height: 10px;">组员9</div>
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title">责任班组:</div>
+									<el-input v-model="detailData.sczl_bzdh" @keydown="ent1($event)"
+										style="width: 45px;" />
+									<el-input v-model="detailData.sczl_jtbh" id="jt2" @blur="getJtbhsubmit('2')"
+										@keydown="ent1($event)" style="width: 65px;" />
+									<el-input v-model="detailData.sczl_bh1" id="dh1"
+										@keydown="ent($event, 'jt2', 'dh1', 'dh2')" @blur="GetYg($event, '13')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh2" id="dh2"
+										@keydown="ent($event, 'dh1', 'dh2', 'dh3')" @blur="GetYg($event, '14')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh3" id="dh3"
+										@keydown="ent($event, 'dh2', 'dh3', 'dh4')" @blur="GetYg($event, '15')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh4" id="dh4"
+										@keydown="ent($event, 'dh3', 'dh4', 'dh5')" @blur="GetYg($event, '16')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh5" id="dh5"
+										@keydown="ent($event, 'dh4', 'dh5', 'dh6')" @blur="GetYg($event, '17')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh6" id="dh6"
+										@keydown="ent($event, 'dh5', 'dh6', 'dh7')" @blur="GetYg($event, '18')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh7" id="dh7"
+										@keydown="ent($event, 'dh6', 'dh7', 'dh8')" @blur="GetYg($event, '19')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh8" id="dh8"
+										@keydown="ent($event, 'dh7', 'dh8', 'dh9')" @blur="GetYg($event, '20')"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_bh9" id="dh9" @keydown="ent1($event)"
+										@blur="GetYg($event, '21')" style="width: 85px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 182px;" />
+									<el-input v-model="detailData.zrname1" id="name2" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname2" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname3" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname4" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname5" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname6" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname7" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname8" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.zrname9" @keydown="ent1($event)"
+										style="width: 85px;" />
+								</el-form-item>
+							</el-form>
+							<el-form ref="elFormRef" :model="detailData" :inline="true" label-position="right"
+								:rules="rule">
+								<el-form-item>
+									<div class="sub-title" style="width: 182px;">处罚金额:</div>
+									<el-input v-model="detailData.sczl_je1" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je2" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je3" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je4" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je5" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je6" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je7" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je8" @keydown="ent1($event)"
+										style="width: 85px;" />
+									<el-input v-model="detailData.sczl_je9" @keydown="ent1($event)"
+										style="width: 85px;" />
+								</el-form-item>
+							</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="dialogSelectVisible" title="选择" destroy-on-close width="500px"
+						@keydown="selectGX($event)">
+						<el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
+							border style="width:100%" @row-dblclick="handleSelectClick" ref="table2">
+							<el-table-column label="工序名称" width="460">
+								<template v-slot="{ row }">
+									{{ row }}
+								</template>
+							</el-table-column>
+						</el-table>
+					</el-dialog>
+					<el-dialog v-model="dialogSelectVisible_Yj" title="选择" destroy-on-close width="600px"
+						@keydown="selectGX_Yj($event)">
+						<el-table tooltip-effect="dark" :data="selectData_Yj" row-key="ID" highlight-current-row="true"
+							border style="width:100%" @row-dblclick="handleSelectClick_Yj" ref="table_Yj">
+							<el-table-column prop="印件号" label="印件号" width="100" />
+							<el-table-column prop="印件名称" label="印件名称" width="460" />
+						</el-table>
+					</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>
+					<el-dialog v-model="JtbhVisible" title="选择" destroy-on-close width="200px">
+						<el-table tooltip-effect="dark" :data="selectDataJtbh" row-key="ID" highlight-current-row="true"
+							border style="width:100%" @row-dblclick="SelectClickJtbh">
+							<el-table-column prop="设备编号" label="设备编号" width="160" />
+						</el-table>
+					</el-dialog>
+
+
+
+
+					<el-dialog v-model="detailShow" style="width: 800px" lock-scroll :before-close="closeDetailShow"
+						title="查看详情" destroy-on-close>
+						<el-scrollbar height="550px">
+							<el-descriptions column="1" border>
+								<el-descriptions-item label="address字段">
+									{{ detailData.address }}
+								</el-descriptions-item>
+								<el-descriptions-item label="image字段">
+									{{ detailData.image }}
+								</el-descriptions-item>
+								<el-descriptions-item label="name字段">
+									{{ detailData.name }}
+								</el-descriptions-item>
+							</el-descriptions>
+						</el-scrollbar>
+					</el-dialog>
+
+				</el-main>
+
+			</el-container>
+		</el-container>
+
+	</div>
+</template>
+
+<script setup>
+	import {
+		getRewardDetail,
+		getRewardList,
+		getRewardTab,
+		getRewardTabByGd,
+		JunkWorkOrderList,
+		PrintCodeList,
+		ProcessList,
+		MachineClassList,
+		MachineList,
+		JunkDetailDel,
+		JunkDetailEdit,
+		JunkDetailAdd
+	} from '@/api/mes/job'
+	import {
+		getYg
+	} from '@/api/jixiaoguanli/jitairibaobiao'
+	import {
+		createCompany,
+		deleteCompany,
+		deleteCompanyByIds,
+		findCompany,
+		updateCompany
+	} from '@/api/company'
+	import {
+		Layout,
+		LayoutContent,
+		LayoutHeader,
+		LayoutSider
+	} from '@arco-design/web-vue'
+	// 全量引入格式化工具 请按需保留
+	import {
+		ElMessage,
+		ElMessageBox
+	} from 'element-plus'
+	import {
+		ref,
+		reactive,
+		nextTick,
+		onMounted,
+		onBeforeMount
+	} from 'vue'
+	import {
+		useUserStore
+	} from '@/pinia/modules/user'
+	const userStore = useUserStore()
+	const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
+	defineOptions({
+		name: 'Company'
+	})
+
+	const treeData = ref([])
+	const displayMod = ref('')
+	// 侧边栏
+	const RewardTab = async () => {
+		const getRewardTabs = await getRewardTab()
+		if (getRewardTabs.code === 0) {
+			treeData.value = getRewardTabs.data.map((item) => ({
+				label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
+				params: {
+					date: item.date.replace(/\./g, '-'),
+				}
+			}))
+			displayMod.value = 'date'
+		}
+	}
+	RewardTab()
+
+	const RewardTabByGd = async () => {
+		const getRewardTabs = await getRewardTabByGd()
+		if (getRewardTabs.code === 0) {
+			treeData.value = getRewardTabs.data.map((item) => ({
+				label: item.label,
+				params: {
+					date: item.sczl_gdbh
+				}
+			}))
+			displayMod.value = 'gd'
+		}
+	}
+
+	const handleNodeClick = (node, check) => {
+		// 存放当前节点的nodeId
+		// console.log(node, check)
+		if (node.params) {
+			params.date = node.params.date
+			getTableData()
+		}
+	}
+
+	// 切换显示方式
+	const onReset = () => {
+		if (displayMod.value === 'date') {
+			RewardTabByGd()
+		} else {
+			RewardTab()
+		}
+	}
+
+	// 验证规则
+	const rule = reactive({})
+
+	const searchRule = reactive({
+		createdAt: [{
+			validator: (rule, value, callback) => {
+				if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
+					callback(new Error('请填写结束日期'))
+				} else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
+					callback(new Error('请填写开始日期'))
+				} else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (
+						searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt
+						.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value
+						.endCreatedAt.getTime())) {
+					callback(new Error('开始日期应当早于结束日期'))
+				} else {
+					callback()
+				}
+			},
+			trigger: 'change'
+		}],
+	})
+
+	const elFormRef = ref()
+	const elSearchFormRef = ref()
+
+	// =========== 表格控制部分 ===========
+	const page = ref(1)
+	const total = ref(0)
+	const pageSize = ref(10)
+	const tableData = ref([])
+	const searchInfo = ref({})
+	const params = {
+		date: '',
+		page: page.value.toString(),
+		limit: pageSize.value.toString(),
+	}
+
+	// 搜索
+	const onSubmit = () => {
+		elSearchFormRef.value?.validate(async (valid) => {
+			if (!valid) return
+			page.value = 1
+			pageSize.value = 10
+			getTableData()
+		})
+	}
+
+	// 分页
+	const handleSizeChange = (val) => {
+		pageSize.value = val
+		params.limit = val.toString()
+		getTableData()
+	}
+
+	// 修改页面容量
+	const handleCurrentChange = (val) => {
+		page.value = val
+		params.page = val.toString()
+		getTableData()
+	}
+
+	// 查看详情
+	const detailData = reactive({})
+	const handleDoubleClick = async (row) => {
+		type.value = 'update';
+		const {
+			UniqId
+		} = row
+		console.log(UniqId)
+		const res = await getRewardDetail({
+			UniqId
+		})
+		console.log(res)
+		if (res.code === 0) {
+			console.log(res)
+			Object.assign(detailData, res.data[0])
+			dialogFormVisible.value = true
+		}
+	}
+	let lastCellValue = ref()
+	// 单击表格操作
+	function Click(row, column, event) {
+		lastCellValue = row['UniqId'];
+		console.log(lastCellValue)
+	}
+	// 查询
+	const getTableData = async () => {
+		const table = await getRewardList(params)
+		if (table.code === 0) {
+			tableData.value = table.data.rows
+			total.value = table.data.total
+		}
+	}
+	const ADD = ref('0')
+	//新增
+	function onAdd() {
+		ADD.value = '新增'
+		type.value = 'create'
+		GetInfo(lastCellValue)
+		// Productionadd()
+	}
+	// getTableData()
+	//获取详细信息
+	const GetInfo = async (value) => {
+		const res = await getRewardDetail({
+			UniqId: value
+		})
+		if (res.code === 0) {
+			console.log(res)
+			Object.assign(detailData, res.data[0])
+			dialogFormVisible.value = true
+		}
+	}
+	//工单编号回车事件
+	const getCPMCsubmit = () => {
+		if (detailData.sczl_gdbh != '') {
+			JunkWorkOrderList({
+				search: detailData.sczl_gdbh
+			}).then(response => {
+				if (response.code === 0) {
+					detailData.Gd_cpmc = response.data[0].产品名称
+				} else {
+					detailData.Gd_cpmch = '';
+				}
+			});
+			PrintCodeList({
+				workorder: detailData.sczl_gdbh
+			}).then(response => {
+				if (response.code === 0) {
+					detailData.sczl_yjno = response.data[0].印件号
+					detailData.yj_yjmc = response.data[0].印件名称
+				} else {
+					detailData.sczl_yjno = ''
+					detailData.yj_yjmc = ''
+				}
+			});
+		} else {
+			ElMessage({
+				type: 'error',
+				message: '请注意, 工单编号输入空置, 除非有特殊需要!'
+			})
+		}
+	}
+	//印件号失去焦点事件
+	const getYJMCsubmit = () => {
+		if (detailData.sczl_gdbh != '') {
+			//获取印件名称
+			PrintCodeList({
+				workorder: detailData.sczl_gdbh
+			}).then(response => {
+				if (response.code === 0) {
+					if (response.data.length == 1) {
+						detailData.sczl_yjno = response.data[0]['印件号']
+						detailData.yj_yjmc = response.data[0]['印件名称']
+					} else if (response.data.length > 1) {
+						selectData_Yj.splice(0, selectData_Yj.length, ...response.data)
+						setGXCurrent_Yj(selectData_Yj[0])
+						dialogSelectVisible_Yj.value = true
+					} else {
+						detailData.sczl_yjno = ''
+						detailData.yj_yjmc = ''
+					}
+
+
+				}
+			});
+		}
+	}
+	const dialogSelectVisible_Yj = ref(false)
+	const selectData_Yj = reactive([])
+	// 处理选择框
+	const handleSelectClick_Yj = (row, column, event) => {
+		detailData.sczl_yjno = row.印件号
+		detailData.yj_yjmc = row.印件名称
+		dialogSelectVisible_Yj.value = false
+	}
+	const currentIndex_Yj = ref(0);
+	const GXCurrent_Yj = ref(0);
+	const selectGX_Yj = (event) => {
+		if (event.keyCode === 40) { // 向下箭头
+			if (currentIndex_Yj.value < selectData_Yj.length - 1) {
+				currentIndex_Yj.value++;
+				setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]);
+			} else {
+				currentIndex_Yj.value = 0;
+				setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]); // 到达最后一行时回到第一行			
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (currentIndex_Yj.value > 0) {
+				currentIndex_Yj.value--;
+				setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]);
+			} else {
+				currentIndex_Yj.value = selectData_Yj.length - 1;
+				setGXCurrent_Yj(selectData_Yj[currentIndex_Yj.value]); // 到达第一行时回到最后一行
+			}
+		} else if (event.keyCode === 13) { // 回车键
+			dialogSelectVisible_Yj.value = false;
+		}
+	}
+	const table_Yj = ref()
+	const setGXCurrent_Yj = (row) => {
+		setTimeout(() => {
+			table_Yj.value?.setCurrentRow(row)
+			detailData.sczl_yjno = row.印件号
+			detailData.yj_yjmc = row.印件名称
+		})
+	}
+
+	const dialogSelectVisible = ref(false)
+	const selectData = reactive([])
+	//工序失去焦点事件
+	const getGXsubmit = () => {
+		//弹出选择
+		ProcessList({
+			workorder: detailData.sczl_gdbh,
+			yjno: detailData.sczl_yjno
+		}).then(response => {
+			if (response.code === 0) {
+				selectData.splice(0, selectData.length, ...response.data)
+				console.log(selectData)
+				dialogSelectVisible.value = true
+			}
+		})
+	}
+	// 工单选择框
+	const handleSelectClick = (row, column, event) => {
+		console.log(row)
+		detailData.sczl_gxmc = row
+		dialogSelectVisible.value = false
+	}
+	//机台选择
+	const selectDataJtbh = reactive([])
+	const JtbhVisible = ref(false)
+	const SelectClickJtbh = (row, column, event) => {
+		const {
+			设备编号
+		} = row
+		if (jtbh.value === 'JL') {
+			detailData.jl_jtbh = row.设备编号
+		} else if (jtbh.value === 'ZR') {
+			detailData.sczl_jtbh = row.设备编号
+		}
+		JtbhVisible.value = false
+	}
+	const jtbh = ref()
+	//机台失去焦点事件
+	const getJtbhsubmit = (value) => {
+		if (value === '1') {
+			jtbh.value = 'JL'
+		} else if (value === '2') {
+			jtbh.value = 'ZR'
+		}
+		console.log(jtbh.value)
+		MachineList().then(response => {
+			if (response.code === 0) {
+				selectDataJtbh.splice(0, selectDataJtbh.length, ...response.data)
+				JtbhVisible.value = true
+			}
+		})
+	}
+
+	let num = '';
+	let flag_Yg = true;
+	//获取员工信息
+	const GetYg = (event, inputName) => {
+		num = parseInt(inputName) - 1;
+		if (num >= 1 && num <= 10) {
+			if (detailData['JL_bh' + num] == undefined || detailData['JL_bh' + num] == '') {
 				detailData['jlname' + num] = '';
 				detailData['JL_bh' + num] = '';
+				return
 			}
-		}else{
-			detailData['jlname' + num] = '';
-			detailData['JL_bh' + num] = '';
-		}
-      
-    });
-  } else if (num >= 10 && num <= 21) {
-	  if(detailData['sczl_bh' + (num - 11)]==undefined || detailData['sczl_bh' + (num - 11)]==''){
-	  	detailData['zrname' + (num - 11)] = '';
-	  	detailData['sczl_bh' + (num - 11)] = '';
-		return
-	  }
-	  flag_Yg = false;
-    getYg({ sczl_bh: detailData['sczl_bh' + (num - 11)] }).then(response => {
-      if(response.code==0){
-      	if(response.data.length==1){
-      		detailData['zrname' + (num - 11)] = response.data[0].ygxm;
-      		detailData['sczl_bh' + (num - 11)] = 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{
+			flag_Yg = true;
+			getYg({
+				sczl_bh: detailData['JL_bh' + num]
+			}).then(response => {
+				if (response.code == 0) {
+					if (response.data.length == 1) {
+						detailData['jlname' + num] = response.data[0].ygxm;
+						detailData['JL_bh' + num] = 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['jlname' + num] = '';
+						detailData['JL_bh' + num] = '';
+					}
+				} else {
+					detailData['jlname' + num] = '';
+					detailData['JL_bh' + num] = '';
+				}
+
+			});
+		} else if (num >= 10 && num <= 21) {
+			if (detailData['sczl_bh' + (num - 11)] == undefined || detailData['sczl_bh' + (num - 11)] == '') {
+				detailData['zrname' + (num - 11)] = '';
+				detailData['sczl_bh' + (num - 11)] = '';
+				return
+			}
+			flag_Yg = false;
+			getYg({
+				sczl_bh: detailData['sczl_bh' + (num - 11)]
+			}).then(response => {
+				if (response.code == 0) {
+					if (response.data.length == 1) {
+						detailData['zrname' + (num - 11)] = response.data[0].ygxm;
+						detailData['sczl_bh' + (num - 11)] = 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['zrname' + (num - 11)] = '';
+						detailData['sczl_bh' + (num - 11)] = '';
+					}
+				} else {
+					detailData['zrname' + (num - 11)] = '';
+					detailData['sczl_bh' + (num - 11)] = '';
+				}
+				// detailData['zrname' + (num - 11)] = response.data[0].ygxm;
+				//    detailData['sczl_bh' + (num - 11)] = response.data[0].员工编号;
+			});
+		}
+	};
+
+	const dialogSelectVisible_Yg = ref(false)
+	const selectData_Yg = reactive([])
+	// 处理选择框
+	const handleSelectClick_Yg = (row, column, event) => {
+		if (flag_Yg) {
+			detailData['jlname' + (num - 1)] = row.ygxm
+			detailData['JL_bh' + (num - 1)] = row.员工编号
+		} else {
+			detailData['zrname' + (num - 12)] = row.ygxm
+			detailData['sczl_bh' + (num - 12)] = 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)
+			if (flag_Yg) {
+				detailData['jlname' + (num - 1)] = row.ygxm
+				detailData['JL_bh' + (num - 1)] = row.员工编号
+			} else {
+				detailData['zrname' + (num - 12)] = row.ygxm
+				detailData['sczl_bh' + (num - 12)] = row.员工编号
+			}
+		})
+	}
+	// ============== 表格控制部分结束 ===============
+
+	// 获取需要的字典 可能为空 按需保留
+	const setOptions = async () => {}
+
+	// 获取需要的字典 可能为空 按需保留
+	setOptions()
+
+	// 多选数据
+	const multipleSelection = ref([])
+	// 多选
+	const handleSelectionChange = (val) => {
+		multipleSelection.value = val
+	}
+
+	// 删除行
+	const deleteRow = (row) => {
+		ElMessageBox.confirm('确定要删除吗?', '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		}).then(() => {
+			deleteCompanyFunc(row)
+		})
+	}
+
+	// 批量删除控制标记
+	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: 'warning',
-			  message: '未查询到该员工'
+				type: 'success',
+				message: '删除成功'
 			})
-			detailData['zrname' + (num - 11)] = '';
-			detailData['sczl_bh' + (num - 11)] = '';
+			if (tableData.value.length === ids.length && page.value > 1) {
+				page.value--
+			}
+			deleteVisible.value = false
+			getTableData()
 		}
-      }else{
-		  detailData['zrname' + (num - 11)] = '';
-		  detailData['sczl_bh' + (num - 11)] = '';
-	  }
-	  // detailData['zrname' + (num - 11)] = response.data[0].ygxm;
-   //    detailData['sczl_bh' + (num - 11)] = response.data[0].员工编号;
-    });
-  }
-};
-
-const dialogSelectVisible_Yg = ref(false)
-const selectData_Yg = reactive([])
-// 处理选择框
-const handleSelectClick_Yg = (row, column, event) => {
-	if(flag_Yg){
-		detailData['jlname' + (num - 1)] = row.ygxm
-		detailData['JL_bh' + (num - 1)] = row.员工编号
-	}else{
-		detailData['zrname' + (num - 12)] = row.ygxm
-		detailData['sczl_bh' + (num - 12)] = 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) 
-	  if(flag_Yg){
-	  	detailData['jlname' + (num - 1)] = row.ygxm
-	  	detailData['JL_bh' + (num - 1)] = row.员工编号
-	  }else{
-	  	detailData['zrname' + (num - 12)] = row.ygxm
-	  	detailData['sczl_bh' + (num - 12)] = row.员工编号
-	  }
-  })
-}
-// ============== 表格控制部分结束 ===============
-
-// 获取需要的字典 可能为空 按需保留
-const setOptions = async() => {
-}
-
-// 获取需要的字典 可能为空 按需保留
-setOptions()
-
-// 多选数据
-const multipleSelection = ref([])
-// 多选
-const handleSelectionChange = (val) => {
-  multipleSelection.value = val
-}
-
-// 删除行
-const deleteRow = (row) => {
-  ElMessageBox.confirm('确定要删除吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-    deleteCompanyFunc(row)
-  })
-}
-
-// 批量删除控制标记
-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 deleteCompanyFunc = async(row) => {
-  const res = await deleteCompany({ ID: row.ID })
-  if (res.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '删除成功'
-    })
-    if (tableData.value.length === 1 && page.value > 1) {
-      page.value--
-    }
-    getTableData()
-  }
-}
-
-// 弹窗控制标记
-const dialogFormVisible = ref(false)
-
-// 查看详情控制标记
-const detailShow = ref(false)
-
-// 打开详情弹窗
-const openDetailShow = () => {
-  detailShow.value = true
-}
-
-// 打开详情
-const getDetails = async(row) => {
-  // 打开弹窗
-  const res = await findCompany({ ID: row.ID })
-  if (res.code === 0) {
-    detailData.value = res.data.recompany
-    openDetailShow()
-  }
-}
-
-// 关闭详情弹窗
-const closeDetailShow = () => {
-  detailShow.value = false
-  detailData.value = {
-    address: '',
-    image: '',
-    name: '',
-  }
-}
-//删除
-function onDel() {
-	Del()
-}
-// 删除
-const Del = async() => {
-	
-    const res = await JunkDetailDel({ UniqId:lastCellValue})
-    if (res.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '成功'
-    })
-	getTableData()
-    }else{
-	ElMessage({
-	  type: 'error',
-	  message: '失败'
-	})
-	}
-}
-// 打开弹窗
-const openDialog = () => {
-  type.value = 'create'
-  dialogFormVisible.value = true
-}
-
-// 关闭弹窗
-const closeDialog = () => {
-  dialogFormVisible.value = false
-  detailData.value = {
-    address: '',
-    image: '',
-    name: '',
-  }
-}
-// 弹窗确定
-const enterDialog = async() => {
-	if (type.value === 'update') {
-		  SubmitDailyProduction()
-		  
-	} else if (type.value === 'create') {
-		  add()   
-		  
-	}
-	// SubmitDailyProduction()
-  // elFormRef.value?.validate(async(valid) => {
-  //   if (!valid) return
-  //   let res
-  //   switch (type.value) {
-  //     case 'create':
-  //       res = await createCompany(detailData.value)
-  //       break
-  //     case 'update':
-  //       res = await updateCompany(detailData.value)
-  //       break
-  //     default:
-  //       res = await createCompany(detailData.value)
-  //       break
-  //   }
-  //   if (res.code === 0) {
-  //     ElMessage({
-  //       type: 'success',
-  //       message: '创建/更改成功'
-  //     })
-  //     closeDialog()
-  //     getTableData()
-  //   }
-  // })
-}
- //日报表上传
- const SubmitDailyProduction = async () => {
- 
-   
-   const restoredData = {
-	   
-     sczl_gdbh:detailData.sczl_gdbh,
-     sczl_yjno:detailData.sczl_yjno,
-     sczl_gxh:detailData.sczl_gxh,
-     sczl_gxmc: detailData.sczl_gxmc,
-    sczl_numDesc: detailData.sczl_numDesc,
-    sczl_bh1: detailData.sczl_bh1,
-    sczl_bh2: detailData.sczl_bh2,
-    sczl_bh3: detailData.sczl_bh3,
-    sczl_bh4: detailData.sczl_bh4,
-    sczl_bh5: detailData.sczl_bh5,
-    sczl_bh6: detailData.sczl_bh6,
-    sczl_bh7: detailData.sczl_bh7,
-    sczl_bh8: detailData.sczl_bh8,
-    sczl_bh9: detailData.sczl_bh9,
-    sczl_bh10: '',
-	
-	sczl_je1: detailData.sczl_je1,
-	sczl_je2: detailData.sczl_je2,
-	sczl_je3: detailData.sczl_je3,
-	sczl_je4: detailData.sczl_je4,
-	sczl_je5: detailData.sczl_je5,
-	sczl_je6: detailData.sczl_je6,
-	sczl_je7: detailData.sczl_je7,
-	sczl_je8: detailData.sczl_je8,
-	sczl_je9: detailData.sczl_je9,
-	sczl_je10: '',
-	
-	JL_bh1: detailData.JL_bh1,
-	JL_bh2: detailData.JL_bh2,
-	JL_bh3: detailData.JL_bh3,
-	JL_bh4: detailData.JL_bh4,
-	JL_bh5: detailData.JL_bh5,
-	JL_bh6: detailData.JL_bh6,
-	JL_bh7: detailData.JL_bh7,
-	JL_bh8: detailData.JL_bh8,
-	JL_bh9: detailData.JL_bh9,
-	JL_bh10:'',
-	
-	JL_Je1: detailData.JL_Je1,
-	JL_Je2: detailData.JL_Je2,
-	JL_Je3: detailData.JL_Je3,
-	JL_Je4: detailData.JL_Je4,
-	JL_Je5: detailData.JL_Je5,
-	JL_Je6: detailData.JL_Je6,
-	JL_Je7: detailData.JL_Je7,
-	JL_Je8: detailData.JL_Je8,
-	JL_Je9: detailData.JL_Je9,
-	JL_Je10: '',
-
-    sczl_rq: detailData.sczl_rq,
-	sczl_ls: detailData.sczl_ls,
-	sczl_fplxA: detailData.sczl_fplxA,
-	sczl_fplxB: '0',
-	责任部门: detailData.责任部门,
-	sczl_cl: detailData.sczl_cl,
-	jl_jtbh: detailData.jl_jtbh,
-	Jl_bzdh: detailData.Jl_bzdh,
-	sczl_jtbh: detailData.sczl_jtbh,
-	sczl_bzdh: detailData.sczl_bzdh,
-	sys_id: sys_id,  
-	UniqId:lastCellValue
-   }
-   console.log(restoredData)
-   // console.log(formData3.value.formattedArray)
-   const response = await JunkDetailEdit(restoredData);
-   console.log(response)
-   if (response.code === 0) {
- 	  ElMessage({
- 	    type: 'success',
- 	    message: '成功'
- 	  })
-	  dialogFormVisible.value = false
-   } 
-   getTableData()
- }
- const add = async () => {
- 	const restoredData = {
- 		   
- 	  sczl_gdbh:detailData.sczl_gdbh,
- 	  sczl_yjno:detailData.sczl_yjno,
- 	  sczl_gxh:detailData.sczl_gxh,
- 	  sczl_gxmc: detailData.sczl_gxmc,
- 	 sczl_numDesc: detailData.sczl_numDesc,
- 	 sczl_bh1: detailData.sczl_bh1,
- 	 sczl_bh2: detailData.sczl_bh2,
- 	 sczl_bh3: detailData.sczl_bh3,
- 	 sczl_bh4: detailData.sczl_bh4,
- 	 sczl_bh5: detailData.sczl_bh5,
- 	 sczl_bh6: detailData.sczl_bh6,
- 	 sczl_bh7: detailData.sczl_bh7,
- 	 sczl_bh8: detailData.sczl_bh8,
- 	 sczl_bh9: detailData.sczl_bh9,
- 	 sczl_bh10: '',
- 		
- 		sczl_je1: detailData.sczl_je1,
- 		sczl_je2: detailData.sczl_je2,
- 		sczl_je3: detailData.sczl_je3,
- 		sczl_je4: detailData.sczl_je4,
- 		sczl_je5: detailData.sczl_je5,
- 		sczl_je6: detailData.sczl_je6,
- 		sczl_je7: detailData.sczl_je7,
- 		sczl_je8: detailData.sczl_je8,
- 		sczl_je9: detailData.sczl_je9,
- 		sczl_je10: '',
- 		
- 		JL_bh1: detailData.JL_bh1,
- 		JL_bh2: detailData.JL_bh2,
- 		JL_bh3: detailData.JL_bh3,
- 		JL_bh4: detailData.JL_bh4,
- 		JL_bh5: detailData.JL_bh5,
- 		JL_bh6: detailData.JL_bh6,
- 		JL_bh7: detailData.JL_bh7,
- 		JL_bh8: detailData.JL_bh8,
- 		JL_bh9: detailData.JL_bh9,
- 		JL_bh10:'',
- 		
- 		JL_Je1: detailData.JL_Je1,
- 		JL_Je2: detailData.JL_Je2,
- 		JL_Je3: detailData.JL_Je3,
- 		JL_Je4: detailData.JL_Je4,
- 		JL_Je5: detailData.JL_Je5,
- 		JL_Je6: detailData.JL_Je6,
- 		JL_Je7: detailData.JL_Je7,
- 		JL_Je8: detailData.JL_Je8,
- 		JL_Je9: detailData.JL_Je9,
- 		JL_Je10: '',
- 	
- 	 sczl_rq: detailData.sczl_rq,
- 		sczl_ls: detailData.sczl_ls,
- 		sczl_fplxA: detailData.sczl_fplxA,
- 		sczl_fplxB: detailData.sczl_fplxB==true ? 1 : 0,
- 		责任部门: detailData.责任部门,
- 		sczl_cl: detailData.sczl_cl,
- 		jl_jtbh: detailData.jl_jtbh,
- 		Jl_bzdh: detailData.Jl_bzdh,
- 		sczl_jtbh: detailData.sczl_jtbh,
- 		sczl_bzdh: detailData.sczl_bzdh,
- 		sys_id: sys_id,  
- 	}
- 	console.log(restoredData)
- 	// console.log(formData3.value.formattedArray)
- 	const response = await JunkDetailAdd(restoredData);
- 	console.log(response)
- 	if (response.code === 0) {
- 	 	  ElMessage({
- 	 	    type: 'success',
- 	 	    message: '成功'
- 	 	  })
-		  dialogFormVisible.value = false
- 	}
- 	
- 	getTableData()
- }
-//键盘 input框跳转
-const ent = (event,id1,id2,id3) => {
-  if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-	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()
-    }
-  }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 ent1 = (event) => {
-  const inputs = document.getElementsByTagName('input');
-  const currentIndex = Array.from(inputs).indexOf(event.target);
-  
-  if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-    for (let i = currentIndex + 1; i < inputs.length; i++) {
-      if (!inputs[i].readOnly) {
-        nextTick(()=>{
-          inputs[i].focus();
-          inputs[i].select();
-        })
-        break;
-      }
-    }
-  } else if (event.keyCode === 38) { // 向上箭头
-    for (let i = currentIndex - 1; i >= 0; i--) {
-      if (!inputs[i].readOnly) {
-        nextTick(()=>{
-          inputs[i].focus();
-          inputs[i].select();
-        })
-        break;
-      }
-    }
-  } else if (event.keyCode === 8) { // 删除箭头
-    if (event.target.selectionStart === 0) {
-      for (let i = currentIndex - 1; i >= 0; i--) {
-        if (!inputs[i].readOnly) {
-          nextTick(()=>{
-            inputs[i].focus();
-            inputs[i].setSelectionRange(0, 0);
-            inputs[i].select(); // 全选输入框内容
-          })
-          break;
-        }
-      }
-    }
-  } else if (event.keyCode === 37) { // 向左箭头
-    if (event.target.selectionStart === 0) {
-      for (let i = currentIndex - 1; i >= 0; i--) {
-        if (!inputs[i].readOnly) {
-          nextTick(()=>{
-            inputs[i].focus();
-            inputs[i].select();
-          })
-          break;
-        }
-      }
-    }
-  } else if (event.keyCode === 39) { // 向右箭头
-    if (event.target.selectionStart === event.target.value.length) {
-      for (let i = currentIndex + 1; i < inputs.length; i++) {
-        if (!inputs[i].readOnly) {
-          nextTick(()=>{
-            inputs[i].focus();
-            inputs[i].select();
-          })
-          break;
-        }
-      }
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-:deep(.el-table td .cell) {
-  line-height: 30px !important;
-}
-
-.JKWTree-container {
-  display: flex;
-}
-
-/* 选中某行时的背景色 */
-:deep(.el-table__body tr.current-row) > td {
-  background: #ff80ff !important;
-}
-
-.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;
-}
-.bt {
-  margin-left: 2px !important;
-  padding: 3px !important;
-  font-size: 12px;
-}
-</style>
+	}
+
+	// 行为控制标记(弹窗内部需要增还是改)
+	const type = ref('')
+
+	// 删除行
+	const deleteCompanyFunc = async (row) => {
+		const res = await deleteCompany({
+			ID: row.ID
+		})
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '删除成功'
+			})
+			if (tableData.value.length === 1 && page.value > 1) {
+				page.value--
+			}
+			getTableData()
+		}
+	}
+
+	// 弹窗控制标记
+	const dialogFormVisible = ref(false)
+
+	// 查看详情控制标记
+	const detailShow = ref(false)
+
+	// 打开详情弹窗
+	const openDetailShow = () => {
+		detailShow.value = true
+	}
+
+	// 打开详情
+	const getDetails = async (row) => {
+		// 打开弹窗
+		const res = await findCompany({
+			ID: row.ID
+		})
+		if (res.code === 0) {
+			detailData.value = res.data.recompany
+			openDetailShow()
+		}
+	}
+
+	// 关闭详情弹窗
+	const closeDetailShow = () => {
+		detailShow.value = false
+		detailData.value = {
+			address: '',
+			image: '',
+			name: '',
+		}
+	}
+	//删除
+	function onDel() {
+		Del()
+	}
+	// 删除
+	const Del = async () => {
+
+		const res = await JunkDetailDel({
+			UniqId: lastCellValue
+		})
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '成功'
+			})
+			getTableData()
+		} else {
+			ElMessage({
+				type: 'error',
+				message: '失败'
+			})
+		}
+	}
+	// 打开弹窗
+	const openDialog = () => {
+		type.value = 'create'
+		dialogFormVisible.value = true
+	}
+
+	// 关闭弹窗
+	const closeDialog = () => {
+		dialogFormVisible.value = false
+		detailData.value = {
+			address: '',
+			image: '',
+			name: '',
+		}
+	}
+	// 弹窗确定
+	const enterDialog = async () => {
+		if (type.value === 'update') {
+			SubmitDailyProduction()
+
+		} else if (type.value === 'create') {
+			add()
+
+		}
+		// SubmitDailyProduction()
+		// elFormRef.value?.validate(async(valid) => {
+		//   if (!valid) return
+		//   let res
+		//   switch (type.value) {
+		//     case 'create':
+		//       res = await createCompany(detailData.value)
+		//       break
+		//     case 'update':
+		//       res = await updateCompany(detailData.value)
+		//       break
+		//     default:
+		//       res = await createCompany(detailData.value)
+		//       break
+		//   }
+		//   if (res.code === 0) {
+		//     ElMessage({
+		//       type: 'success',
+		//       message: '创建/更改成功'
+		//     })
+		//     closeDialog()
+		//     getTableData()
+		//   }
+		// })
+	}
+	//日报表上传
+	const SubmitDailyProduction = async () => {
+
+
+		const restoredData = {
+
+			sczl_gdbh: detailData.sczl_gdbh,
+			sczl_yjno: detailData.sczl_yjno,
+			sczl_gxh: detailData.sczl_gxh,
+			sczl_gxmc: detailData.sczl_gxmc,
+			sczl_numDesc: detailData.sczl_numDesc,
+			sczl_bh1: detailData.sczl_bh1,
+			sczl_bh2: detailData.sczl_bh2,
+			sczl_bh3: detailData.sczl_bh3,
+			sczl_bh4: detailData.sczl_bh4,
+			sczl_bh5: detailData.sczl_bh5,
+			sczl_bh6: detailData.sczl_bh6,
+			sczl_bh7: detailData.sczl_bh7,
+			sczl_bh8: detailData.sczl_bh8,
+			sczl_bh9: detailData.sczl_bh9,
+			sczl_bh10: '',
+
+			sczl_je1: detailData.sczl_je1,
+			sczl_je2: detailData.sczl_je2,
+			sczl_je3: detailData.sczl_je3,
+			sczl_je4: detailData.sczl_je4,
+			sczl_je5: detailData.sczl_je5,
+			sczl_je6: detailData.sczl_je6,
+			sczl_je7: detailData.sczl_je7,
+			sczl_je8: detailData.sczl_je8,
+			sczl_je9: detailData.sczl_je9,
+			sczl_je10: '',
+
+			JL_bh1: detailData.JL_bh1,
+			JL_bh2: detailData.JL_bh2,
+			JL_bh3: detailData.JL_bh3,
+			JL_bh4: detailData.JL_bh4,
+			JL_bh5: detailData.JL_bh5,
+			JL_bh6: detailData.JL_bh6,
+			JL_bh7: detailData.JL_bh7,
+			JL_bh8: detailData.JL_bh8,
+			JL_bh9: detailData.JL_bh9,
+			JL_bh10: '',
+
+			JL_Je1: detailData.JL_Je1,
+			JL_Je2: detailData.JL_Je2,
+			JL_Je3: detailData.JL_Je3,
+			JL_Je4: detailData.JL_Je4,
+			JL_Je5: detailData.JL_Je5,
+			JL_Je6: detailData.JL_Je6,
+			JL_Je7: detailData.JL_Je7,
+			JL_Je8: detailData.JL_Je8,
+			JL_Je9: detailData.JL_Je9,
+			JL_Je10: '',
+
+			sczl_rq: detailData.sczl_rq,
+			sczl_ls: detailData.sczl_ls,
+			sczl_fplxA: detailData.sczl_fplxA,
+			sczl_fplxB: '0',
+			责任部门: detailData.责任部门,
+			sczl_cl: detailData.sczl_cl,
+			jl_jtbh: detailData.jl_jtbh,
+			Jl_bzdh: detailData.Jl_bzdh,
+			sczl_jtbh: detailData.sczl_jtbh,
+			sczl_bzdh: detailData.sczl_bzdh,
+			sys_id: sys_id,
+			UniqId: lastCellValue
+		}
+		console.log(restoredData)
+		// console.log(formData3.value.formattedArray)
+		const response = await JunkDetailEdit(restoredData);
+		console.log(response)
+		if (response.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '成功'
+			})
+			dialogFormVisible.value = false
+		}
+		getTableData()
+	}
+	const add = async () => {
+		const restoredData = {
+
+			sczl_gdbh: detailData.sczl_gdbh,
+			sczl_yjno: detailData.sczl_yjno,
+			sczl_gxh: detailData.sczl_gxh,
+			sczl_gxmc: detailData.sczl_gxmc,
+			sczl_numDesc: detailData.sczl_numDesc,
+			sczl_bh1: detailData.sczl_bh1,
+			sczl_bh2: detailData.sczl_bh2,
+			sczl_bh3: detailData.sczl_bh3,
+			sczl_bh4: detailData.sczl_bh4,
+			sczl_bh5: detailData.sczl_bh5,
+			sczl_bh6: detailData.sczl_bh6,
+			sczl_bh7: detailData.sczl_bh7,
+			sczl_bh8: detailData.sczl_bh8,
+			sczl_bh9: detailData.sczl_bh9,
+			sczl_bh10: '',
+
+			sczl_je1: detailData.sczl_je1,
+			sczl_je2: detailData.sczl_je2,
+			sczl_je3: detailData.sczl_je3,
+			sczl_je4: detailData.sczl_je4,
+			sczl_je5: detailData.sczl_je5,
+			sczl_je6: detailData.sczl_je6,
+			sczl_je7: detailData.sczl_je7,
+			sczl_je8: detailData.sczl_je8,
+			sczl_je9: detailData.sczl_je9,
+			sczl_je10: '',
+
+			JL_bh1: detailData.JL_bh1,
+			JL_bh2: detailData.JL_bh2,
+			JL_bh3: detailData.JL_bh3,
+			JL_bh4: detailData.JL_bh4,
+			JL_bh5: detailData.JL_bh5,
+			JL_bh6: detailData.JL_bh6,
+			JL_bh7: detailData.JL_bh7,
+			JL_bh8: detailData.JL_bh8,
+			JL_bh9: detailData.JL_bh9,
+			JL_bh10: '',
+
+			JL_Je1: detailData.JL_Je1,
+			JL_Je2: detailData.JL_Je2,
+			JL_Je3: detailData.JL_Je3,
+			JL_Je4: detailData.JL_Je4,
+			JL_Je5: detailData.JL_Je5,
+			JL_Je6: detailData.JL_Je6,
+			JL_Je7: detailData.JL_Je7,
+			JL_Je8: detailData.JL_Je8,
+			JL_Je9: detailData.JL_Je9,
+			JL_Je10: '',
+
+			sczl_rq: detailData.sczl_rq,
+			sczl_ls: detailData.sczl_ls,
+			sczl_fplxA: detailData.sczl_fplxA,
+			sczl_fplxB: detailData.sczl_fplxB == true ? 1 : 0,
+			责任部门: detailData.责任部门,
+			sczl_cl: detailData.sczl_cl,
+			jl_jtbh: detailData.jl_jtbh,
+			Jl_bzdh: detailData.Jl_bzdh,
+			sczl_jtbh: detailData.sczl_jtbh,
+			sczl_bzdh: detailData.sczl_bzdh,
+			sys_id: sys_id,
+		}
+		console.log(restoredData)
+		// console.log(formData3.value.formattedArray)
+		const response = await JunkDetailAdd(restoredData);
+		console.log(response)
+		if (response.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '成功'
+			})
+			dialogFormVisible.value = false
+		}
+
+		getTableData()
+	}
+	//键盘 input框跳转
+	const ent = (event, id1, id2, id3) => {
+		if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+			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()
+			}
+		} 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 ent1 = (event) => {
+		const inputs = document.getElementsByTagName('input');
+		const currentIndex = Array.from(inputs).indexOf(event.target);
+
+		if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+			for (let i = currentIndex + 1; i < inputs.length; i++) {
+				if (!inputs[i].readOnly) {
+					nextTick(() => {
+						inputs[i].focus();
+						inputs[i].select();
+					})
+					break;
+				}
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			for (let i = currentIndex - 1; i >= 0; i--) {
+				if (!inputs[i].readOnly) {
+					nextTick(() => {
+						inputs[i].focus();
+						inputs[i].select();
+					})
+					break;
+				}
+			}
+		} else if (event.keyCode === 8) { // 删除箭头
+			if (event.target.selectionStart === 0) {
+				for (let i = currentIndex - 1; i >= 0; i--) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].setSelectionRange(0, 0);
+							inputs[i].select(); // 全选输入框内容
+						})
+						break;
+					}
+				}
+			}
+		} else if (event.keyCode === 37) { // 向左箭头
+			if (event.target.selectionStart === 0) {
+				for (let i = currentIndex - 1; i >= 0; i--) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].select();
+						})
+						break;
+					}
+				}
+			}
+		} else if (event.keyCode === 39) { // 向右箭头
+			if (event.target.selectionStart === event.target.value.length) {
+				for (let i = currentIndex + 1; i < inputs.length; i++) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].select();
+						})
+						break;
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	:deep(.el-table td .cell) {
+		line-height: 30px !important;
+	}
+
+	.JKWTree-container {
+		display: flex;
+	}
+
+	/* 选中某行时的背景色 */
+	:deep(.el-table__body tr.current-row)>td {
+		background: #ff80ff !important;
+	}
+
+	.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;
+	}
+
+	.bt {
+		margin-left: 2px !important;
+		padding: 3px !important;
+		font-size: 12px;
+	}
+</style>

+ 443 - 347
src/view/performance/07-otherDocuments/index.vue

@@ -1,197 +1,204 @@
 <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 @node-click="handleNodeClick" />
-					</div>
-				</layout-sider>
+			<!--    左侧树侧形结构-->
+			<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 @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="plus" class="bt" @click="handleShowAdd">新增 </el-button>
+								<el-button type="primary" icon="delete" class="bt" @click="onDel">删除 </el-button>
+
+							</el-form-item>
+						</el-form>
 
-		<el-container>
-		  <el-main>
-			<layout-header>
-				<!-- 按钮 -->
-				<el-form inline>
-					<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="plus" class="bt" @click="handleShowAdd">新增 </el-button>
-						<el-button type="primary" icon="delete" class="bt" @click="onDel">删除 </el-button>
-						
-					</el-form-item>
-				</el-form>
-
-				<!-- 弹出框 -->
-				<div>
-					<!-- 详情页 -->
-					<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '新增' : '修改'" destroy-on-close
-						width="800px">
-						<!-- <el-scrollbar height="500px"> -->
-						<el-form :model="detailData" id="detail-form" ref="elFormRef" 
-						label-width="100px"
-						label-position="right" inline>
-							<el-row :gutter="24" >
-								<el-col :span="24">
-									<el-form-item label="员工编号">
-										<el-input v-model="detailData.Sczl_bh1" @blur="handleYgbhEnter" placeholder="Enter回车"
-											@keydown="ent1($event)" style="width: 120px" />
-										<el-input style="width: 120px; margin-left: 5px" readonly v-model="detailData.name" />
-									</el-form-item>
-								</el-col>
-							</el-row>
-							
-							<el-row :gutter="24" >
-								<el-col :span="14">
-									<el-form-item label="工序类别">
-										<el-input @blur="get_LB" v-model="detailData.sczl_Type" 
-										 @keydown="ent1($event)" style="width: 120px; " />
-										
-										<!-- <el-select v-model="detailData.sczl_Type" style="width: 150px">
+						<!-- 数据展示 -->
+						<el-table ref="table" style="width: 100%" 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="handleShowEdit" @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 === 'create' ? '新增' : '修改'" destroy-on-close width="800px">
+							<!-- <el-scrollbar height="500px"> -->
+							<el-form :model="detailData" id="detail-form" ref="elFormRef" label-width="100px"
+								label-position="right" inline>
+								<el-row :gutter="24">
+									<el-col :span="24">
+										<el-form-item label="员工编号">
+											<el-input v-model="detailData.Sczl_bh1" @blur="handleYgbhEnter"
+												placeholder="Enter回车" @keydown="ent1($event)" style="width: 120px" />
+											<el-input style="width: 120px; margin-left: 5px" readonly
+												v-model="detailData.name" />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="14">
+										<el-form-item label="工序类别">
+											<el-input @blur="get_LB" v-model="detailData.sczl_Type"
+												@keydown="ent1($event)" style="width: 120px; " />
+
+											<!-- <el-select v-model="detailData.sczl_Type" style="width: 150px">
 											<el-option label="拆片" value="拆片" />
 											<el-option label="包装" value="包装" />
 											<el-option label="打包" value="打包" />
 											<el-option label="拉料" value="拉料" />
 										</el-select> -->
-									</el-form-item>
-								</el-col>
-								<el-col :span="10">
-									<el-form-item label="日期">
-										<el-input type="date" max="9999-12-31" v-model="detailData.Sczl_rq" 
-										 @keydown="ent1($event)" style="width: 150px" />
-									</el-form-item>
-								</el-col>
-							</el-row>
-
-							<el-row :gutter="24" >
-								<el-col :span="24">
-									<el-form-item label="工单编号">
-										<el-input v-model="detailData.Sczl_gdbh" @blur="handleGdbhEnter" placeholder="Enter回车"
-											@keydown="ent1($event)" style="width: 120px"/>
-										<el-input v-model="detailData.Gd_cpmc" style="width: 480px; margin-left: 5px"
-											readonly />
-									</el-form-item>
-								</el-col>
-							</el-row>
-							
-							<el-row :gutter="24" >
-								<el-col :span="24">
-									<el-form-item label="工艺流程">
-										<el-input v-model="detailData.Sczl_gxmc" @blur="handleGylcEnter" 
-											@keydown="ent1($event)" style="width: 480px"/>
-										<el-input v-model="detailData.sczl_gxh" style="width: 120px; margin-left: 5px"
-											readonly />
-									</el-form-item>
-								</el-col>
-							</el-row>
-							
-							<el-row :gutter="24" >
-								<el-col :span="14">
-									<el-form-item label="" style="margin-left: 67px;">
-										<el-input v-model="leftData" @keydown="ent1($event)" style="width: 100px; margin-left: 32px;"
-											@blur="()=>{detailData.Sczl_cl = (leftData * rightData).toString()}"/>X
-										<el-input v-model="rightData" @keydown="ent1($event)" style="width: 100px;margin-left: 12px;"
-												@blur="()=>{detailData.Sczl_cl = (leftData * rightData).toString()}"
-												 />
-										
-									</el-form-item>
-								</el-col>
-								<el-col :span="10">
-									<el-form-item label="计件产量" >
-										<el-input @keydown="ent1($event)" v-model="detailData.Sczl_cl" style="width: 150px" />
-									</el-form-item>
-								</el-col>
-							</el-row>
-							
-							<el-row :gutter="24" >
-								<el-col :span="24">
-									<el-form-item label="工价代号">
-										<el-input v-model="detailData.Sczl_dedh" style="width: 150px"
-											@blur="handleGjdhEnter" @keydown="ent1($event)" />
-										<el-input v-model="detailData.sys_mc" style="width: 450px; margin-left: 5px" readonly />
-									</el-form-item>
-								</el-col>
-							</el-row>
-							
-							<el-row :gutter="24" >
-								<el-col :span="24">
-									<el-form-item label="票号备注">
-										<el-input v-model="detailData.Sczl_desc" @keydown="ent1($event)"  style="width: 605px" />
-									</el-form-item>
-								</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="dialogDedh" :before-close="()=>{dialogDedh = false}" title="工价代号"
-						destroy-on-close>
-
-						<el-scrollbar style="height: 50vh;width: 50vw;">
-							<el-tree :data="dedhTreeData" highlight-current style="width: 90%;"
-								@node-click="handleSelectDjdh" />
-						</el-scrollbar>
-					</el-dialog>
-
-					<!-- 工艺流程弹窗 -->
-					<el-dialog v-model="dialogGylc" title="工艺流程"
-						destroy-on-close style="width: 500px; " @keydown="selectGX($event)">
+										</el-form-item>
+									</el-col>
+									<el-col :span="10">
+										<el-form-item label="日期">
+											<el-input type="date" max="9999-12-31" v-model="detailData.Sczl_rq"
+												@keydown="ent1($event)" style="width: 150px" />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="24">
+										<el-form-item label="工单编号">
+											<el-input v-model="detailData.Sczl_gdbh" @blur="handleGdbhEnter"
+												placeholder="Enter回车" @keydown="ent1($event)" style="width: 120px" />
+											<el-input v-model="detailData.Gd_cpmc"
+												style="width: 480px; margin-left: 5px" readonly />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="24">
+										<el-form-item label="工艺流程">
+											<el-input v-model="detailData.Sczl_gxmc" @blur="handleGylcEnter"
+												@keydown="ent1($event)" style="width: 480px" />
+											<el-input v-model="detailData.sczl_gxh"
+												style="width: 120px; margin-left: 5px" readonly />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="14">
+										<el-form-item label="" style="margin-left: 67px;">
+											<el-input v-model="leftData" @keydown="ent1($event)"
+												style="width: 100px; margin-left: 32px;"
+												@blur="()=>{detailData.Sczl_cl = (leftData * rightData).toString()}" />X
+											<el-input v-model="rightData" @keydown="ent1($event)"
+												style="width: 100px;margin-left: 12px;"
+												@blur="()=>{detailData.Sczl_cl = (leftData * rightData).toString()}" />
+
+										</el-form-item>
+									</el-col>
+									<el-col :span="10">
+										<el-form-item label="计件产量">
+											<el-input @keydown="ent1($event)" v-model="detailData.Sczl_cl"
+												style="width: 150px" />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="24">
+										<el-form-item label="工价代号">
+											<el-input v-model="detailData.Sczl_dedh" style="width: 150px"
+												@blur="handleGjdhEnter" @keydown="ent1($event)" />
+											<el-input v-model="detailData.sys_mc" style="width: 450px; margin-left: 5px"
+												readonly />
+										</el-form-item>
+									</el-col>
+								</el-row>
+
+								<el-row :gutter="24">
+									<el-col :span="24">
+										<el-form-item label="票号备注">
+											<el-input v-model="detailData.Sczl_desc" @keydown="ent1($event)"
+												style="width: 605px" />
+										</el-form-item>
+									</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="dialogDedh" :before-close="()=>{dialogDedh = false}" title="工价代号"
+							destroy-on-close>
+
+							<el-scrollbar style="height: 50vh;width: 50vw;">
+								<el-tree :data="dedhTreeData" highlight-current style="width: 90%;"
+									@node-click="handleSelectDjdh" />
+							</el-scrollbar>
+						</el-dialog>
+
+						<!-- 工艺流程弹窗 -->
+						<el-dialog v-model="dialogGylc" title="工艺流程" destroy-on-close style="width: 500px; "
+							@keydown="selectGX($event)">
+
+							<el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
+								border style="width:100%" height="400px" @row-dblclick="handleSelectClick" ref="table2">
+								<el-table-column prop="jyGx" label="检验工序" width="460" />
+							</el-table>
+
+						</el-dialog>
+
+						<!-- 工序类别选择 -->
+						<el-dialog v-model="LBVisible" title="选择" destroy-on-close width="200px"
+							@keydown="selectLB($event)">
+							<el-table tooltip-effect="dark" :data="LBselectData" row-key="ID"
+								highlight-current-row="true" border style="width:100%" :row-style="{ height: '30px' }"
+								@row-dblclick="LBSelectClick" ref="tableLB">
+								<el-table-column prop="sczl_Type" label="" width="160" />
+							</el-table>
+						</el-dialog>
+					</div>
 
-						<el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
-							border style="width:100%" height="400px" @row-dblclick="handleSelectClick" ref="table2">
-							<el-table-column prop="jyGx" label="检验工序" width="460" />
+					<!-- 员工选择 -->
+					<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>
-
-		<!-- 工序类别选择 -->
-		  <el-dialog v-model="LBVisible" title="选择"
-		    destroy-on-close width="200px" @keydown="selectLB($event)" >
-		    <el-table tooltip-effect="dark" :data="LBselectData" row-key="ID"
-		      highlight-current-row="true" border style="width:100%"
-		      :row-style="{ height: '30px' }"
-		      @row-dblclick="LBSelectClick"
-		  			  ref="tableLB"
-		    >
-		      <el-table-column prop="sczl_Type" label="" width="160" />		      	 
-		    </el-table>
-		  </el-dialog>
-				</div>
-
-			</layout-header>
-			
-				<layout-content>
-					<!-- 数据展示 -->
-					<el-table ref="table" style="width: 100%" 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="handleShowEdit" @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>
-				</layout-content>
-				
-				  </el-main>
-				</el-container>
-				</el-container>
+				</el-main>
+			</el-container>
+		</el-container>
 	</div>
 </template>
 
@@ -209,7 +216,7 @@
 	} from 'element-plus'
 	import {
 		ref,
-		reactive, 
+		reactive,
 		nextTick
 	} from 'vue'
 	import {
@@ -433,7 +440,7 @@
 		type.value = 'create'
 		// 设置detailData对象中的所有属性值为空
 		Object.keys(detailData).forEach(key => {
-		  detailData[key] = '';
+			detailData[key] = '';
 		});
 		const date = dayjs().format('YYYY-MM-DD')
 		detailData.Sczl_rq = date
@@ -448,83 +455,139 @@
 		dialogFormVisible.value = true
 	}
 	const ent1 = (event) => {
-	  const inputs = document.getElementsByTagName('input');
-	  const currentIndex = Array.from(inputs).indexOf(event.target);
-	  
-	  if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-	    for (let i = currentIndex + 1; i < inputs.length; i++) {
-	      if (!inputs[i].readOnly) {
-	        nextTick(()=>{
-	          inputs[i].focus();
-	          inputs[i].select();
-	        })
-	        break;
-	      }
-	    }
-	  } else if (event.keyCode === 38) { // 向上箭头
-	    for (let i = currentIndex - 1; i >= 0; i--) {
-	      if (!inputs[i].readOnly) {
-	        nextTick(()=>{
-	          inputs[i].focus();
-	          inputs[i].select();
-	        })
-	        break;
-	      }
-	    }
-	  } else if (event.keyCode === 8) { // 删除箭头
-	    if (event.target.selectionStart === 0) {
-	      for (let i = currentIndex - 1; i >= 0; i--) {
-	        if (!inputs[i].readOnly) {
-	          nextTick(()=>{
-	            inputs[i].focus();
-	            inputs[i].setSelectionRange(0, 0);
-	            inputs[i].select(); // 全选输入框内容
-	          })
-	          break;
-	        }
-	      }
-	    }
-	  } else if (event.keyCode === 37) { // 向左箭头
-	    if (event.target.selectionStart === 0) {
-	      for (let i = currentIndex - 1; i >= 0; i--) {
-	        if (!inputs[i].readOnly) {
-	          nextTick(()=>{
-	            inputs[i].focus();
-	            inputs[i].select();
-	          })
-	          break;
-	        }
-	      }
-	    }
-	  } else if (event.keyCode === 39) { // 向右箭头
-	    if (event.target.selectionStart === event.target.value.length) {
-	      for (let i = currentIndex + 1; i < inputs.length; i++) {
-	        if (!inputs[i].readOnly) {
-	          nextTick(()=>{
-	            inputs[i].focus();
-	            inputs[i].select();
-	          })
-	          break;
-	        }
-	      }
-	    }
-	  }
-	}
-	
+		const inputs = document.getElementsByTagName('input');
+		const currentIndex = Array.from(inputs).indexOf(event.target);
+
+		if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+			for (let i = currentIndex + 1; i < inputs.length; i++) {
+				if (!inputs[i].readOnly) {
+					nextTick(() => {
+						inputs[i].focus();
+						inputs[i].select();
+					})
+					break;
+				}
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			for (let i = currentIndex - 1; i >= 0; i--) {
+				if (!inputs[i].readOnly) {
+					nextTick(() => {
+						inputs[i].focus();
+						inputs[i].select();
+					})
+					break;
+				}
+			}
+		} else if (event.keyCode === 8) { // 删除箭头
+			if (event.target.selectionStart === 0) {
+				for (let i = currentIndex - 1; i >= 0; i--) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].setSelectionRange(0, 0);
+							inputs[i].select(); // 全选输入框内容
+						})
+						break;
+					}
+				}
+			}
+		} else if (event.keyCode === 37) { // 向左箭头
+			if (event.target.selectionStart === 0) {
+				for (let i = currentIndex - 1; i >= 0; i--) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].select();
+						})
+						break;
+					}
+				}
+			}
+		} else if (event.keyCode === 39) { // 向右箭头
+			if (event.target.selectionStart === event.target.value.length) {
+				for (let i = currentIndex + 1; i < inputs.length; i++) {
+					if (!inputs[i].readOnly) {
+						nextTick(() => {
+							inputs[i].focus();
+							inputs[i].select();
+						})
+						break;
+					}
+				}
+			}
+		}
+	}
+
 	//员工编号回车事件
 	const handleYgbhEnter = async () => {
-		if(!detailData.Sczl_bh1){
+		if (!detailData.Sczl_bh1 || LBVisible.value) {
 			return
 		}
-		const res = await getYg({
+		const response = await getYg({
 			sczl_bh: detailData.Sczl_bh1
 		})
-		if (res.code === 0) {
-			detailData.name = res.data[0].ygxm
-			detailData.Sczl_bh1 = res.data[0].员工编号
+		if (response.code == 0) {
+			if (response.data.length == 1) {
+				detailData.name = response.data[0].ygxm
+				detailData.Sczl_bh1 = 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 = ''
+				detailData.Sczl_bh1 = ''
+			}
+		} else {
+			detailData.name = '';
+			detailData.Sczl_bh1 = '';
+		}
+	}
+	const dialogSelectVisible_Yg = ref(false)
+	const selectData_Yg = reactive([])
+	// 处理选择框
+	const handleSelectClick_Yg = (row, column, event) => {
+		detailData.name = row.ygxm
+		detailData.Sczl_bh1 = 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 = row.ygxm
+			detailData.Sczl_bh1 = row.员工编号
+		})
+	}
+
+
 	//工序类型选择
 	const get_LB = () => {
 		GetLB()
@@ -533,49 +596,64 @@
 	const LBselectData = reactive([])
 	//获取仓库信息
 	const GetLB = async () => {
-	  const data = [{'sczl_Type':'拆片'},{'sczl_Type':'包装'},{'sczl_Type':'打包'},{'sczl_Type':'拉料'}]
-	  LBselectData.splice(0, LBselectData.length, ...data)
-	  setLBCurrent(LBselectData[0])
-	  LBVisible.value=true
+		if(dialogSelectVisible_Yg.value){
+			return
+		}
+		const data = [{
+			'sczl_Type': '拆片'
+		}, {
+			'sczl_Type': '包装'
+		}, {
+			'sczl_Type': '打包'
+		}, {
+			'sczl_Type': '拉料'
+		}]
+		LBselectData.splice(0, LBselectData.length, ...data)
+		setLBCurrent(LBselectData[0])
+		LBVisible.value = true
 	}
 	//选择
 	const LBSelectClick = (row, column, event) => {
-	  const { sczl_Type } = row
-	  detailData.sczl_Type=sczl_Type
-	  LBVisible.value = false
+		const {
+			sczl_Type
+		} = row
+		detailData.sczl_Type = sczl_Type
+		LBVisible.value = false
 	}
-	const tableLB=ref()
+	const tableLB = ref()
 	const setLBCurrent = (row) => {
-	  setTimeout(()=>{
-		  tableLB.value?.setCurrentRow(row) 
-		  const { sczl_Type } = row
-		  detailData.sczl_Type = sczl_Type
-	  })
+		setTimeout(() => {
+			tableLB.value?.setCurrentRow(row)
+			const {
+				sczl_Type
+			} = row
+			detailData.sczl_Type = sczl_Type
+		})
 	}
 	const LBIndex = ref(0);
 	const LBCurrent = ref(0);
 	const selectLB = (event) => {
-	    if (event.keyCode === 40) { // 向下箭头
-	        if (LBIndex.value < LBselectData.length - 1) {
-	            LBIndex.value++;
-	            setLBCurrent(LBselectData[LBIndex.value]);
-	        } else {
-	            LBIndex.value = 0;
-	            setLBCurrent(LBselectData[LBIndex.value]); // 到达最后一行时回到第一行			
-	        }
-	    } else if (event.keyCode === 38) { // 向上箭头
-	        if (LBIndex.value > 0) {
-	            LBIndex.value--;
-	            setLBCurrent(LBselectData[LBIndex.value]);
-	        } else {
-	            LBIndex.value = LBselectData.length - 1;
-	            setLBCurrent(LBselectData[LBIndex.value]); // 到达第一行时回到最后一行
-	        }
-	    } else if (event.keyCode === 13) { // 回车键
-	        LBVisible.value = false
-	    }
-	}
-	
+		if (event.keyCode === 40) { // 向下箭头
+			if (LBIndex.value < LBselectData.length - 1) {
+				LBIndex.value++;
+				setLBCurrent(LBselectData[LBIndex.value]);
+			} else {
+				LBIndex.value = 0;
+				setLBCurrent(LBselectData[LBIndex.value]); // 到达最后一行时回到第一行			
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (LBIndex.value > 0) {
+				LBIndex.value--;
+				setLBCurrent(LBselectData[LBIndex.value]);
+			} else {
+				LBIndex.value = LBselectData.length - 1;
+				setLBCurrent(LBselectData[LBIndex.value]); // 到达第一行时回到最后一行
+			}
+		} else if (event.keyCode === 13) { // 回车键
+			LBVisible.value = false
+		}
+	}
+
 	const handleGdbhEnter = async () => {
 		const res = await getGdmc({
 			gdbh: detailData.Sczl_gdbh
@@ -645,15 +723,24 @@
 	}
 
 	const handleGjdhEnter = async () => {
-		const res = await getDedh({ sczl_jtbh: '' })
+		const res = await getDedh({
+			sczl_jtbh: ''
+		})
 		if (res.code === 0) {
-			const { data } = res
+			const {
+				data
+			} = res
 
 			const transformData = (data) => {
 				if (Array.isArray(data)) {
 					return data.map((item) => transformData(item))
 				} else if (typeof data === 'object') {
-					const { Key_, sys_bh, sys_mc, bh_mc } = data
+					const {
+						Key_,
+						sys_bh,
+						sys_mc,
+						bh_mc
+					} = data
 					const label = `${sys_bh}【${sys_mc}】`
 					const node = {
 						Key_,
@@ -662,7 +749,9 @@
 						label
 					}
 
-					if (bh_mc) { node.children = transformData(bh_mc) }
+					if (bh_mc) {
+						node.children = transformData(bh_mc)
+					}
 
 					return node
 				} else {
@@ -679,14 +768,17 @@
 
 	const handleSelectDjdh = (node, check) => {
 		if (!node['children']) {
-			const { sys_bh, sys_mc } = node
+			const {
+				sys_bh,
+				sys_mc
+			} = node
 			detailData.Sczl_dedh = sys_bh
 			detailData.sys_mc = sys_mc
 			dialogDedh.value = false
 		}
 	}
 
-	
+
 	// 弹窗确定
 	const enterDialog = async () => {
 		// if(formData.value.入仓类型==''){
@@ -709,7 +801,7 @@
 		// 	ElMessage({type: 'warning',message: '请填写入仓数量'});
 		// 	return;
 		// }
-		
+
 		const restoredData = {
 			Sys_id: sys_id,
 			Sczl_bh1: detailData.Sczl_bh1,
@@ -722,29 +814,29 @@
 			Sczl_dedh: detailData.Sczl_dedh,
 			Sczl_desc: detailData.Sczl_desc,
 		}
-	    let res
-	    switch (type.value) {
-	      case 'create':
-	        res = await add(restoredData)
-	        break
-	      case 'update':
-			restoredData.UniqId = detailData.UniqId;
-	        res = await updateData(restoredData)
-	        break
-	      default:
-	        // res = await createCompany(formData.value)
-	        break
-	    }
-	    if (res.code === 0) {
-	      ElMessage({
-	        type: 'success',
-	        message: type.value=='create'? '创建成功' :'更改成功'
-	      })
-		  
-		  dialogFormVisible.value = false
-		  	getTableData()
-		  // getSideData()
-	    }
+		let res
+		switch (type.value) {
+			case 'create':
+				res = await add(restoredData)
+				break
+			case 'update':
+				restoredData.UniqId = detailData.UniqId;
+				res = await updateData(restoredData)
+				break
+			default:
+				// res = await createCompany(formData.value)
+				break
+		}
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: type.value == 'create' ? '创建成功' : '更改成功'
+			})
+
+			dialogFormVisible.value = false
+			getTableData()
+			// getSideData()
+		}
 	}
 
 	// 关闭弹窗
@@ -797,11 +889,11 @@
 				break
 		}
 	}
-	
+
 	const rowSelection = {
-	      type: 'radio'
-	    };
-		
+		type: 'radio'
+	};
+
 	// let lastCellValue=ref()
 	// 多选
 	// const handleSelectionChange = (val) => {
@@ -811,46 +903,50 @@
 	//   console.log(lastCellValue)
 	//   console.log(rowSelection)
 	// }
-	
+
 	//删除
 	function onDel() {
-		if(!currentRow.value){
+		if (!currentRow.value) {
 			ElMessage({
-			  type: 'warning',
-			  message: '请选择要删除的数据',
+				type: 'warning',
+				message: '请选择要删除的数据',
 			})
 			return
 		}
 		ElMessageBox.confirm('确定要删除吗?', '提示', {
-		    confirmButtonText: '确定',
-		    cancelButtonText: '取消',
-		    type: 'warning'
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
 		}).then(() => {
-		        del({UniqId:currentRow.value.UniqId}).then(res=>{
-		        	if (res.code === 0) {
-		        			ElMessage({
-		        			  type: 'success',
-		        			  message: '删除成功',
-		        			})
-		        	}
-		        	getTableData()
-		        })
-		    })
-		
+			del({
+				UniqId: currentRow.value.UniqId
+			}).then(res => {
+				if (res.code === 0) {
+					ElMessage({
+						type: 'success',
+						message: '删除成功',
+					})
+				}
+				getTableData()
+			})
+		})
+
 		// Del()
 	}
 	//删除
 	const Del = async () => {
 		console.log(lastCellValue)
 		return
-	  const response = await finisheddel({UniqId:lastCellValue});
-	  if (response.code === 0) {
-		ElMessage({
-		  type: 'success',
-		  message: '删除成功',
-		})
-	  }
-	  getTableData()
+		const response = await finisheddel({
+			UniqId: lastCellValue
+		});
+		if (response.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '删除成功',
+			})
+		}
+		getTableData()
 	}
 </script>
 

+ 902 - 714
src/view/performance/08-timesheet/index.vue

@@ -1,714 +1,902 @@
-<template>
-  <div>
-    <layout>
-      <layout-header>
-        <!-- 按钮 -->
-        <el-form inline>
-          <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"
-            ><i class="el-icon-edit" />查改
-            </el-button>
-
-            <el-button
-              type="primary"
-              icon="edit"
-              class="bt"
-              @click="handleShowAdd"
-            >新增
-            </el-button>
-
-          </el-form-item>
-        </el-form>
-
-        <!-- 弹出框 -->
-        <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"
-                    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-col :span="3"> <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" :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-input v-model="detailData.wgjs_yy1" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额1" >
-                    <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-input v-model="detailData.wgjs_yy2" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额2" >
-                    <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-input v-model="detailData.wgjs_yy3" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额3" >
-                    <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-input v-model="detailData.wgjs_yy4" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额4" >
-                    <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-input v-model="detailData.wgjs_yy5" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额5" >
-                    <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-input v-model="detailData.wgjs_yy6" />
-                </el-col>
-                <el-col :span="3">
-                  <el-select v-model="detailData.wgjs_冲定额6" >
-                    <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>
-
-        </div>
-
-      </layout-header>
-
-      <layout>
-        <!--    左侧树侧形结构-->
-        <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>
-
-        <layout-content>
-          <!-- 数据展示 -->
-          <el-table
-            ref="table"
-            style="width: 100%"
-            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
-              type="selection"
-              width="55"
-            />
-            <!-- 循环渲染列 -->
-            <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>
-
-        </layout-content>
-      </layout>
-    </layout>
-
-  </div>
-</template>
-
-<script setup>
-// 全量引入格式化工具 请按需保留
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
-import { ElMessage, dayjs } from 'element-plus'
-import { ref, reactive } from 'vue'
-import { getSide, getTable, getDetail, updateData, getLocate, createData, getYg } from '@/api/mes_api_gty/timesheet'
-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 getSide()
-  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: 120 },
-  { 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(10)
-const searchInfo = ref('')
-const params = {
-  date: '',
-  search: '',
-  type: '',
-}
-
-const getTableData = async(params) => {
-  const response = await getTable(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 getDetail({ UniqId })
-  if (res.code === 0) {
-    Object.assign(detailData, res.data)
-    // dialogFormVisible.value = true
-    showDialog()
-  }
-}
-
-// 新增数据
-const handleShowAdd = () => {
-	type.value = 'add';
-	if(!currentRow.value){
-		detailData.wgjs_rq= '';
-	  
-		detailData.wgjs_bh1= '';
-		detailData.wgjs_js1= '';
-		detailData.wgjs_yy1= '';
-		detailData.wgjs_冲定额1= '';
-	  
-		detailData.wgjs_bh2= '';
-		detailData.wgjs_js2= '';
-		detailData.wgjs_yy2= '';
-		detailData.wgjs_冲定额2= '';
-		
-		detailData.wgjs_bh3= '';
-		detailData.wgjs_js3= '';
-		detailData.wgjs_yy3= '';
-		detailData.wgjs_冲定额3= '';
-		
-		detailData.wgjs_bh4= '';
-		detailData.wgjs_js4= '';
-		detailData.wgjs_yy4= '';
-		detailData.wgjs_冲定额4= '';
-		
-		detailData.wgjs_bh5= '';
-		detailData.wgjs_js5= '';
-		detailData.wgjs_yy5= '';
-		detailData.wgjs_冲定额5= '';
-		
-		detailData.wgjs_bh6= '';
-		detailData.wgjs_js6= '';
-		detailData.wgjs_yy6= '';
-		detailData.wgjs_冲定额6= '';
-		
-	}else{
-  	  Object.assign(detailData, currentRow.value)
-	}
-  
-  // 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_冲定额1: detailData.wgjs_冲定额1,
-
-    wgjs_bh2: detailData.wgjs_bh2,
-    wgjs_js2: detailData.wgjs_js2,
-    wgjs_yy2: detailData.wgjs_yy2,
-    wgjs_冲定额2: detailData.wgjs_冲定额2,
-
-    wgjs_bh3: detailData.wgjs_bh3,
-    wgjs_js3: detailData.wgjs_js3,
-    wgjs_yy3: detailData.wgjs_yy3,
-    wgjs_冲定额3: detailData.wgjs_冲定额3,
-
-    wgjs_bh4: detailData.wgjs_bh4,
-    wgjs_js4: detailData.wgjs_js4,
-    wgjs_yy4: detailData.wgjs_yy4,
-    wgjs_冲定额4: detailData.wgjs_冲定额4,
-
-    wgjs_bh5: detailData.wgjs_bh5,
-    wgjs_js5: detailData.wgjs_js5,
-    wgjs_yy5: detailData.wgjs_yy5,
-    wgjs_冲定额5: detailData.wgjs_冲定额5,
-
-    wgjs_bh6: detailData.wgjs_bh6,
-    wgjs_js6: detailData.wgjs_js6,
-    wgjs_yy6: detailData.wgjs_yy6,
-    wgjs_冲定额6: detailData.wgjs_冲定额6,
-  }
-  restoredData.sys_id = sys_id;
-  const res = await createData(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()
-    dialogFormVisible.value = false
-  }
-}
-// 修改
-const updateDetailData = async() => {
-  const obj = detailData
-  for (let i = 1; i <= 6; i++) {
-    delete obj[`name${i}`]
-  }
-  const res = await updateData(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 formElements
-const moveFocus = async(event) => {
-  const index = Array.from(formElements).indexOf(event.target)
-  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 6:
-    case 11:
-    case 16:
-    case 21:
-    case 26:
-      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) / 5 + 1}`] = ''
-          break
-        }
-        const res = await getYg({ sczl_bh })
-        if (res.code === 0) {
-    //       const { data: { 员工编号,ygxm }} = res
-		  // console.log((index - 1) / 5 + 1)
-          detailData[`name${(index - 1) / 5 + 1}`] = res.data[0].ygxm
-		  detailData[`wgjs_bh${(index - 1) / 5 + 1}`] = res.data[0].员工编号
-        }
-      }
-      break
-
-    default:
-      if (key === 'ArrowDown') {
-        focusNext(1)
-      } else if (key === 'ArrowUp') {
-        focusNext(-1)
-      } else if (key === 'Enter') {
-        focusNext(1)
-      }
-      break
-  }
-}
-
-</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;
-}
-</style>
+<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-form-item>
+						</el-form>
+						<!-- 数据展示 -->
+						<el-table ref="table" style="width: 100%" 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" 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-col :span="3"> <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" :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-input v-model="detailData.wgjs_yy1" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额1">
+											<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-input v-model="detailData.wgjs_yy2" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额2">
+											<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-input v-model="detailData.wgjs_yy3" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额3">
+											<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-input v-model="detailData.wgjs_yy4" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额4">
+											<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-input v-model="detailData.wgjs_yy5" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额5">
+											<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-input v-model="detailData.wgjs_yy6" />
+									</el-col>
+									<el-col :span="3">
+										<el-select v-model="detailData.wgjs_冲定额6">
+											<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>
+
+					</div>
+					
+					<!-- 员工选择 -->
+					<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>
+
+				</el-main>
+			</el-container>
+		</el-container>
+	</div>
+</template>
+
+<script setup>
+	// 全量引入格式化工具 请按需保留
+	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 {
+		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 getSide()
+		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: 120
+		},
+		{
+			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(10)
+	const searchInfo = ref('')
+	const params = {
+		date: '',
+		search: '',
+		type: '',
+	}
+
+	const getTableData = async (params) => {
+		const response = await getTable(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 getDetail({
+			UniqId
+		})
+		if (res.code === 0) {
+			Object.assign(detailData, res.data)
+			// dialogFormVisible.value = true
+			showDialog()
+		}
+	}
+
+	// 新增数据
+	const handleShowAdd = () => {
+		type.value = 'add';
+		if (!currentRow.value) {
+			detailData.wgjs_rq = '';
+
+			detailData.wgjs_bh1 = '';
+			detailData.wgjs_js1 = '';
+			detailData.wgjs_yy1 = '';
+			detailData.wgjs_冲定额1 = '';
+
+			detailData.wgjs_bh2 = '';
+			detailData.wgjs_js2 = '';
+			detailData.wgjs_yy2 = '';
+			detailData.wgjs_冲定额2 = '';
+
+			detailData.wgjs_bh3 = '';
+			detailData.wgjs_js3 = '';
+			detailData.wgjs_yy3 = '';
+			detailData.wgjs_冲定额3 = '';
+
+			detailData.wgjs_bh4 = '';
+			detailData.wgjs_js4 = '';
+			detailData.wgjs_yy4 = '';
+			detailData.wgjs_冲定额4 = '';
+
+			detailData.wgjs_bh5 = '';
+			detailData.wgjs_js5 = '';
+			detailData.wgjs_yy5 = '';
+			detailData.wgjs_冲定额5 = '';
+
+			detailData.wgjs_bh6 = '';
+			detailData.wgjs_js6 = '';
+			detailData.wgjs_yy6 = '';
+			detailData.wgjs_冲定额6 = '';
+
+		} else {
+			Object.assign(detailData, currentRow.value)
+		}
+
+		// 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_冲定额1: detailData.wgjs_冲定额1,
+
+			wgjs_bh2: detailData.wgjs_bh2,
+			wgjs_js2: detailData.wgjs_js2,
+			wgjs_yy2: detailData.wgjs_yy2,
+			wgjs_冲定额2: detailData.wgjs_冲定额2,
+
+			wgjs_bh3: detailData.wgjs_bh3,
+			wgjs_js3: detailData.wgjs_js3,
+			wgjs_yy3: detailData.wgjs_yy3,
+			wgjs_冲定额3: detailData.wgjs_冲定额3,
+
+			wgjs_bh4: detailData.wgjs_bh4,
+			wgjs_js4: detailData.wgjs_js4,
+			wgjs_yy4: detailData.wgjs_yy4,
+			wgjs_冲定额4: detailData.wgjs_冲定额4,
+
+			wgjs_bh5: detailData.wgjs_bh5,
+			wgjs_js5: detailData.wgjs_js5,
+			wgjs_yy5: detailData.wgjs_yy5,
+			wgjs_冲定额5: detailData.wgjs_冲定额5,
+
+			wgjs_bh6: detailData.wgjs_bh6,
+			wgjs_js6: detailData.wgjs_js6,
+			wgjs_yy6: detailData.wgjs_yy6,
+			wgjs_冲定额6: detailData.wgjs_冲定额6,
+		}
+		restoredData.sys_id = sys_id;
+		const res = await createData(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()
+			dialogFormVisible.value = false
+		}
+	}
+	// 修改
+	const updateDetailData = async () => {
+		const obj = detailData
+		for (let i = 1; i <= 6; i++) {
+			delete obj[`name${i}`]
+		}
+		const res = await updateData(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)
+		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 6:
+			case 11:
+			case 16:
+			case 21:
+			case 26:
+				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) / 5 + 1}`] = ''
+						break
+					}
+					const response = await getYg({
+						sczl_bh
+					})
+					if (response.code == 0) {
+						if (response.data.length == 1) {
+							detailData[`name${(index - 1) / 5 + 1}`] = response.data[0].ygxm;
+							detailData[`wgjs_bh${(index - 1) / 5 + 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) / 5 + 1}`] = '';
+							detailData[`wgjs_bh${(index - 1) / 5 + 1}`] = '';
+						}
+					} else {
+						detailData[`name${(index - 1) / 5 + 1}`] = '';
+						detailData[`wgjs_bh${(index - 1) / 5 + 1}`] = '';
+					}
+					//     if (res.code === 0) {
+					// //       const { data: { 员工编号,ygxm }} = res
+					// // console.log((index - 1) / 5 + 1)
+					//       detailData[`name${(index - 1) / 5 + 1}`] = res.data[0].ygxm
+					// detailData[`wgjs_bh${(index - 1) / 5 + 1}`] = res.data[0].员工编号
+					//     }
+				}
+				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) / 5 + 1}`] = row.ygxm
+			detailData[`wgjs_bh${(index_Yg - 1) / 5 + 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 deleteData({
+				UniqId: currentRow.value.UniqId
+			});
+			if (response.code === 0) {
+				ElMessage({
+					type: 'success',
+					message: '删除成功',
+				})
+				//刷新页面
+				getTableData({
+					date: params.date,
+					page: page.value.toString(),
+					limit: limit.value.toString()
+				})
+			}
+		})
+	}
+</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;
+	}
+</style>

+ 1179 - 1255
src/view/performance/09-workOrderVerification/index.vue

@@ -1,1257 +1,1181 @@
-<template>
-  <div>
-    <el-container>
-      <!-- 左侧树形结构 -->
-      <el-scrollbar max-height="75vh">
-        <!-- <el-aside>
-          <div class="JKWTree-tree">
-            <h3>工单核验单维护</h3>
-            <el-tree
-              :data="treeData"
-              highlight-current
-              @node-click="handleNodeClick"
-            />
-          </div>
-        </el-aside> -->
-		
-		<layout-sider
-		   :resize-directions="['right']"
-		   :width="220"
-		   style="margin-right: 50px;"
-		 >
-		   <div
-		     class="JKWTree-tree"
-		     style="height: 70vh;"
-		   >
-		     <h3>工单核验单维护</h3>
-		     <el-tree
-		       :data="treeData"
-		       highlight-current
-		       @node-click="handleNodeClick"
-		     />
-		   </div>
-		 </layout-sider>
-      </el-scrollbar>
-
-      <el-container>
-        <el-main>
-          <div class="gva-table-box">
-            <!-- 按钮区域 -->
-            <div class="gva-btn-list">
-              <el-row :span="6">
-                <el-input
-                  v-model="searchInfo"
-                  placeholder="输入工单编号"
-                />
-              </el-row>
-              <el-button
-                type="primary"
-                :icon="Search"
-				class="bt"
-                @click="handleSearch"
-              >搜索
-              </el-button>
-              <el-button
-                type="primary"
-                icon="copy-document"
-				class="bt"
-                @click="dialogMrhjtj = true"
-              >每日核检统计
-              </el-button>
-              <el-button
-                type="primary"
-                icon="copy-document"
-				class="bt"
-                @click="showGdzjfptj"
-              >工单质检废品统计
-              </el-button>
-              <el-button
-                type="primary"
-                
-				class="bt" icon="plus"
-                @click="handleShowAdd"
-              >新增
-              </el-button>
-              <div style="margin-left: auto;">
-                <!-- <el-button
-                  type="primary"
-                  :icon="Download"
-				  class="bt"
-                  @click="exportExcel"
-                >导出到Excel</el-button> -->
-              </div>
-            </div>
-            <!-- 数据展示 -->
-            <el-table
-              ref="table"
-              style="width: 100%"
-              :data="tableData"
-              row-key="ID"
-              highlight-current-row
-              border
-              show-overflow-tooltip
-              :row-style="{ height: '20px' }"
-              :cell-style="{ padding: '0px' }"
-              :header-row-style="{ height: '20px' }"
-              :header-cell-style="{ padding: '0px' }"
-              @row-click="handleSelectChange"
-              @row-dblclick="doubleClick"
-            >
-              <el-table-column
-                type="selection"
-                width="55"
-              />
-              <!-- 循环渲染表格列 -->
-              <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>
-
-          <!-- 弹出框 -->
-          <el-dialog v-model="dialogFormVisible" :before-close="closeDialog"
-            :title="type" destroy-on-close width="1000px"
-          >
-
-            <el-form ref="elFormRef" :model="detailData"
-              inline label-position="right"
-              :rules="rule" id="detail-form"
-            >
-			<el-row :gutter="30">
-				<el-col :span="5">
-					<el-form-item label="日期" >
-						<el-date-picker v-model="detailData.qczl_rq" type="date" style="width: 150px;" />
-					</el-form-item>
-				</el-col>
-				<el-col :span="5">
-					<el-form-item label="工单编号" >
-					  <el-input  v-model="detailData.qczl_gdbh"
-						style="width: 150px;"
-						@keyup.enter="handleGdbhEnter"
-						placeholder="Enter回车"
-					  />
-					</el-form-item>
-				</el-col>
-				<el-col :span="5">
-					<el-form-item label="拼印主工单">
-					  <el-input
-					    v-model="detailData.qczl_Pygd"
-					    style="width: 150px;"
-					  />
-					</el-form-item>
-				</el-col>
-				<el-col :span="6">
-					<el-form-item label="产品名称" >
-					  <el-input v-model="detailData.Gd_cpmc"
-					    style="width: 300px;" readonly />
-					</el-form-item>
-				</el-col>
-			</el-row>
-              <br>
-              <el-form-item
-                label="印件号"
-              >
-                <el-input
-                  v-model="detailData.qczl_yjno"
-                  style="width: 60px;"
-                />
-              </el-form-item>
-              <el-form-item
-                label="印件名称"
-                style="margin-left: 47px"
-              >
-                <el-input
-                  v-model="detailData.yj_yjmc"
-                  style="width: 500px;"
-                  
-                />
-              </el-form-item>
-              <el-form-item
-                label="废品总数"
-              >
-                <el-input
-                  v-model="detailData.qczl_fp" id="废品总数"
-                  style="width: 100px;"
-                />
-              </el-form-item>
-              <br>
-
-              <el-form-item
-                label="工序"
-              >
-                <el-input
-                  v-model="detailData.qczl_gxmc"
-                  style="width: 200px;"
-                  @keyup.enter.native="getgxsubmit"
-                />
-              </el-form-item>
-              <el-form-item
-                label="工序号"
-              >
-                <el-input
-                  v-model="detailData.qczl_gxh"
-                  style="width: 100px;"
-                  
-                />
-              </el-form-item>
-              <el-form-item
-                label="总流程号"
-              >
-                <el-input
-                  v-model="detailData.total_liucheng"
-                  style="width: 100px;"
-                  
-                />
-              </el-form-item>
-
-              <el-form-item
-                label="流程单号"
-              >
-                <el-input
-                  v-model="detailData.qczl_num"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc1"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc2"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc3"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc4"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc5"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc6"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc7"
-                  style="width: 60px; margin-left: 5px;"
-                />
-                <el-input
-                  v-model="detailData.qczl_NumDesc8"
-                  style="width: 60px; margin-left: 5px;"
-                />
-              </el-form-item>
-
-              <el-form-item
-                label="备注"
-              >
-                <el-input
-                  v-model="detailData.qczl_NumDesc"
-                  style="width: 200px;"
-                />
-              </el-form-item>
-
-              <el-scrollbar height="400px">
-                <el-table
-                  :data="detailData.table"
-                  border
-                  tooltip-effect="dark"
-                  :row-style="{ height: '20px' }"
-                  :cell-style="{ padding: '0px' }"
-                  :header-row-style="{ height: '20px' }"
-                  :header-cell-style="{ padding: '0px' }"
-                >
-                  <el-table-column
-                    label="废品类别"
-                    width="200"
-                  >
-                    <template #default="{ row, $index }">
-                      <el-input
-                        v-model="row.fp_lb"
-                        @keyup.enter="handleFplbEnter($index, row)"
-                      />
-                    </template>
-                  </el-table-column>
-
-                  <el-table-column
-                    label="数量"
-                    width="100"
-                  >
-                    <template #default="{ row, $index }">
-                      <el-input
-                        v-model="row.fp_sl"
-                        @keyup.enter="handleFpslEnter($index, row)"
-                      />
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    label="工序及责任机长"
-                    width="500"
-                  >
-                    <template #default="{ row }">
-                      <el-input
-                        v-model="row.fp_gxmc"
-                      />
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    label=""
-                    width="100"
-                  >
-                    <template #default="{ row }">
-                      <el-input
-                        v-model="row.fp_bz"
-                        
-                      />
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    label=""
-                    width="100"
-                  >
-                    <template #default="{ row }">
-                      <el-input
-                        v-model="row.fp_bh"
-                      />
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    label=""
-                    width="100"
-                  >
-                    <template #default="{ row }">
-                      <el-input
-                        v-model="row.fp_name"
-                        
-                      />
-                    </template>
-                  </el-table-column>
-                </el-table>
-
-              </el-scrollbar>
-
-            </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="dialogSelectVisible1"
-            title="选择"
-            destroy-on-close
-            width="600px"
-          >
-            <el-tree
-              :data="selecTreeData"
-              :props="defaultProps"
-              highlight-current
-              @node-click="handleFplbClick"
-            />
-          </el-dialog>
-
-          <!-- 弹出选项框 数量 -->
-          <el-dialog
-            v-model="dialogSelectVisible2"
-            title="选择"
-            destroy-on-close
-            width="800px"
-			@keydown="selectSL($event)"
-          >
-            <el-table
-              tooltip-effect="dark"
-              :data="selectData"
-              row-key="ID"
-              highlight-current-row
-              border
-              style="width:100%"
-              @row-dblclick="handleSelectClick"
-			  ref="table2"
-            >
-              <el-table-column
-                v-for=" column in selectColumns "
-                :key="column.prop"
-                :prop="column.prop"
-                :label="column.label"
-                :width="column.width"
-              />
-            </el-table>
-          </el-dialog>
-
-<el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="1000px" @keydown="selectGX($event)" >
-            <el-table tooltip-effect="dark" :data="selectData_gd"
-              row-key="ID" highlight-current-row="true"
-              border style="width:100%"
-              @row-dblclick="handleSelectClick_gd" ref="table_gd"
-            >
-              <el-table-column prop="Gd_cpmc" label="工单名称" width="430" />
-			  <el-table-column prop="yj_Yjno" label="印件号" width="100" />
-              <el-table-column prop="yj_yjmc" label="印件名称" width="430" />			 
-            </el-table>
-          </el-dialog>
-          <el-dialog
-            v-model="GetjtbhVisible"
-            title="选择"
-            destroy-on-close
-            width="600px"
-          >
-            <el-table
-              tooltip-effect="dark"
-              :data="JTBHselectData"
-              row-key="ID"
-              highlight-current-row="true"
-              border
-              style="width:100%"
-              @row-dblclick="JTBHSelectClick"
-            >
-              <el-table-column
-                prop="gxh"
-                label="工序号"
-                width="70"
-              />
-              <el-table-column
-                prop="gxmc"
-                label="工序名称"
-                width="150"
-              />
-              <el-table-column
-                prop="addGxmc"
-                label="工序名称"
-                width="150"
-              />
-            </el-table>
-          </el-dialog>
-
-          <!-- 废品日统计 -->
-          <Meirihejiantongji
-            v-if="dialogMrhjtj"
-            v-model="dialogMrhjtj"
-          />
-
-          <!-- 工单质检废品统计 -->
-          <Gongdanzhijianfeipintongji
-            v-if="dialogGdzjfptj"
-            v-model="dialogGdzjfptj"
-            :val="value1"
-          />
-
-          <!-- 测试图表 -->
-          <Shebeizhuangtai
-            v-if="dialogSbyxgl"
-            v-model="dialogSbyxgl"
-            title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】"
-          />
-
-        </el-main>
-      </el-container>
-    </el-container>
-
-  </div>
-</template>
-
-<script setup>
-import {
-  createCompany,
-  deleteCompany,
-  deleteCompanyByIds,
-  updateCompany,
-  findCompany,
-  getCompanyList
-} from '@/api/company'
-
-// 全量引入格式化工具 请按需保留
-import { ElMessage } from 'element-plus'
-import { Search, Refresh, Download } from '@element-plus/icons-vue'
-import { ref, reactive } from 'vue'
-import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getYjInfo, getWastInfo, updateData, add } from '@/api/mes_api_gty/workOrderVerification'
-import Meirihejiantongji from '@/view/performance/09-workOrderVerification/componets/meirihejiantongji.vue'
-import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
-import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
-import { useUserStore } from '@/pinia/modules/user'
-const userStore = useUserStore() 
-const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
-defineOptions({
-  name: '06PackingDocuments'
-})
-
-// 侧边栏数据请求
-const treeData = reactive([])
-const getSideData = async() => {
-  const response = await getSide()
-  if (response.code === 0) {
-    const transformedData = response.data.map(item => ({
-      label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
-      children: item.sys.map(sysItem => ({
-        label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
-        params: {
-          date: item.date.replace(/\./g, '-'),
-          sys_id: sysItem.sys_id,
-        },
-      })),
-    }))
-    treeData.splice(0, treeData.length, ...transformedData)
-  }
-}
-
-getSideData()
-
-// 验证规则
-const rule = reactive({
-})
-
-const elFormRef = ref()
-const elSearchFormRef = ref()
-
-// =========== 表格控制部分 ===========
-const tableColumns = [
-  { label: '工单编号', prop: 'qczl_gdbh', width: '120' },
-  { label: '印件号', prop: 'qczl_yjno', width: '100' },
-  { label: '印件名称', prop: 'Gd_cpmc', width: '400' },
-  { label: '日期', prop: 'qczl_rq', width: '100' },
-  { label: '流程单号', prop: 'qczl_num', width: '120' },
-  { label: '流程单备注', prop: 'qczl_NumDesc', width: '120' },
-  { label: '总废品', prop: 'qczl_fp', width: '100' },
-  { label: '废品1', prop: 'sl_lb1', width: '250' },
-  { label: '废品2', prop: 'sl_lb2', width: '250' },
-  { label: '废品3', prop: 'sl_lb3', width: '250' },
-  { label: '废品4', prop: 'sl_lb4', width: '250' },
-  { label: '废品5', prop: 'sl_lb5', width: '250' },
-  { label: '废品6', prop: 'sl_lb6', width: '250' },
-  { label: '废品7', prop: 'sl_lb7', width: '250' },
-  { label: '废品8', prop: 'sl_lb8', width: '250' },
-  { label: '废品9', prop: 'sl_lb9', width: '250' },
-  { label: '废品10', prop: 'sl_lb10', width: '250' },
-  { label: '废品11', prop: 'sl_lb11', width: '250' },
-  { label: '废品12', prop: 'sl_lb12', width: '250' },
-  { label: '废品13', prop: 'sl_lb13', width: '250' },
-  { label: '废品14', prop: 'sl_lb14', width: '250' },
-  { label: '废品15', prop: 'sl_lb15', width: '250' },
-  { label: '废品16', prop: 'sl_lb16', width: '250' },
-  { label: '废品17', prop: 'sl_lb17', width: '250' },
-  { label: '创建用户', prop: 'sys_id', width: '200' }
-]
-const tableData = reactive([])
-const GetjtbhVisible = ref(false)
-const total = ref(0)
-const page = ref(1)
-const limit = ref(10)
-const JTBHselectData = reactive([])
-const searchInfo = ref('')
-const params = {
-  date: '',
-  sys_id: '',
-  order: '',
-  page: page.value.toString(),
-  limit: limit.value.toString(),
-}
-// 获取工序
-const getgxsubmit = () => {
-  GetJtbh()
-}
-const GetJtbh = async() => {
-  try {
-    const { qczl_gdbh, qczl_yjno } = detailData
-    const response = await getYjInfo({ order: qczl_gdbh, yj_no: qczl_yjno })
-    if (response.code === 0) {
-      const data = response.data
-      if (data) {
-        const tableData = data.gx_data.map(item => ({
-          gxh: item.Gy0_gxh,
-          gxmc: item.Gy0_gxmc + (item.Add_gxmc === '' ? '' : '-' + item.Add_gxmc),
-          // addGxmc: item.Add_gxmc
-        }))
-        console.log(tableData)
-        JTBHselectData.splice(0, JTBHselectData.length, ...tableData)
-        GetjtbhVisible.value = true
-        // Now you can use the tableData to populate your table
-      } else {
-        console.log('No data found')
-      }
-    } else {
-      console.log('Error: ', response.msg)
-    }
-  } catch (error) {
-    console.error('Error fetching data: ', error)
-  }
-}
-const JTBHSelectClick = (row, column, event) => {
-  const { gxh, gxmc } = row
-  detailData.qczl_gxmc = gxh + '-' + gxmc
-  detailData.qczl_gxh = gxh
-  GetjtbhVisible.value = false
-}
-// 批量删除控制标记
-const deleteVisible = ref(false)
-const multipleSelection = ref([])
-const minUniqId = ref('')
-const getTableData = async() => {
-  const response = await getTable(params)
-  if (response.code === 0) {
-    total.value = response.data.total
-    // Object.assign(tableData, response.data.rows)
-
-    tableData.splice(0, tableData.length, ...response.data.rows)
-    minUniqId.value = Math.min(...tableData.map(row => row.UniqId))
-  }
-}
-
-// 左侧树结构点击
-const handleNodeClick = (node, check) => {
-  if (node.params) {
-    params.date = node.params.date
-    params.sys_id = node.params.sys_id
-    page.value = 1
-    handleCurrentChange()
-  }
-}
-
-// 搜索
-function handleSearch() {
-  params.sys_id = ''
-  params.date = ''
-  params.order = searchInfo.value
-  page.value = 1
-  handleCurrentChange()
-}
-
-// 分页
-const handleSizeChange = () => {
-  params.limit = limit.value.toString()
-  getTableData()
-}
-
-// 页面跳转
-const handleCurrentChange = () => {
-  params.page = page.value.toString()
-  getTableData()
-}
-
-// ============== 详情页面 ==============
-const detailData = reactive({})
-// const selectData = reactive([])
-const selectColumns = [
-  { label: '', prop: 'sczl_gxmc', width: '500' },
-  { label: '', prop: 'sczl_jtbh', width: '100' },
-  { label: '', prop: 'sczl_bzdh', width: '100' },
-  { label: '', prop: 'name', width: '100' },
-]
-let selecTreeData = []
-
-// 行为控制标记(弹窗内部需要增还是改)
-const type = ref('')
-
-// 弹窗控制标记
-const dialogFormVisible = ref(false)
-const dialogSelectVisible1 = ref(false)
-const dialogSelectVisible2 = ref(false)
-
-let selectIndex = 0
-
-const getDetailData = async(id) => {
-  try {
-    const res = await getOneWorkOrder({ UniqId: id })
-    if (res.code === 0) {
-      const obj = res.data
-      // 裁剪返回数据的前后空格
-      for (const key in obj) {
-        if (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === 'string') {
-          obj[key] = obj[key].trim()
-        }
-      }
-      // 修改日期格式
-      if (Object.prototype.hasOwnProperty.call(obj, 'qczl_rq') && typeof obj['qczl_rq'] === 'string') {
-        obj['qczl_rq'] = obj['qczl_rq'].split(' ')[0]
-      }
-
-      Object.assign(detailData, obj)
-      const table = []
-
-      // 循环13行数据
-      for (let i = 1; i <= 13; i++) {
-        table.push({
-          fp_lb: detailData[`fp_lb${i}`] || '',
-          fp_sl: detailData[`fp_sl${i}`] || '',
-          fp_gxmc: detailData[`fp_gxmc${i}`] || '',
-          fp_bz: detailData[`fp_bz${i}`] || '',
-          fp_bh: detailData[`fp_bh${i}`] || '',
-          fp_name: detailData[`fp_name${i}`] || '',
-        })
-        // 从原对象中删除这些属性
-        delete detailData[`fp_lb${i}`]
-        delete detailData[`fp_sl${i}`]
-        delete detailData[`fp_gxmc${i}`]
-        delete detailData[`fp_bz${i}`]
-        delete detailData[`fp_bh${i}`]
-        delete detailData[`fp_name${i}`]
-      }
-      detailData.table = table
-      try {
-        const res = await getOrderInfo({ order: detailData.qczl_gdbh })
-        if (res.code === 0) {
-          detailData.Gd_cpmc = res.data.Gd_cpmc
-          // dialogFormVisible.value = true	
-			showDialog()
-        }
-      } catch (e) {
-        console.log(e)
-      }
-    }
-  } catch (e) {
-    console.log(e)
-  }
-}
-
-// 工单编号回车
-const handleGdbhEnter = async() => {
-	if(detailData.qczl_gdbh!=''){
-		const res = await getOrderInfo({ order: detailData.qczl_gdbh })
+<template>
+	<div>
+		<el-container>
+			<!-- 左侧树形结构 -->
+			<el-scrollbar max-height="75vh">
+
+				<layout-sider :resize-directions="['right']" :width="220" style="margin-right: 50px;">
+					<div class="JKWTree-tree" style="height: 70vh;">
+						<h3>工单核验单维护</h3>
+						<el-tree :data="treeData" highlight-current @node-click="handleNodeClick" />
+					</div>
+				</layout-sider>
+			</el-scrollbar>
+
+			<el-container>
+				<el-main>
+					<div class="gva-table-box">
+						<!-- 按钮区域 -->
+						<div class="gva-btn-list">
+							<el-row :span="6">
+								<el-input v-model="searchInfo" placeholder="输入工单编号" />
+							</el-row>
+							<el-button type="primary" :icon="Search" class="bt" @click="handleSearch">搜索
+							</el-button>
+							<el-button type="primary" icon="copy-document" class="bt"
+								@click="dialogMrhjtj = true">每日核检统计
+							</el-button>
+							<el-button type="primary" icon="copy-document" class="bt" @click="showGdzjfptj">工单质检废品统计
+							</el-button>
+							<el-button type="primary" class="bt" icon="plus" @click="handleShowAdd">新增
+							</el-button>
+							<div style="margin-left: auto;">
+								<!-- <el-button
+                  type="primary"
+                  :icon="Download"
+				  class="bt"
+                  @click="exportExcel"
+                >导出到Excel</el-button> -->
+							</div>
+						</div>
+						<!-- 数据展示 -->
+						<el-table ref="table" style="width: 100%" :data="tableData" row-key="ID" highlight-current-row
+							border show-overflow-tooltip :row-style="{ height: '20px' }"
+							:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+							:header-cell-style="{ padding: '0px' }" @row-click="handleSelectChange"
+							@row-dblclick="doubleClick">
+							<el-table-column type="selection" width="55" />
+							<!-- 循环渲染表格列 -->
+							<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>
+
+					<!-- 弹出框 -->
+					<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type" destroy-on-close
+						width="1000px">
+
+						<el-form ref="elFormRef" :model="detailData" inline label-position="right" :rules="rule"
+							id="detail-form">
+							<el-row :gutter="30">
+								<el-col :span="5">
+									<el-form-item label="日期">
+										<el-date-picker v-model="detailData.qczl_rq" type="date"
+											style="width: 150px;" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="工单编号">
+										<el-input v-model="detailData.qczl_gdbh" style="width: 150px;"
+											@keyup.enter="handleGdbhEnter" placeholder="Enter回车" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="5">
+									<el-form-item label="拼印主工单">
+										<el-input v-model="detailData.qczl_Pygd" style="width: 150px;" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="6">
+									<el-form-item label="产品名称">
+										<el-input v-model="detailData.Gd_cpmc" style="width: 300px;" readonly />
+									</el-form-item>
+								</el-col>
+							</el-row>
+							<br>
+							<el-form-item label="印件号">
+								<el-input v-model="detailData.qczl_yjno" style="width: 60px;" />
+							</el-form-item>
+							<el-form-item label="印件名称" style="margin-left: 47px">
+								<el-input v-model="detailData.yj_yjmc" style="width: 500px;" />
+							</el-form-item>
+							<el-form-item label="废品总数">
+								<el-input v-model="detailData.qczl_fp" id="废品总数" style="width: 100px;" />
+							</el-form-item>
+							<br>
+
+							<el-form-item label="工序">
+								<el-input v-model="detailData.qczl_gxmc" style="width: 200px;"
+									@keyup.enter.native="getgxsubmit" />
+							</el-form-item>
+							<el-form-item label="工序号">
+								<el-input v-model="detailData.qczl_gxh" style="width: 100px;" />
+							</el-form-item>
+							<el-form-item label="总流程号">
+								<el-input v-model="detailData.total_liucheng" style="width: 100px;" />
+							</el-form-item>
+
+							<el-form-item label="流程单号">
+								<el-input v-model="detailData.qczl_num" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc1" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc2" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc3" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc4" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc5" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc6" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc7" style="width: 60px; margin-left: 5px;" />
+								<el-input v-model="detailData.qczl_NumDesc8" style="width: 60px; margin-left: 5px;" />
+							</el-form-item>
+
+							<el-form-item label="备注">
+								<el-input v-model="detailData.qczl_NumDesc" style="width: 200px;" />
+							</el-form-item>
+
+							<el-scrollbar height="400px">
+								<el-table :data="detailData.table" border tooltip-effect="dark"
+									:row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
+									:header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }">
+									<el-table-column label="废品类别" width="200">
+										<template #default="{ row, $index }">
+											<el-input v-model="row.fp_lb" @keyup.enter="handleFplbEnter($index, row)" />
+										</template>
+									</el-table-column>
+
+									<el-table-column label="数量" width="100">
+										<template #default="{ row, $index }">
+											<el-input v-model="row.fp_sl" @keyup.enter="handleFpslEnter($index, row)" />
+										</template>
+									</el-table-column>
+									<el-table-column label="工序及责任机长" width="500">
+										<template #default="{ row }">
+											<el-input v-model="row.fp_gxmc" />
+										</template>
+									</el-table-column>
+									<el-table-column label="" width="100">
+										<template #default="{ row }">
+											<el-input v-model="row.fp_bz" />
+										</template>
+									</el-table-column>
+									<el-table-column label="" width="100">
+										<template #default="{ row }">
+											<el-input v-model="row.fp_bh" />
+										</template>
+									</el-table-column>
+									<el-table-column label="" width="100">
+										<template #default="{ row }">
+											<el-input v-model="row.fp_name" />
+										</template>
+									</el-table-column>
+								</el-table>
+							</el-scrollbar>
+						</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="dialogSelectVisible1" title="选择" destroy-on-close width="600px">
+						<el-tree :data="selecTreeData" :props="defaultProps" highlight-current
+							@node-click="handleFplbClick" />
+					</el-dialog>
+
+					<!-- 弹出选项框 数量 -->
+					<el-dialog v-model="dialogSelectVisible2" title="选择" destroy-on-close width="800px"
+						@keydown="selectSL($event)">
+						<el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row border
+							style="width:100%" @row-dblclick="handleSelectClick" ref="table2">
+							<el-table-column v-for=" column in selectColumns " :key="column.prop" :prop="column.prop"
+								:label="column.label" :width="column.width" />
+						</el-table>
+					</el-dialog>
+
+					<!-- 弹出选项框 工单 -->
+					<el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="1000px"
+						@keydown="selectGX($event)">
+						<el-table tooltip-effect="dark" :data="selectData_gd" row-key="ID" highlight-current-row="true"
+							border style="width:100%" @row-dblclick="handleSelectClick_gd" ref="table_gd">
+							<el-table-column prop="Gd_cpmc" label="工单名称" width="430" />
+							<el-table-column prop="yj_Yjno" label="印件号" width="100" />
+							<el-table-column prop="yj_yjmc" label="印件名称" width="430" />
+						</el-table>
+					</el-dialog>
+					
+					<!-- 弹出选项框 工序 -->
+					<el-dialog v-model="GetjtbhVisible" title="选择" destroy-on-close width="600px">
+						<el-table tooltip-effect="dark" :data="JTBHselectData" row-key="ID" highlight-current-row="true"
+							border style="width:100%" @row-dblclick="JTBHSelectClick">
+							<el-table-column prop="gxh" label="工序号" width="70" />
+							<el-table-column prop="gxmc" label="工序名称" width="150" />
+							<el-table-column prop="addGxmc" label="工序名称" width="150" />
+						</el-table>
+					</el-dialog>
+
+					<!-- 废品日统计 -->
+					<Meirihejiantongji v-if="dialogMrhjtj" v-model="dialogMrhjtj" />
+
+					<!-- 工单质检废品统计 -->
+					<Gongdanzhijianfeipintongji v-if="dialogGdzjfptj" v-model="dialogGdzjfptj" :val="value1" />
+
+					<!-- 测试图表 -->
+					<Shebeizhuangtai v-if="dialogSbyxgl" v-model="dialogSbyxgl"
+						title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】" />
+
+				</el-main>
+			</el-container>
+		</el-container>
+
+	</div>
+</template>
+
+<script setup>
+	import {
+		createCompany,
+		deleteCompany,
+		deleteCompanyByIds,
+		updateCompany,
+		findCompany,
+		getCompanyList
+	} from '@/api/company'
+
+	// 全量引入格式化工具 请按需保留
+	import {
+		ElMessage
+	} from 'element-plus'
+	import {
+		Search,
+		Refresh,
+		Download
+	} from '@element-plus/icons-vue'
+	import {
+		ref,
+		reactive
+	} from 'vue'
+	import {
+		getSide,
+		getTable,
+		getOneWorkOrder,
+		getOrderInfo,
+		getGxAndLeader,
+		getYjInfo,
+		getWastInfo,
+		updateData,
+		add
+	} from '@/api/mes_api_gty/workOrderVerification'
+	import Meirihejiantongji from '@/view/performance/09-workOrderVerification/componets/meirihejiantongji.vue'
+	import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
+	import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
+	import {
+		Layout,
+		LayoutContent,
+		LayoutHeader,
+		LayoutSider
+	} from '@arco-design/web-vue'
+	import {
+		useUserStore
+	} from '@/pinia/modules/user'
+	const userStore = useUserStore()
+	const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
+	defineOptions({
+		name: '06PackingDocuments'
+	})
+
+	// 侧边栏数据请求
+	const treeData = reactive([])
+	const getSideData = async () => {
+		const response = await getSide()
+		if (response.code === 0) {
+			const transformedData = response.data.map(item => ({
+				label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
+				children: item.sys.map(sysItem => ({
+					label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
+					params: {
+						date: item.date.replace(/\./g, '-'),
+						sys_id: sysItem.sys_id,
+					},
+				})),
+			}))
+			treeData.splice(0, treeData.length, ...transformedData)
+		}
+	}
+
+	getSideData()
+
+	// 验证规则
+	const rule = reactive({})
+
+	const elFormRef = ref()
+	const elSearchFormRef = ref()
+
+	// =========== 表格控制部分 ===========
+	const tableColumns = [{
+			label: '工单编号',
+			prop: 'qczl_gdbh',
+			width: '120'
+		},
+		{
+			label: '印件号',
+			prop: 'qczl_yjno',
+			width: '100'
+		},
+		{
+			label: '印件名称',
+			prop: 'Gd_cpmc',
+			width: '400'
+		},
+		{
+			label: '日期',
+			prop: 'qczl_rq',
+			width: '100'
+		},
+		{
+			label: '流程单号',
+			prop: 'qczl_num',
+			width: '120'
+		},
+		{
+			label: '流程单备注',
+			prop: 'qczl_NumDesc',
+			width: '120'
+		},
+		{
+			label: '总废品',
+			prop: 'qczl_fp',
+			width: '100'
+		},
+		{
+			label: '废品1',
+			prop: 'sl_lb1',
+			width: '250'
+		},
+		{
+			label: '废品2',
+			prop: 'sl_lb2',
+			width: '250'
+		},
+		{
+			label: '废品3',
+			prop: 'sl_lb3',
+			width: '250'
+		},
+		{
+			label: '废品4',
+			prop: 'sl_lb4',
+			width: '250'
+		},
+		{
+			label: '废品5',
+			prop: 'sl_lb5',
+			width: '250'
+		},
+		{
+			label: '废品6',
+			prop: 'sl_lb6',
+			width: '250'
+		},
+		{
+			label: '废品7',
+			prop: 'sl_lb7',
+			width: '250'
+		},
+		{
+			label: '废品8',
+			prop: 'sl_lb8',
+			width: '250'
+		},
+		{
+			label: '废品9',
+			prop: 'sl_lb9',
+			width: '250'
+		},
+		{
+			label: '废品10',
+			prop: 'sl_lb10',
+			width: '250'
+		},
+		{
+			label: '废品11',
+			prop: 'sl_lb11',
+			width: '250'
+		},
+		{
+			label: '废品12',
+			prop: 'sl_lb12',
+			width: '250'
+		},
+		{
+			label: '废品13',
+			prop: 'sl_lb13',
+			width: '250'
+		},
+		{
+			label: '废品14',
+			prop: 'sl_lb14',
+			width: '250'
+		},
+		{
+			label: '废品15',
+			prop: 'sl_lb15',
+			width: '250'
+		},
+		{
+			label: '废品16',
+			prop: 'sl_lb16',
+			width: '250'
+		},
+		{
+			label: '废品17',
+			prop: 'sl_lb17',
+			width: '250'
+		},
+		{
+			label: '创建用户',
+			prop: 'sys_id',
+			width: '200'
+		}
+	]
+	const tableData = reactive([])
+	const GetjtbhVisible = ref(false)
+	const total = ref(0)
+	const page = ref(1)
+	const limit = ref(10)
+	const JTBHselectData = reactive([])
+	const searchInfo = ref('')
+	const params = {
+		date: '',
+		sys_id: '',
+		order: '',
+		page: page.value.toString(),
+		limit: limit.value.toString(),
+	}
+	// 获取工序
+	const getgxsubmit = () => {
+		GetJtbh()
+	}
+	const GetJtbh = async () => {
+		try {
+			const {
+				qczl_gdbh,
+				qczl_yjno
+			} = detailData
+			const response = await getYjInfo({
+				order: qczl_gdbh,
+				yj_no: qczl_yjno
+			})
+			if (response.code === 0) {
+				const data = response.data
+				if (data) {
+					const tableData = data.gx_data.map(item => ({
+						gxh: item.Gy0_gxh,
+						gxmc: item.Gy0_gxmc + (item.Add_gxmc === '' ? '' : '-' + item.Add_gxmc),
+						// addGxmc: item.Add_gxmc
+					}))
+					console.log(tableData)
+					JTBHselectData.splice(0, JTBHselectData.length, ...tableData)
+					GetjtbhVisible.value = true
+					// Now you can use the tableData to populate your table
+				} else {
+					console.log('No data found')
+				}
+			} else {
+				console.log('Error: ', response.msg)
+			}
+		} catch (error) {
+			console.error('Error fetching data: ', error)
+		}
+	}
+	const JTBHSelectClick = (row, column, event) => {
+		const {
+			gxh,
+			gxmc
+		} = row
+		detailData.qczl_gxmc = gxh + '-' + gxmc
+		detailData.qczl_gxh = gxh
+		GetjtbhVisible.value = false
+	}
+	// 批量删除控制标记
+	const deleteVisible = ref(false)
+	const multipleSelection = ref([])
+	const minUniqId = ref('')
+	const getTableData = async () => {
+		const response = await getTable(params)
+		if (response.code === 0) {
+			total.value = response.data.total
+			// Object.assign(tableData, response.data.rows)
+
+			tableData.splice(0, tableData.length, ...response.data.rows)
+			minUniqId.value = Math.min(...tableData.map(row => row.UniqId))
+		}
+	}
+
+	// 左侧树结构点击
+	const handleNodeClick = (node, check) => {
+		if (node.params) {
+			params.date = node.params.date
+			params.sys_id = node.params.sys_id
+			page.value = 1
+			handleCurrentChange()
+		}
+	}
+
+	// 搜索
+	function handleSearch() {
+		params.sys_id = ''
+		params.date = ''
+		params.order = searchInfo.value
+		page.value = 1
+		handleCurrentChange()
+	}
+
+	// 分页
+	const handleSizeChange = () => {
+		params.limit = limit.value.toString()
+		getTableData()
+	}
+
+	// 页面跳转
+	const handleCurrentChange = () => {
+		params.page = page.value.toString()
+		getTableData()
+	}
+
+	// ============== 详情页面 ==============
+	const detailData = reactive({})
+	// const selectData = reactive([])
+	const selectColumns = [{
+			label: '',
+			prop: 'sczl_gxmc',
+			width: '500'
+		},
+		{
+			label: '',
+			prop: 'sczl_jtbh',
+			width: '100'
+		},
+		{
+			label: '',
+			prop: 'sczl_bzdh',
+			width: '100'
+		},
+		{
+			label: '',
+			prop: 'name',
+			width: '100'
+		},
+	]
+	let selecTreeData = []
+
+	// 行为控制标记(弹窗内部需要增还是改)
+	const type = ref('')
+
+	// 弹窗控制标记
+	const dialogFormVisible = ref(false)
+	const dialogSelectVisible1 = ref(false)
+	const dialogSelectVisible2 = ref(false)
+
+	let selectIndex = 0
+
+	const getDetailData = async (id) => {
+		try {
+			const res = await getOneWorkOrder({
+				UniqId: id
+			})
+			if (res.code === 0) {
+				const obj = res.data
+				// 裁剪返回数据的前后空格
+				for (const key in obj) {
+					if (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === 'string') {
+						obj[key] = obj[key].trim()
+					}
+				}
+				// 修改日期格式
+				if (Object.prototype.hasOwnProperty.call(obj, 'qczl_rq') && typeof obj['qczl_rq'] === 'string') {
+					obj['qczl_rq'] = obj['qczl_rq'].split(' ')[0]
+				}
+
+				Object.assign(detailData, obj)
+				const table = []
+
+				// 循环13行数据
+				for (let i = 1; i <= 13; i++) {
+					table.push({
+						fp_lb: detailData[`fp_lb${i}`] || '',
+						fp_sl: detailData[`fp_sl${i}`] || '',
+						fp_gxmc: detailData[`fp_gxmc${i}`] || '',
+						fp_bz: detailData[`fp_bz${i}`] || '',
+						fp_bh: detailData[`fp_bh${i}`] || '',
+						fp_name: detailData[`fp_name${i}`] || '',
+					})
+					// 从原对象中删除这些属性
+					delete detailData[`fp_lb${i}`]
+					delete detailData[`fp_sl${i}`]
+					delete detailData[`fp_gxmc${i}`]
+					delete detailData[`fp_bz${i}`]
+					delete detailData[`fp_bh${i}`]
+					delete detailData[`fp_name${i}`]
+				}
+				detailData.table = table
+				try {
+					const res = await getOrderInfo({
+						order: detailData.qczl_gdbh
+					})
+					if (res.code === 0) {
+						detailData.Gd_cpmc = res.data.Gd_cpmc
+						// dialogFormVisible.value = true	
+						showDialog()
+					}
+				} catch (e) {
+					console.log(e)
+				}
+			}
+		} catch (e) {
+			console.log(e)
+		}
+	}
+
+	// 工单编号回车
+	const handleGdbhEnter = async () => {
+		if (detailData.qczl_gdbh != '') {
+			const res = await getOrderInfo({
+				order: detailData.qczl_gdbh
+			})
+			if (res.code === 0) {
+				if (res.data.length == 0) {
+					ElMessage({
+						type: 'error',
+						message: '查无此编号的工单,请仔细检查后重新输入'
+					})
+					//设置输入框的值为空
+					detailData.Gd_cpmc = ''
+					detailData.qczl_yjno = ''
+					detailData.yj_yjmc = ''
+				} else if (res.data.length == 1) {
+					detailData.Gd_cpmc = res.data[0]['Gd_cpmc']
+					detailData.qczl_yjno = res.data[0]['yj_Yjno']
+					detailData.yj_yjmc = res.data[0]['yj_yjmc']
+				} else if (res.data.length > 1) {
+					document.getElementById('废品总数').focus()
+					selectData_gd.splice(0, selectData_gd.length, ...res.data)
+					setGXCurrent(selectData_gd[0])
+					dialogSelectVisible.value = true
+				}
+
+			}
+		} else {
+			detailData.Gd_cpmc = ''
+			detailData.qczl_yjno = ''
+			detailData.yj_yjmc = ''
+		}
+
+	}
+	const dialogSelectVisible = ref(false)
+	const selectData_gd = reactive([])
+	// 处理选择框
+	const handleSelectClick_gd = (row, column, event) => {
+		detailData.Gd_cpmc = row.Gd_cpmc
+		detailData.qczl_yjno = row.yj_Yjno
+		detailData.yj_yjmc = row.yj_yjmc
+		dialogSelectVisible.value = false
+	}
+	const currentIndex = ref(0);
+	const GXCurrent = ref(0);
+	const selectGX = (event) => {
+		if (event.keyCode === 40) { // 向下箭头
+			if (currentIndex.value < selectData_gd.length - 1) {
+				currentIndex.value++;
+				setGXCurrent(selectData_gd[currentIndex.value]);
+			} else {
+				currentIndex.value = 0;
+				setGXCurrent(selectData_gd[currentIndex.value]); // 到达最后一行时回到第一行			
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (currentIndex.value > 0) {
+				currentIndex.value--;
+				setGXCurrent(selectData_gd[currentIndex.value]);
+			} else {
+				currentIndex.value = selectData_gd.length - 1;
+				setGXCurrent(selectData_gd[currentIndex.value]); // 到达第一行时回到最后一行
+			}
+		} else if (event.keyCode === 13) { // 回车键
+			dialogSelectVisible.value = false;
+		}
+	}
+	const table_gd = ref()
+	const setGXCurrent = (row) => {
+		setTimeout(() => {
+			table_gd.value?.setCurrentRow(row)
+			detailData.Gd_cpmc = row.Gd_cpmc
+			detailData.qczl_yjno = row.yj_Yjno
+			detailData.yj_yjmc = row.yj_yjmc
+		})
+	}
+
+	// 废品类别回车
+	const handleFplbEnter = async (index, row) => {
+		let res
+		try {
+			res = await getWastInfo({
+				search: row.fp_lb
+			})
+			if (res.code !== 0) {
+				return
+			}
+		} catch (e) {
+			console.log(e)
+			return
+		}
+
+		const obj = res.data
+		const treeData = []
+		for (const category in obj) {
+			if (Object.prototype.hasOwnProperty.call(obj, category)) {
+				const children = []
+
+				for (const subCategory in obj[category]) {
+					if (Object.prototype.hasOwnProperty.call(obj[category], subCategory)) {
+						const subChildren = obj[category][subCategory].map(item => {
+							return {
+								label: item
+							}
+						})
+
+						children.push({
+							label: subCategory,
+							children: subChildren
+						})
+					}
+				}
+
+				treeData.push({
+					label: category,
+					children: children
+				})
+			}
+		}
+		selecTreeData = treeData
+		selectIndex = index
+		dialogSelectVisible1.value = true
+	}
+
+	const handleFplbClick = (node, check) => {
+		if (!node.children) {
+			detailData.table[selectIndex].fp_lb = node.label
+			dialogSelectVisible1.value = false
+		}
+	}
+
+	let selectData = [] // 将const改为let
+
+	const handleFpslEnter = async (index, row) => {
+		if (row.fp_sl === '0') {
+			detailData.table[index].fp_gxmc = ''
+			detailData.table[index].fp_bz = ''
+			detailData.table[index].fp_bh = ''
+			detailData.table[index].fp_name = ''
+			return
+		}
+
+		const params = {
+			type: row.fp_lb,
+			order: detailData.qczl_gdbh,
+		}
+		let res
+		try {
+			res = await getGxAndLeader(params)
+			if (res.code !== 0) {
+				return
+			}
+		} catch (e) {
+			console.log(e)
+			return
+		}
+
+		// 解译乱码并填充到selectData
+		const decodedData = res.data.map(item => {
+			return {
+				sczl_gxmc: decodeEntities(item.sczl_gxmc), // 解译乱码函数
+				sczl_bzdh: item.sczl_bzdh,
+				sczl_jtbbh: item.sczl_jtbh,
+				sczl_bh1: item.sczl_bh1,
+				name: item.name.trim() // 去除姓名两端的空格
+			}
+		})
+
+		selectData = decodedData // 对selectData进行赋值
+
+		setCurrent(selectData[0])
+		dialogSelectVisible2.value = true
+	}
+
+	// 解译HTML实体编码的函数
+	function decodeEntities(encodedString) {
+		const textArea = document.createElement('textarea')
+		textArea.innerHTML = encodedString
+		return textArea.value
+	}
+	// 双击表格操作
+	function doubleClick(row, column, event) {
+		type.value = '查改'
+		getDetailData(row.UniqId)
+	}
+
+	// 处理选择框回车操作
+	const handleSelectClick = (row, column, event) => {
+		const {
+			sczl_gxmc,
+			sczl_bzdh,
+			sczl_bh1,
+			name
+		} = row
+		const index = selectIndex
+		detailData.table[index].fp_gxmc = sczl_gxmc
+		detailData.table[index].fp_bz = sczl_bzdh
+		detailData.table[index].fp_bh = sczl_bh1
+		detailData.table[index].fp_name = name
+		dialogSelectVisible2.value = false
+	}
+	const table2 = ref()
+	const setCurrent = (row) => {
+		setTimeout(() => {
+			table2.value?.setCurrentRow(row)
+			// SelectClick(row)
+			// console.log(row)
+			// console.log(table)
+			const {
+				sczl_gxmc,
+				sczl_bzdh,
+				sczl_bh1,
+				name
+			} = row
+			const index = selectIndex
+			detailData.table[index].fp_gxmc = sczl_gxmc
+			detailData.table[index].fp_bz = sczl_bzdh
+			detailData.table[index].fp_bh = sczl_bh1
+			detailData.table[index].fp_name = name
+		})
+	}
+	const SLIndex = ref(0);
+	const JYCurrent = ref(0);
+	const selectSL = (event) => {
+		if (event.keyCode === 40) { // 向下箭头
+			if (SLIndex.value < selectData.length - 1) {
+				SLIndex.value++;
+				setCurrent(selectData[SLIndex.value]);
+			} else {
+				SLIndex.value = 0;
+				setCurrent(selectData[SLIndex.value]); // 到达最后一行时回到第一行			
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (SLIndex.value > 0) {
+				SLIndex.value--;
+				setCurrent(selectData[SLIndex.value]);
+			} else {
+				SLIndex.value = selectData.length - 1;
+				setCurrent(selectData[SLIndex.value]); // 到达第一行时回到最后一行
+			}
+		} else if (event.keyCode === 13) { // 回车键
+			dialogSelectVisible2.value = false
+		}
+	}
+	// 弹窗确定
+	const enterDialog = async () => {
+		if (type.value === '查改') {
+			updateDetailData()
+		} else if (type.value === '新增') {
+			addDetailData()
+		}
+	}
+	const addDetailData = async () => {
+		const formatDate = (date) => {
+			const year = date.getFullYear();
+			const month = String(date.getMonth() + 1).padStart(2, '0');
+			const day = String(date.getDate()).padStart(2, '0');
+			return `${year}-${month}-${day}`;
+		};
+
+		const restoredData = {
+			UniqId: detailData.UniqId,
+			qczl_gdbh: detailData.qczl_gdbh,
+			qczl_yjno: detailData.qczl_yjno,
+			qczl_gxh: detailData.qczl_gxh,
+			qczl_gxmc: detailData.qczl_gxmc,
+			qczl_rq: formatDate(new Date(detailData.qczl_rq)),
+			qczl_fp: detailData.qczl_fp,
+			qczl_num: detailData.qczl_num,
+			qczl_NumDesc: detailData.qczl_NumDesc,
+			qczl_NumDesc1: detailData.qczl_NumDesc1,
+			qczl_NumDesc2: detailData.qczl_NumDesc2,
+			qczl_NumDesc3: detailData.qczl_NumDesc3,
+			qczl_NumDesc4: detailData.qczl_NumDesc4,
+			qczl_NumDesc5: detailData.qczl_NumDesc5,
+			qczl_NumDesc6: detailData.qczl_NumDesc6,
+			qczl_NumDesc7: detailData.qczl_NumDesc7,
+			qczl_NumDesc8: detailData.qczl_NumDesc8,
+			sys_id: sys_id
+		};
+
+		detailData.table.forEach((item, index) => {
+			const num = index + 1;
+			restoredData[`fp_lb${num}`] = item.fp_lb;
+			restoredData[`fp_sl${num}`] = item.fp_sl;
+			restoredData[`fp_bh${num}`] = item.fp_bh;
+			restoredData[`fp_bz${num}`] = item.fp_bz;
+			restoredData[`fp_gxmc${num}`] = item.fp_gxmc;
+		});
+
+		console.log(restoredData);
+		const res = await add(restoredData)
+		console.log(res)
+
+		if (res.code === 0) {
+			ElMessage({
+				type: 'success',
+				message: '新增成功',
+			})
+			//刷新
+			if (params.date != '') {
+				getTableData()
+			}
+			getSideData()
+			dialogFormVisible.value = false
+		}
+	};
+	// 修改
+	const updateDetailData = async () => {
+
+		const formatDate = (date) => {
+			const year = date.getFullYear();
+			const month = String(date.getMonth() + 1).padStart(2, '0');
+			const day = String(date.getDate()).padStart(2, '0');
+			return `${year}-${month}-${day}`;
+		};
+
+		const restoredData = {
+			UniqId: detailData.UniqId,
+			qczl_gdbh: detailData.qczl_gdbh,
+			qczl_yjno: detailData.qczl_yjno,
+			qczl_gxh: detailData.qczl_gxh,
+			qczl_gxmc: detailData.qczl_gxmc,
+			qczl_rq: formatDate(new Date(detailData.qczl_rq)),
+			qczl_fp: detailData.qczl_fp,
+			qczl_num: detailData.qczl_num,
+			qczl_NumDesc: detailData.qczl_NumDesc,
+			qczl_NumDesc1: detailData.qczl_NumDesc1,
+			qczl_NumDesc2: detailData.qczl_NumDesc2,
+			qczl_NumDesc3: detailData.qczl_NumDesc3,
+			qczl_NumDesc4: detailData.qczl_NumDesc4,
+			qczl_NumDesc5: detailData.qczl_NumDesc5,
+			qczl_NumDesc6: detailData.qczl_NumDesc6,
+			qczl_NumDesc7: detailData.qczl_NumDesc7,
+			qczl_NumDesc8: detailData.qczl_NumDesc8,
+		}
+		detailData.table.forEach((item, index) => {
+			const num = index + 1
+			restoredData[`fp_lb${num}`] = item.fp_lb
+			restoredData[`fp_sl${num}`] = item.fp_sl
+			restoredData[`fp_bh${num}`] = item.fp_bh
+			restoredData[`fp_bz${num}`] = item.fp_bz
+			restoredData[`fp_gxmc${num}`] = item.fp_gxmc
+		})
+		const res = await updateData(restoredData)
 		if (res.code === 0) {
-			  if(res.data.length==0){
-			    ElMessage({
-					type: 'error',
-					message: '查无此编号的工单,请仔细检查后重新输入'
-			    })
-			    //设置输入框的值为空
-			    detailData.Gd_cpmc = ''
-			    detailData.qczl_yjno = ''
-			    detailData.yj_yjmc = ''
-			  }else if(res.data.length==1){
-				  detailData.Gd_cpmc = res.data[0]['Gd_cpmc']
-				  detailData.qczl_yjno = res.data[0]['yj_Yjno']
-				  detailData.yj_yjmc = res.data[0]['yj_yjmc']
-			  }else if(res.data.length>1){
-				  document.getElementById('废品总数').focus()
-				  selectData_gd.splice(0, selectData_gd.length, ...res.data)
-				  setGXCurrent(selectData_gd[0])
-				  dialogSelectVisible.value=true
-			  }
-		  
+			ElMessage({
+				type: 'success',
+				message: res.msg,
+			})
+			dialogFormVisible.value = false
+		}
+	}
+
+	// 多选
+	const handleSelectionChange = (val) => {
+		multipleSelection.value = val
+	}
+
+	// 多选删除
+	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 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
+			showDialog()
+		}
+	}
+
+	// 关闭弹窗
+	const closeDialog = () => {
+		dialogFormVisible.value = false
+	}
+
+	// 导出excel
+	function exportExcel() {
+		console.log('导出到excel')
+		// dialogSbyxgl.value = true
+	}
+
+	const dialogMrhjtj = ref(false)
+	const dialogGdzjfptj = ref(false)
+	const dialogSbyxgl = ref(false)
+	const value1 = ref('')
+	const table = ref(null)
+
+	const showGdzjfptj = () => {
+		value1.value = currentRow.value?.qczl_gdbh
+		dialogGdzjfptj.value = true
+	}
+	const currentRow = ref()
+	const handleSelectChange = (row, column, event) => {
+		currentRow.value = row.UniqId
+	}
+
+	// 新增数据
+	const handleShowAdd = async () => {
+		type.value = '新增'
+		if (minUniqId.value == '') {
+			console.log('123')
+			// 循环13行数据
+			const table = []
+			for (let i = 1; i <= 13; i++) {
+				table.push({
+					fp_lb: '',
+					fp_sl: '',
+					fp_gxmc: '',
+					fp_bz: '',
+					fp_bh: '',
+					fp_name: '',
+				})
+			}
+			detailData.table = table
+			dialogFormVisible.value = true
+		} else {
+			getDetailData(minUniqId.value)
 		}
-	}else{
-		detailData.Gd_cpmc = ''
-		detailData.qczl_yjno = ''
-		detailData.yj_yjmc = ''
-	}
-  
-}
-const dialogSelectVisible = ref(false)
-const selectData_gd = reactive([])
-// 处理选择框
-const handleSelectClick_gd = (row, column, event) => {
-  detailData.Gd_cpmc = row.Gd_cpmc
-  detailData.qczl_yjno = row.yj_Yjno
-  detailData.yj_yjmc = row.yj_yjmc
-  dialogSelectVisible.value = false
-}
-const currentIndex = ref(0);
-const GXCurrent = ref(0);
-const selectGX = (event) => {
-    if (event.keyCode === 40) { // 向下箭头
-        if (currentIndex.value < selectData_gd.length - 1) {
-            currentIndex.value++;
-            setGXCurrent(selectData_gd[currentIndex.value]);
-        } else {
-            currentIndex.value = 0;
-            setGXCurrent(selectData_gd[currentIndex.value]); // 到达最后一行时回到第一行			
-        }
-    } else if (event.keyCode === 38) { // 向上箭头
-        if (currentIndex.value > 0) {
-            currentIndex.value--;
-            setGXCurrent(selectData_gd[currentIndex.value]);
-        } else {
-            currentIndex.value = selectData_gd.length - 1;
-            setGXCurrent(selectData_gd[currentIndex.value]); // 到达第一行时回到最后一行
-        }
-    } else if (event.keyCode === 13) { // 回车键
-        dialogSelectVisible.value = false;
-    }
-}
-const table_gd = ref()
-const setGXCurrent = (row) => {
-  setTimeout(()=>{
-	  table_gd.value?.setCurrentRow(row) 
-	  detailData.Gd_cpmc = row.Gd_cpmc
-	  detailData.qczl_yjno = row.yj_Yjno
-	  detailData.yj_yjmc = row.yj_yjmc
-  })
-}
-
-// 废品类别回车
-const handleFplbEnter = async(index, row) => {
-  let res
-  try {
-    res = await getWastInfo({ search: row.fp_lb })
-    if (res.code !== 0) {
-      return
-    }
-  } catch (e) {
-    console.log(e)
-    return
-  }
-
-  const obj = res.data
-  const treeData = []
-  for (const category in obj) {
-    if (Object.prototype.hasOwnProperty.call(obj, category)) {
-      const children = []
-
-      for (const subCategory in obj[category]) {
-        if (Object.prototype.hasOwnProperty.call(obj[category], subCategory)) {
-          const subChildren = obj[category][subCategory].map(item => {
-            return { label: item }
-          })
-
-          children.push({
-            label: subCategory,
-            children: subChildren
-          })
-        }
-      }
-
-      treeData.push({
-        label: category,
-        children: children
-      })
-    }
-  }
-  selecTreeData = treeData
-  selectIndex = index
-  dialogSelectVisible1.value = true
-}
-
-const handleFplbClick = (node, check) => {
-  if (!node.children) {
-    detailData.table[selectIndex].fp_lb = node.label
-    dialogSelectVisible1.value = false
-  }
-}
-
-let selectData = [] // 将const改为let
-
-const handleFpslEnter = async (index, row) => {
-  if (row.fp_sl === '0') {
-    detailData.table[index].fp_gxmc = ''
-    detailData.table[index].fp_bz = ''
-    detailData.table[index].fp_bh = ''
-    detailData.table[index].fp_name = ''
-    return
-  }
-
-  const params = {
-    type: row.fp_lb,
-    order: detailData.qczl_gdbh,
-  }
-  let res
-  try {
-    res = await getGxAndLeader(params)
-    if (res.code !== 0) {
-      return
-    }
-  } catch (e) {
-    console.log(e)
-    return
-  }
-
-  // 解译乱码并填充到selectData
-  const decodedData = res.data.map(item => {
-    return {
-      sczl_gxmc: decodeEntities(item.sczl_gxmc), // 解译乱码函数
-      sczl_bzdh: item.sczl_bzdh,
-      sczl_jtbbh: item.sczl_jtbh,
-      sczl_bh1: item.sczl_bh1,
-      name: item.name.trim() // 去除姓名两端的空格
-    }
-  })
-
-  selectData = decodedData // 对selectData进行赋值
-
-  setCurrent(selectData[0])
-  dialogSelectVisible2.value = true
-}
-
-// 解译HTML实体编码的函数
-function decodeEntities(encodedString) {
-  const textArea = document.createElement('textarea')
-  textArea.innerHTML = encodedString
-  return textArea.value
-}
-// 双击表格操作
-function doubleClick(row, column, event) {
-  type.value = '查改'
-  getDetailData(row.UniqId)
-}
-
-// 处理选择框回车操作
-const handleSelectClick = (row, column, event) => {
-  const { sczl_gxmc, sczl_bzdh, sczl_bh1, name } = row
-  const index = selectIndex
-  detailData.table[index].fp_gxmc = sczl_gxmc
-  detailData.table[index].fp_bz = sczl_bzdh
-  detailData.table[index].fp_bh = sczl_bh1
-  detailData.table[index].fp_name = name
-  dialogSelectVisible2.value = false
-}
-const table2 = ref()
-const setCurrent = (row) => {
-  setTimeout(()=>{
-	  table2.value?.setCurrentRow(row)
-	  // SelectClick(row)
-	  // console.log(row)
-	  // console.log(table)
-	  const { sczl_gxmc, sczl_bzdh, sczl_bh1, name } = row
-	  const index = selectIndex
-	  detailData.table[index].fp_gxmc = sczl_gxmc
-	  detailData.table[index].fp_bz = sczl_bzdh
-	  detailData.table[index].fp_bh = sczl_bh1
-	  detailData.table[index].fp_name = name
-  })
-}
-const SLIndex = ref(0);
-const JYCurrent = ref(0);
-const selectSL = (event) => {
-    if (event.keyCode === 40) { // 向下箭头
-        if (SLIndex.value < selectData.length - 1) {
-            SLIndex.value++;
-            setCurrent(selectData[SLIndex.value]);
-        } else {
-            SLIndex.value = 0;
-            setCurrent(selectData[SLIndex.value]); // 到达最后一行时回到第一行			
-        }
-    } else if (event.keyCode === 38) { // 向上箭头
-        if (SLIndex.value > 0) {
-            SLIndex.value--;
-            setCurrent(selectData[SLIndex.value]);
-        } else {
-            SLIndex.value = selectData.length - 1;
-            setCurrent(selectData[SLIndex.value]); // 到达第一行时回到最后一行
-        }
-    } else if (event.keyCode === 13) { // 回车键
-        dialogSelectVisible2.value = false
-    }
-}
-// 弹窗确定
-const enterDialog = async() => {
-  if (type.value === '查改') {
-	  updateDetailData()
-  } else if (type.value === '新增') {
-	  addDetailData()
-  }
-}
-const addDetailData = async () => {
-  const formatDate = (date) => {
-    const year = date.getFullYear();
-    const month = String(date.getMonth() + 1).padStart(2, '0');
-    const day = String(date.getDate()).padStart(2, '0');
-    return `${year}-${month}-${day}`;
-  };
-
-  const restoredData = {
-    UniqId: detailData.UniqId,
-    qczl_gdbh: detailData.qczl_gdbh,
-    qczl_yjno: detailData.qczl_yjno,
-    qczl_gxh: detailData.qczl_gxh,
-    qczl_gxmc: detailData.qczl_gxmc,
-    qczl_rq: formatDate(new Date(detailData.qczl_rq)),
-    qczl_fp: detailData.qczl_fp,
-    qczl_num: detailData.qczl_num,
-    qczl_NumDesc: detailData.qczl_NumDesc,
-    qczl_NumDesc1: detailData.qczl_NumDesc1,
-    qczl_NumDesc2: detailData.qczl_NumDesc2,
-    qczl_NumDesc3: detailData.qczl_NumDesc3,
-    qczl_NumDesc4: detailData.qczl_NumDesc4,
-    qczl_NumDesc5: detailData.qczl_NumDesc5,
-    qczl_NumDesc6: detailData.qczl_NumDesc6,
-    qczl_NumDesc7: detailData.qczl_NumDesc7,
-    qczl_NumDesc8: detailData.qczl_NumDesc8,
-    sys_id: sys_id
-  };
-
-  detailData.table.forEach((item, index) => {
-    const num = index + 1;
-    restoredData[`fp_lb${num}`] = item.fp_lb;
-    restoredData[`fp_sl${num}`] = item.fp_sl;
-    restoredData[`fp_bh${num}`] = item.fp_bh;
-    restoredData[`fp_bz${num}`] = item.fp_bz;
-    restoredData[`fp_gxmc${num}`] = item.fp_gxmc;
-  });
-
-  console.log(restoredData);
-  const res = await add(restoredData)
-  console.log(res)
-
-  if (res.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '新增成功',
-    })
-	//刷新
-	if(params.date!=''){
-	  getTableData()
-	}
-	getSideData()
-    dialogFormVisible.value = false
-  }
-};
-// 修改
-const updateDetailData = async() => {
-	
-	const formatDate = (date) => {
-	  const year = date.getFullYear();
-	  const month = String(date.getMonth() + 1).padStart(2, '0');
-	  const day = String(date.getDate()).padStart(2, '0');
-	  return `${year}-${month}-${day}`;
-	};
-	
-  const restoredData = {
-	  UniqId: detailData.UniqId,
-	  qczl_gdbh: detailData.qczl_gdbh,
-	  qczl_yjno: detailData.qczl_yjno,
-	  qczl_gxh: detailData.qczl_gxh,
-	  qczl_gxmc: detailData.qczl_gxmc,
-	  qczl_rq: formatDate(new Date(detailData.qczl_rq)),
-	  qczl_fp: detailData.qczl_fp,
-	  qczl_num: detailData.qczl_num,
-	  qczl_NumDesc: detailData.qczl_NumDesc,
-	  qczl_NumDesc1: detailData.qczl_NumDesc1,
-	  qczl_NumDesc2: detailData.qczl_NumDesc2,
-	  qczl_NumDesc3: detailData.qczl_NumDesc3,
-	  qczl_NumDesc4: detailData.qczl_NumDesc4,
-	  qczl_NumDesc5: detailData.qczl_NumDesc5,
-	  qczl_NumDesc6: detailData.qczl_NumDesc6,
-	  qczl_NumDesc7: detailData.qczl_NumDesc7,
-	  qczl_NumDesc8: detailData.qczl_NumDesc8,
-  }
-  detailData.table.forEach((item, index) => {
-	  const num = index + 1
-	  restoredData[`fp_lb${num}`] = item.fp_lb
-	  restoredData[`fp_sl${num}`] = item.fp_sl
-	  restoredData[`fp_bh${num}`] = item.fp_bh
-	  restoredData[`fp_bz${num}`] = item.fp_bz
-	  restoredData[`fp_gxmc${num}`] = item.fp_gxmc
-  })
-  const res = await updateData(restoredData)
-  if (res.code === 0) {
-	  ElMessage({
-	    type: 'success',
-	    message: res.msg,
-	  })
-	  dialogFormVisible.value = false
-  }
-}
-
-// 多选
-const handleSelectionChange = (val) => {
-  multipleSelection.value = val
-}
-
-// 多选删除
-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 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
-	showDialog()
-  }
-}
-
-// 关闭弹窗
-const closeDialog = () => {
-  dialogFormVisible.value = false
-}
-
-// 导出excel
-function exportExcel() {
-  console.log('导出到excel')
-  // dialogSbyxgl.value = true
-}
-
-const dialogMrhjtj = ref(false)
-const dialogGdzjfptj = ref(false)
-const dialogSbyxgl = ref(false)
-const value1 = ref('')
-const table = ref(null)
-
-const showGdzjfptj = () => {
-  value1.value = currentRow.value?.qczl_gdbh
-  dialogGdzjfptj.value = true
-}
-const currentRow = ref()
-const handleSelectChange = (row, column, event) => {
-  currentRow.value = row.UniqId
-}
-
-// 新增数据
-const handleShowAdd = async() => {
-  type.value = '新增'
-  if(minUniqId.value==''){
-	  console.log('123')
-	  // 循环13行数据
-	  const table = []
-  for (let i = 1; i <= 13; i++) {
-	table.push({
-	  fp_lb: '',
-	  fp_sl: '',
-	  fp_gxmc: '',
-	  fp_bz: '',
-	  fp_bh: '',
-	  fp_name: '',
-	})
-  }
-  detailData.table = table
-	dialogFormVisible.value = true
-  }else{
-	  getDetailData(minUniqId.value)
-  }
-  
-  
-  // type.value='add'
-  //    Object.assign(detailData);
-  // dialogFormVisible.value = true
-}
-// 开启弹窗
-const showDialog = () => {
-  dialogFormVisible.value = true
-  // 在 setTimeout 中获取元素,确保在 DOM 渲染完毕后执行
-  setTimeout(() => {
-    formElements = document.getElementById('detail-form').elements
-    formElements[0].focus()
-  }, 0)
-}
-
-// let formElements
-// const moveFocus = (event) => {
-//   const index = Array.from(formElements).indexOf(event.target)
-//   const key = event.key
-//   event.preventDefault()
-//   switch (index) {
-//     case 0:
-//       if (key === 'ArrowDown') {
-//         formElements[1].focus()
-// 		formElements[1].select();
-//       } else if (key === 'ArrowUp') {
-//         formElements[formElements.length - 1].focus()
-//       } else if (key === 'Enter') {
-//         formElements[1].focus()
-// 		formElements[1].select();
-//       }
-//       break
-
-//     case formElements.length - 1 :
-//       if (key === 'ArrowDown') {
-//         formElements[0].focus()
-// 		formElements[0].select();
-//       } else if (key === 'ArrowUp') {
-//         formElements[index - 1].focus()
-//       } else if (key === 'Enter') {
-//         formElements[0].focus()
-// 		formElements[0].select();
-//       }
-//       break
-
-//     default:
-//       if (key === 'ArrowDown') {
-//         formElements[index + 1].focus()
-// 		formElements[index + 1].select();
-//       } else if (key === 'ArrowUp') {
-//         formElements[index - 1].focus()
-// 		formElements[index + 1].select();
-//       } else if (key === 'Enter') {
-//         formElements[index + 1].focus()
-// 		formElements[index + 1].select();
-//       }
-//       break
-//   }
-// }
-</script>
-
-<style scoped>
-.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;
-}
-.bt{
-  margin-left: 2px !important;
-  padding: 3px !important;
-  font-size: 12px;
-}
-/* 选中某行时的背景色 */
-:deep(.el-table__body tr.current-row) > td {
-  background: #ff80ff !important;
-}
-</style>
+
+
+		// type.value='add'
+		//    Object.assign(detailData);
+		// dialogFormVisible.value = true
+	}
+	// 开启弹窗
+	const showDialog = () => {
+		dialogFormVisible.value = true
+		// 在 setTimeout 中获取元素,确保在 DOM 渲染完毕后执行
+		setTimeout(() => {
+			formElements = document.getElementById('detail-form').elements
+			formElements[0].focus()
+		}, 0)
+	}
+
+	// let formElements
+	// const moveFocus = (event) => {
+	//   const index = Array.from(formElements).indexOf(event.target)
+	//   const key = event.key
+	//   event.preventDefault()
+	//   switch (index) {
+	//     case 0:
+	//       if (key === 'ArrowDown') {
+	//         formElements[1].focus()
+	// 		formElements[1].select();
+	//       } else if (key === 'ArrowUp') {
+	//         formElements[formElements.length - 1].focus()
+	//       } else if (key === 'Enter') {
+	//         formElements[1].focus()
+	// 		formElements[1].select();
+	//       }
+	//       break
+
+	//     case formElements.length - 1 :
+	//       if (key === 'ArrowDown') {
+	//         formElements[0].focus()
+	// 		formElements[0].select();
+	//       } else if (key === 'ArrowUp') {
+	//         formElements[index - 1].focus()
+	//       } else if (key === 'Enter') {
+	//         formElements[0].focus()
+	// 		formElements[0].select();
+	//       }
+	//       break
+
+	//     default:
+	//       if (key === 'ArrowDown') {
+	//         formElements[index + 1].focus()
+	// 		formElements[index + 1].select();
+	//       } else if (key === 'ArrowUp') {
+	//         formElements[index - 1].focus()
+	// 		formElements[index + 1].select();
+	//       } else if (key === 'Enter') {
+	//         formElements[index + 1].focus()
+	// 		formElements[index + 1].select();
+	//       }
+	//       break
+	//   }
+	// }
+</script>
+
+<style scoped>
+	.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;
+	}
+
+	.bt {
+		margin-left: 2px !important;
+		padding: 3px !important;
+		font-size: 12px;
+	}
+
+	/* 选中某行时的背景色 */
+	:deep(.el-table__body tr.current-row)>td {
+		background: #ff80ff !important;
+	}
+</style>

+ 818 - 778
src/view/performance/Dayreportattached.vue

@@ -1,799 +1,839 @@
-<template>
-  <div>
-    <!-- 左侧树形结构 -->
-    <el-container>
-      <!-- <el-aside width="250px">
-        <div class="JKWTree-tree">
-          <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="220"
-         style="margin-right: 10px;"
-       >
-         <div
-           class="JKWTree-tree"
-           style="height: 70vh;"
-         >
-           <h3>机台生产日报表附加维护</h3>
-           <el-tree
-             :data="treeData"
-             highlight-current
-             @node-click="handleNodeClick"
-           />
-         </div>
-		 
-       </layout-sider>
-      <el-container>
-        <el-main>
-          <!-- 按钮区域 -->
-          <div class="gva-table-box">
-            <el-form-item>
-              <el-input v-model="searchInfo" placeholder="输入工单编号或产品名称" style="width: 180px;"  />
-              <el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
-              <el-button type="primary" class="bt" icon="plus" @click="onAdd">新增</el-button>
-			  <el-button type="primary" class="bt" icon="delete"  @click="onDel">删除</el-button>
-              <div style="margin-left: auto;">
-                <el-button type="primary" class="bt" icon="download" @click="exportExcel">导出到Excel</el-button>
-              </div>
-            </el-form-item>
-            <!-- 数据展示 -->
-            <el-table ref="multipleTable" style="width: 100%" 
-			tooltip-effect="dark" :data="tableData" row-key="ID"
-              highlight-current-row="true" border 
-			  :row-style="{ height: '0px' }"
-			  :header-row-style="{ height: '20px' }"
-			  :header-cell-style="{ padding: '0px' }"
-			  @selection-change="handleSelectionChange" @row-click="Click"
-			  :show-overflow-tooltip="true" @row-dblclick="doubleClick">
-              <!-- <el-table-column type="selection" width="55" /> -->
-              <el-table-column align="left" sortable label="生产日期" prop="sczl_rq" width="105"/>
-              <el-table-column align="left" sortable label="设备编号" prop="sczl_jtbh" width="105"/>
-              <el-table-column align="left" sortable label="设备名称" prop="sczl_sbmc" width="250"/>
-              <el-table-column align="left" sortable label="班组编号" prop="sczl_bzdh" width="105"/>
-              <el-table-column align="left" sortable label="排班工时" prop="sczl_设备运行工时" width="105"/>
-              <el-table-column align="left" sortable label="备注" prop="sczl_desc" width="120"/>
-              <el-table-column align="left" sortable label="创建用户" prop="sys_id" width="120"/>
-              <el-table-column align="left" sortable label="创建时间" prop="sys_rq" width="160"/>
-              <el-table-column align="left" sortable label="修改时间" prop="mod_rq" width="160"/>
-              <el-table-column align="left" sortable label="UNIQID" prop="UniqId" width="120"/>
-            </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="700px">
-            <!-- <el-scrollbar height="500px"> -->
-            <el-form :model="formData" label-position="right" ref="elFormRef" :rules="rule" label-width="80px">
-
-              <el-row :gutter="24">
-                <el-col :span="8">
-                  <el-form-item label="日期" prop="name" class="mab">
-                        <el-input v-model="formData.sczl_rq" type="date" max="9999-12-31" id="日期" @focus="rqHandleFocus()" @keydown="ent($event, '备注', '日期', '机器')" placeholder="" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-
-              <el-row :gutter="24">
-				<el-col :span="8">
-				  <el-form-item label="机器" prop="id" class="mab">
-					<el-input v-model="formData.sczl_jtbh" id="机器" @keydown="ent($event, '日期', '机器', '组别')" @blur="getJTsubmit()" style="width: 200px; " placeholder="Enter回车" />
-				  </el-form-item>
-				</el-col>
-				<el-col :span="16">                     
-					<el-input v-model="formData.设备名称" id="设备名称" :readonly=true style="width: 400px;" placeholder="" />
-				</el-col>
-              </el-row>
-			  
-			  <el-row :gutter="24">
-				<el-col :span="8">
-				  <el-form-item label="组别" prop="id" class="mab">
-					<el-input v-model="formData.sczl_bzdh" id="组别"  @keydown="ent($event, '机器', '组别', '通电时间')" @blur="getBzsubmit()" style="width: 150px;" placeholder="Enter回车" />
-				  </el-form-item>
-				</el-col>
-				<el-col :span="8">
-					<el-form-item label="通电时间" prop="id" label-width="133px" class="mab">
-					<el-input v-model="formData.sczl_设备运行工时" id="通电时间"  @keydown="ent($event, '组别', '通电时间', '备注')" style="width: 200px;" placeholder="" />
-					</el-form-item>
-				</el-col>
-			  </el-row>
-			  
-			  <el-row :gutter="24">			 
-			    <el-col :span="21">
-			        <el-form-item label="备注" prop="id" class="mab">
-			          <el-input type="textarea" rows="3" cols="50" v-model="formData.sczl_desc" id="备注"  @keydown="ent($event, '通电时间', '备注', '日期')" :clearable="true" placeholder="" />
-			        </el-form-item>
-			    </el-col>
-			  </el-row>
-			  
-            </el-form>
-            <!-- </el-scrollbar> -->
-            <template #footer>
-              <div class="dialog-footer">
-                <el-button @click="dialogFormVisible=false">取 消</el-button>
-                <el-button type="primary" @click="enterDialog">确 定</el-button>
-              </div>
-            </template>
-          </el-dialog>
-
-          
-		  <el-dialog v-model="GetjtbhVisible" title="选择"
-		    destroy-on-close width="600px" >
-					<el-input v-model="searchGetjtbh" placeholder=""  style="width: 400px;"></el-input>
-					<el-button type="primary" icon="search" @click="GetjtbhSubmit" class="search"></el-button>
-
-		           <el-tree :data="GetJTtreeData" :props="defaultProps"
-					 highlight-current="true" style="width: 500px;"
-		             @node-click="GetMachineDedhhandleNodeClick"
-					 @node-dblclick="handleNodeDoubleClick"
-					 ></el-tree>     
-		  </el-dialog>
-		  <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px" @keydown="selectBZ($event)" >
-		    <el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID"
-		      highlight-current-row="true" border style="width:100%" ref="table2"
-		      @row-dblclick="SelectClickBz"
-		    >
-		      <el-table-column prop="sczl_bzdh" label="班组" width="150" />			        	 
-		    </el-table>
-		  </el-dialog>
-        </el-main>
-      </el-container>
-    </el-container>
-
-  </div>
-</template>
-
-<script setup>
-import {
-  getproductionaddList,
-  getproductionaddCount,
-  adddel,
-  addedit,
-  addgetJtbh,
-  addgetInfo,
-  reportadd
-} from '@/api/jixiaoguanli/jitairibaobiao'
-
-// 全量引入格式化工具 请按需保留
-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, onBeforeMount } from 'vue'
-import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
-import { useUserStore } from '@/pinia/modules/user'
-const userStore = useUserStore() 
-const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
-defineOptions({
-  name: '06-packingDocuments'
-})
-
-// 侧边栏数据请求
-const treeData = reactive([]);
-
-const getTabdata = async () => {
-    //接口调用函数
-    const response  = await getproductionaddCount();
-	
-	const transformedData = response.data.map(item => ({
-	      label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
-	      children: item.sys.map(sysItem => ({
-	        label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
-	        params: {
-	          date: item.date.replace(/\./g, '-'),
-	          sys_id: sysItem.sys_id,
-	          total: sysItem.count,
-	        },
-	      })),
-	    }));
-	    treeData.splice(0, treeData.length, ...transformedData);
-
-	
-	}
-
-getTabdata();
-
-// 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-			 sczl_rq: '',
-             sczl_jtbh: '',
-             设备名称: '',
-             sczl_bzdh: '',
-             sczl_设备运行工时: '0.00',
-             sczl_desc: '',
-			 sys_id:sys_id,
-})
-const initFormData = () => {
-	formData.value = {
-		 sczl_rq: '',
-		 sczl_jtbh: '',
-		 设备名称: '',
-		 sczl_bzdh: '',
-		 sczl_设备运行工时: '0.00',
-		 sczl_desc: '',
-		 sys_id:sys_id,
-	};
-}
-
-// 验证规则
-const rule = reactive({
-})
-
-const elFormRef = ref()
-const elSearchFormRef = ref()
-
-// =========== 表格控制部分 ===========
-const tableData = reactive([])
-const detailData = reactive([])
-const total = ref(0)
-const page = ref(1)
-const limit = ref(10)
-const searchInfo = ref('')
-const searchGetjtbh = 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 () => {
-  const response = await getproductionaddList(params);
-  if (response.code === 0) {
-    tableData.splice(0, tableData.length, ...response.data.rows);
-  }
-}
-
-const handleNodeClick = (node, check) => {
-  if (node.params) {
-    params.date = node.params.date;
-    params.sys_id = node.params.sys_id;
-    total.value = node.params.total;
-    handleCurrentChange(1);
-  }
-}
-
-// 搜索
-function onSearch() {
-
-}
-// ============== 表格控制部分结束 ===============
-
-// 获取需要的字典 可能为空 按需保留
-const setOptions = async () => {
-}
-
-// 获取需要的字典 可能为空 按需保留
-setOptions()
-
-// 多选数据
-const multipleSelection = ref([])
-// 多选
-const handleSelectionChange = (val) => {
-  // multipleSelection.value = val
-  if(val.length>0){
-  	multipleSelection.value = val
-  	const lenth=val.length
-  	// ScrapFactor.gdbh=val[lenth-1].combinedProp.split('-')[0];
-  	// const parts = val[lenth-1].combinedProp2.split('-')
-  	// ScrapFactor.yjno=parts[0];
-  	// ScrapFactor.gxh=parts[1];
-  	// ScrapFactor.type=val[lenth-1].sczl_检验类别
-  	// console.log(ScrapFactor)
-  	lastCellValue=val[lenth-1].UniqId
-  	
-  	val.splice(0, val.length);  // 清空 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 openDialog = () => {
-  type.value = 'create'
-  dialogFormVisible.value = true
-}
-
-// 关闭弹窗
-const closeDialog = () => {
-  dialogFormVisible.value = false
-  formData.value = {
-    address: '',
-    image: '',
-    name: '',
-  }
-}
-
-const rqHandleFocus = () =>{
-	if(formData.value.sczl_rq==''){
-		formData.value.sczl_rq = new Date().toISOString().split('T')[0]
-	}
-}
-
-const enterDialog1 = (event) => {
-	if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-		//弹窗提示确认
-		ElMessageBox.confirm('数据存盘?', '提示', {
-		  confirmButtonText: '确定',
-		  cancelButtonText: '取消',
-		  type: 'warning'
-		}).then(() => {
-			enterDialog()
-		})
-	}else if (event.keyCode === 39) { // 向右箭头
-		//弹窗提示确认
-		ElMessageBox.confirm('数据存盘?', '提示', {
-		  confirmButtonText: '确定',
-		  cancelButtonText: '取消',
-		  type: 'warning'
-		}).then(() => {
-			enterDialog()
-		})
-	}
-	
-}
-// 弹窗确定
-const enterDialog = async () => {
-	//弹窗提示确认
-	ElMessageBox.confirm('数据存盘?', '提示', {
-	  confirmButtonText: '确定',
-	  cancelButtonText: '取消',
-	  type: 'warning'
-	}).then(() => {
-		
-		if(formData.value.sczl_rq==''){
-			ElMessage({
-				type: 'error',
-				message: '请填写日期'
-			});
-			document.getElementById('日期').focus()
-			document.getElementById('日期').select()
-			return;
+<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 @node-click="handleNodeClick" />
+				</div>
+
+			</layout-sider>
+			<el-container>
+				<el-main>
+					<!-- 按钮区域 -->
+					<div class="gva-table-box">
+						<el-form-item>
+							<el-input v-model="searchInfo" placeholder="输入工单编号或产品名称" style="width: 180px;" />
+							<el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
+							<el-button type="primary" class="bt" icon="plus" @click="onAdd">新增</el-button>
+							<el-button type="primary" class="bt" icon="delete" @click="onDel">删除</el-button>
+							<div style="margin-left: auto;">
+								<el-button type="primary" class="bt" icon="download"
+									@click="exportExcel">导出到Excel</el-button>
+							</div>
+						</el-form-item>
+						<!-- 数据展示 -->
+						<el-table ref="multipleTable" style="width: 100%" tooltip-effect="dark" :data="tableData"
+							row-key="ID" highlight-current-row="true" border :row-style="{ height: '0px' }"
+							:header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
+							@selection-change="handleSelectionChange" @row-click="Click" :show-overflow-tooltip="true"
+							@row-dblclick="doubleClick">
+							<!-- <el-table-column type="selection" width="55" /> -->
+							<el-table-column align="left" sortable label="生产日期" prop="sczl_rq" width="105" />
+							<el-table-column align="left" sortable label="设备编号" prop="sczl_jtbh" width="105" />
+							<el-table-column align="left" sortable label="设备名称" prop="sczl_sbmc" width="250" />
+							<el-table-column align="left" sortable label="班组编号" prop="sczl_bzdh" width="105" />
+							<el-table-column align="left" sortable label="排班工时" prop="sczl_设备运行工时" width="105" />
+							<el-table-column align="left" sortable label="备注" prop="sczl_desc" width="120" />
+							<el-table-column align="left" sortable label="创建用户" prop="sys_id" width="120" />
+							<el-table-column align="left" sortable label="创建时间" prop="sys_rq" width="160" />
+							<el-table-column align="left" sortable label="修改时间" prop="mod_rq" width="160" />
+							<el-table-column align="left" sortable label="UNIQID" prop="UniqId" width="120" />
+						</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="700px">
+						<!-- <el-scrollbar height="500px"> -->
+						<el-form :model="formData" label-position="right" ref="elFormRef" :rules="rule"
+							label-width="80px">
+
+							<el-row :gutter="24">
+								<el-col :span="8">
+									<el-form-item label="日期" prop="name" class="mab">
+										<el-input v-model="formData.sczl_rq" type="date" max="9999-12-31" id="日期"
+											@focus="rqHandleFocus()" @keydown="ent($event, '备注', '日期', '机器')"
+											placeholder="" />
+									</el-form-item>
+								</el-col>
+							</el-row>
+
+							<el-row :gutter="24">
+								<el-col :span="8">
+									<el-form-item label="机器" prop="id" class="mab">
+										<el-input v-model="formData.sczl_jtbh" id="机器"
+											@keydown="ent($event, '日期', '机器', '组别')" @blur="getJTsubmit()"
+											style="width: 200px; " placeholder="Enter回车" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="16">
+									<el-input v-model="formData.设备名称" id="设备名称" :readonly=true style="width: 400px;"
+										placeholder="" />
+								</el-col>
+							</el-row>
+
+							<el-row :gutter="24">
+								<el-col :span="8">
+									<el-form-item label="组别" prop="id" class="mab">
+										<el-input v-model="formData.sczl_bzdh" id="组别"
+											@keydown="ent($event, '机器', '组别', '通电时间')" @blur="getBzsubmit()"
+											style="width: 150px;" placeholder="Enter回车" />
+									</el-form-item>
+								</el-col>
+								<el-col :span="8">
+									<el-form-item label="通电时间" prop="id" label-width="133px" class="mab">
+										<el-input v-model="formData.sczl_设备运行工时" id="通电时间"
+											@keydown="ent($event, '组别', '通电时间', '备注')" style="width: 200px;"
+											placeholder="" />
+									</el-form-item>
+								</el-col>
+							</el-row>
+
+							<el-row :gutter="24">
+								<el-col :span="21">
+									<el-form-item label="备注" prop="id" class="mab">
+										<el-input type="textarea" rows="3" cols="50" v-model="formData.sczl_desc"
+											id="备注" @keydown="ent($event, '通电时间', '备注', '日期')" :clearable="true"
+											placeholder="" />
+									</el-form-item>
+								</el-col>
+							</el-row>
+
+						</el-form>
+						<!-- </el-scrollbar> -->
+						<template #footer>
+							<div class="dialog-footer">
+								<el-button @click="dialogFormVisible=false">取 消</el-button>
+								<el-button type="primary" @click="enterDialog">确 定</el-button>
+							</div>
+						</template>
+					</el-dialog>
+
+
+					<el-dialog v-model="GetjtbhVisible" title="选择" destroy-on-close width="600px">
+						<el-input v-model="searchGetjtbh" placeholder="" style="width: 400px;"></el-input>
+						<el-button type="primary" icon="search" @click="GetjtbhSubmit" class="search"></el-button>
+
+						<el-tree :data="GetJTtreeData" :props="defaultProps" highlight-current="true"
+							style="width: 500px;" @node-click="GetMachineDedhhandleNodeClick"
+							@node-dblclick="handleNodeDoubleClick"></el-tree>
+					</el-dialog>
+					<el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px"
+						@keydown="selectBZ($event)">
+						<el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID" highlight-current-row="true"
+							border style="width:100%" ref="table2" @row-dblclick="SelectClickBz">
+							<el-table-column prop="sczl_bzdh" label="班组" width="150" />
+						</el-table>
+					</el-dialog>
+				</el-main>
+			</el-container>
+		</el-container>
+
+	</div>
+</template>
+
+<script setup>
+	import {
+		getproductionaddList,
+		getproductionaddCount,
+		adddel,
+		addedit,
+		addgetJtbh,
+		addgetInfo,
+		reportadd
+	} from '@/api/jixiaoguanli/jitairibaobiao'
+
+	// 全量引入格式化工具 请按需保留
+	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,
+		onBeforeMount
+	} from 'vue'
+	import {
+		getPackingSideTable,
+		getPackingTable
+	} from '@/api/mes_api_gty/myapi'
+	import {
+		Layout,
+		LayoutContent,
+		LayoutHeader,
+		LayoutSider
+	} from '@arco-design/web-vue'
+	import {
+		useUserStore
+	} from '@/pinia/modules/user'
+	const userStore = useUserStore()
+	const sys_id = '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
+	defineOptions({
+		name: '06-packingDocuments'
+	})
+
+	// 侧边栏数据请求
+	const treeData = reactive([]);
+
+	const getTabdata = async () => {
+		//接口调用函数
+		const response = await getproductionaddCount();
+
+		const transformedData = response.data.map(item => ({
+			label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
+			children: item.sys.map(sysItem => ({
+				label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
+				params: {
+					date: item.date.replace(/\./g, '-'),
+					sys_id: sysItem.sys_id,
+					total: sysItem.count,
+				},
+			})),
+		}));
+		treeData.splice(0, treeData.length, ...transformedData);
+
+
+	}
+
+	getTabdata();
+
+	// 自动化生成的字典(可能为空)以及字段
+	const formData = ref({
+		sczl_rq: '',
+		sczl_jtbh: '',
+		设备名称: '',
+		sczl_bzdh: '',
+		sczl_设备运行工时: '0.00',
+		sczl_desc: '',
+		sys_id: sys_id,
+	})
+	const initFormData = () => {
+		formData.value = {
+			sczl_rq: '',
+			sczl_jtbh: '',
+			设备名称: '',
+			sczl_bzdh: '',
+			sczl_设备运行工时: '0.00',
+			sczl_desc: '',
+			sys_id: sys_id,
+		};
+	}
+
+	// 验证规则
+	const rule = reactive({})
+
+	const elFormRef = ref()
+	const elSearchFormRef = ref()
+
+	// =========== 表格控制部分 ===========
+	const tableData = reactive([])
+	const detailData = reactive([])
+	const total = ref(0)
+	const page = ref(1)
+	const limit = ref(10)
+	const searchInfo = ref('')
+	const searchGetjtbh = 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 () => {
+		const response = await getproductionaddList(params);
+		if (response.code === 0) {
+			tableData.splice(0, tableData.length, ...response.data.rows);
 		}
-		if(formData.value.sczl_jtbh==''){
-			ElMessage({
-				type: 'error',
-				message: '请选择机器'
-			});
-			document.getElementById('机器').focus()
-			document.getElementById('机器').select()
-			return;
+	}
+
+	const handleNodeClick = (node, check) => {
+		if (node.params) {
+			params.date = node.params.date;
+			params.sys_id = node.params.sys_id;
+			total.value = node.params.total;
+			handleCurrentChange(1);
+		}
+	}
+
+	// 搜索
+	function onSearch() {
+
+	}
+	// ============== 表格控制部分结束 ===============
+
+	// 获取需要的字典 可能为空 按需保留
+	const setOptions = async () => {}
+
+	// 获取需要的字典 可能为空 按需保留
+	setOptions()
+
+	// 多选数据
+	const multipleSelection = ref([])
+	// 多选
+	const handleSelectionChange = (val) => {
+		// multipleSelection.value = val
+		if (val.length > 0) {
+			multipleSelection.value = val
+			const lenth = val.length
+			// ScrapFactor.gdbh=val[lenth-1].combinedProp.split('-')[0];
+			// const parts = val[lenth-1].combinedProp2.split('-')
+			// ScrapFactor.yjno=parts[0];
+			// ScrapFactor.gxh=parts[1];
+			// ScrapFactor.type=val[lenth-1].sczl_检验类别
+			// console.log(ScrapFactor)
+			lastCellValue = val[lenth - 1].UniqId
+
+			val.splice(0, val.length); // 清空 val 数组	
 		}
-		if(formData.value.sczl_bzdh==''){
+	}
+
+	// 批量删除控制标记
+	const deleteVisible = ref(false)
+
+	// 多选删除
+	const onDelete = async () => {
+		const ids = []
+		if (multipleSelection.value.length === 0) {
 			ElMessage({
-				type: 'error',
-				message: '请选择班组'
-			});
-			document.getElementById('组别').focus()
-			document.getElementById('组别').select()
-			return;
+				type: 'warning',
+				message: '请选择要删除的数据'
+			})
+			return
 		}
-		if(formData.value.sczl_设备运行工时==''){
+		multipleSelection.value &&
+			multipleSelection.value.map(item => {
+				ids.push(item.ID)
+			})
+		const res = await deleteCompanyByIds({
+			ids
+		})
+		if (res.code === 0) {
 			ElMessage({
-				type: 'error',
-				message: '请填写通电时间'
-			});
-			document.getElementById('通电时间').focus()
-			document.getElementById('通电时间').select()
-			return;
+				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
 		}
-	  updateDetailData()
-	});
-
-}
-let table=ref(5);
-let lastCellValue=ref()
-// 双击表格操作
-function doubleClick(row, column, event) {
-  type.value = 'update';
-  		  lastCellValue= row['UniqId'];
-  table.value=lastCellValue
-  	 dialogFormVisible.value = true
-	 
-	 AddgetInfo(table.value)
-}
-// 单击表格操作
-function Click(row, column, event) {
-  lastCellValue= row['UniqId'];
-}
-//获取详细信息
-const AddgetInfo = async (value) => {
-  const response = await addgetInfo({UniqId:value});
-  if (response.code === 0) {
-	formData.value=response.data[0];
-  }
-}
-
-//机台回车事件
-const getJTsubmit = (event, inputName) => {
-	  addgetJtbh({sys_mc:''}).then(response=>{
-		  if(response.code==0){
-			var flag = 0;
-			for (const arr of response.data[0]['使用部门']) {
-				if(!flag){
-					for (const arr1 of response.data[0][arr]) {
-						if(arr1['jtbh'] == formData.value.sczl_jtbh){
-							flag = 1
-							break;
+	}
+
+	// 弹窗控制标记
+	const dialogFormVisible = ref(false)
+
+	// 打开弹窗
+	const openDialog = () => {
+		type.value = 'create'
+		dialogFormVisible.value = true
+	}
+
+	// 关闭弹窗
+	const closeDialog = () => {
+		dialogFormVisible.value = false
+		formData.value = {
+			address: '',
+			image: '',
+			name: '',
+		}
+	}
+
+	const rqHandleFocus = () => {
+		if (formData.value.sczl_rq == '') {
+			formData.value.sczl_rq = new Date().toISOString().split('T')[0]
+		}
+	}
+
+	const enterDialog1 = (event) => {
+		if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+			//弹窗提示确认
+			ElMessageBox.confirm('数据存盘?', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				enterDialog()
+			})
+		} else if (event.keyCode === 39) { // 向右箭头
+			//弹窗提示确认
+			ElMessageBox.confirm('数据存盘?', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				enterDialog()
+			})
+		}
+
+	}
+	// 弹窗确定
+	const enterDialog = async () => {
+		//弹窗提示确认
+		ElMessageBox.confirm('数据存盘?', '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		}).then(() => {
+
+			if (formData.value.sczl_rq == '') {
+				ElMessage({
+					type: 'error',
+					message: '请填写日期'
+				});
+				document.getElementById('日期').focus()
+				document.getElementById('日期').select()
+				return;
+			}
+			if (formData.value.sczl_jtbh == '') {
+				ElMessage({
+					type: 'error',
+					message: '请选择机器'
+				});
+				document.getElementById('机器').focus()
+				document.getElementById('机器').select()
+				return;
+			}
+			if (formData.value.sczl_bzdh == '') {
+				ElMessage({
+					type: 'error',
+					message: '请选择班组'
+				});
+				document.getElementById('组别').focus()
+				document.getElementById('组别').select()
+				return;
+			}
+			if (formData.value.sczl_设备运行工时 == '') {
+				ElMessage({
+					type: 'error',
+					message: '请填写通电时间'
+				});
+				document.getElementById('通电时间').focus()
+				document.getElementById('通电时间').select()
+				return;
+			}
+			updateDetailData()
+		});
+
+	}
+	let table = ref(5);
+	let lastCellValue = ref()
+	// 双击表格操作
+	function doubleClick(row, column, event) {
+		type.value = 'update';
+		lastCellValue = row['UniqId'];
+		table.value = lastCellValue
+		dialogFormVisible.value = true
+
+		AddgetInfo(table.value)
+	}
+	// 单击表格操作
+	function Click(row, column, event) {
+		lastCellValue = row['UniqId'];
+	}
+	//获取详细信息
+	const AddgetInfo = async (value) => {
+		const response = await addgetInfo({
+			UniqId: value
+		});
+		if (response.code === 0) {
+			formData.value = response.data[0];
+		}
+	}
+
+	//机台回车事件
+	const getJTsubmit = (event, inputName) => {
+		addgetJtbh({
+			sys_mc: ''
+		}).then(response => {
+			if (response.code == 0) {
+				var flag = 0;
+				for (const arr of response.data[0]['使用部门']) {
+					if (!flag) {
+						for (const arr1 of response.data[0][arr]) {
+							if (arr1['jtbh'] == formData.value.sczl_jtbh) {
+								flag = 1
+								break;
+							}
 						}
+					} else {
+						break;
 					}
-				}else{
-					break;
 				}
+				if (!flag) {
+					// 遍历接口返回的数据,构建父子关系
+					GetJTtreeData.splice(0, GetJTtreeData.length);
+					response.data.forEach(item => {
+						const departments = item["使用部门"];
+						departments.forEach(department => {
+							const departmentData = {
+								label: department,
+								value: department,
+								children: item[department].map(device => {
+									return {
+										label: device["jtbh"] + '/' + device[
+											"设备名称"],
+										value: device["jtbh"]
+									};
+								})
+							};
+							GetJTtreeData.push(departmentData);
+						});
+					});
+					GetjtbhVisible.value = true
+				}
+				return
+
+
 			}
-			if(!flag){
-				// 遍历接口返回的数据,构建父子关系
-				GetJTtreeData.splice(0, GetJTtreeData.length);
-				response.data.forEach(item => {
-				  const departments = item["使用部门"];
-				  departments.forEach(department => {
-				    const departmentData = {
-				      label: department,
-				      value: department,
-				      children: item[department].map(device => {
-				        return {
-				          label: device["jtbh"]+'/'+device["设备名称"],
-				          value: device["jtbh"]
-				        };
-				      })
-				    };
-				    GetJTtreeData.push(departmentData);
-				  });
-				});
-				  GetjtbhVisible.value=true
-			}
-			  return
-		  	 
-		  	   
-		  }
-	  })
-}
-const GetjtbhSubmit = () =>{
-	addgetJtbh({sys_mc:searchGetjtbh.value}).then(response=>{
-			  if(response.code==0){
+		})
+	}
+	const GetjtbhSubmit = () => {
+		addgetJtbh({
+			sys_mc: searchGetjtbh.value
+		}).then(response => {
+			if (response.code == 0) {
 				// 遍历接口返回的数据,构建父子关系
 				GetJTtreeData.splice(0, GetJTtreeData.length);
 				response.data.forEach(item => {
-				  const departments = item["使用部门"];
-				  departments.forEach(department => {
-					const departmentData = {
-					  label: department,
-					  value: department,
-					  children: item[department].map(device => {
-						return {
-						  label: device["jtbh"]+'/'+device["设备名称"],
-						  value: device["jtbh"]
+					const departments = item["使用部门"];
+					departments.forEach(department => {
+						const departmentData = {
+							label: department,
+							value: department,
+							children: item[department].map(device => {
+								return {
+									label: device["jtbh"] + '/' + device["设备名称"],
+									value: device["jtbh"]
+								};
+							})
 						};
-					  })
-					};
-					GetJTtreeData.push(departmentData);
-				  });
+						GetJTtreeData.push(departmentData);
+					});
 				});
-			  }
-	})
-}
-const GetjtbhVisible = ref(false)
-let GetJTtreeData = reactive([]);
-const GetMachineDedhhandleNodeClick = (node,check,nodeData) => {
-  if (!node.children){
-       // 点击的是子节点
-       // 执行相应的子节点单击事件处理逻辑
-	   const splitIndex = node.label.indexOf('/');
-	   formData.value.sczl_jtbh = node.label.substring(0, splitIndex);
-	   formData.value.设备名称 = node.label.substring(splitIndex + 1);
-	    GetjtbhVisible.value=false
-     }
-}
-
-//班组失去焦点事件
-const getBzsubmit = () => {
-	//弹出选择
-	const data = [{'sczl_bzdh':'A班'},{'sczl_bzdh':'B班'}]
-	selectDataBz.splice(0, selectDataBz.length, ...data)
-	if(!GetjtbhVisible.value){
-		BzVisible.value=true
-		setCurrent(selectDataBz[0])
-	}
-	
-			
-}
-const table2 = ref()
-const setCurrent = (row) => {
-  setTimeout(()=>{
-	  table2.value?.setCurrentRow(row)
-	  // SelectClick(row)
-	  // console.log(row)
-	  // console.log(table)
-	  const {sczl_bzdh } = row
-	  	formData.value.sczl_bzdh=row.sczl_bzdh
-	  	console.log(row)
-  })
-}
-//班组选择
-const selectDataBz = reactive([])
-const BzVisible = ref(false)
-const SelectClickBz = (row, column, event) => {
- const {sczl_bzdh } = row
- 
- 	formData.value.sczl_bzdh=row.sczl_bzdh
- 
- BzVisible.value = false
-}
-const selectBZ = (event) => {
-	// console.log(selectDataBz.length);
-	if (event.keyCode === 40) { // Enter 或向下箭头
-	    setCurrent(selectDataBz[1]);
-		
-	} else if (event.keyCode === 38) {
-		setCurrent(selectDataBz[0]);
-	
-	} else if (event.keyCode === 13) {
-		    BzVisible.value = false
-	}
-}
-
-// 更新数据
-const updateDetailData = async() => {
-  const restoredData = {
-    UniqId: lastCellValue,
-	sczl_rq:formData.value.sczl_rq,
-	sczl_jtbh:formData.value.sczl_jtbh,
-	sczl_bzdh:formData.value.sczl_bzdh,
-	sczl_设备运行工时:formData.value.sczl_设备运行工时,
-	sczl_desc:formData.value.sczl_desc,
-	sys_id:sys_id,
-  }
- if(ADD.value=='新增'){
-	 const response = await reportadd(restoredData);
-	 // ADD.value='1'
-	 // console.log(ADD.value)
-	 ADD.value='0'
-	 if(response.code==0){
-	 		 ElMessage({
-	 		   type: 'success',
-	 		   message: '新增成功',
-	 		 })
-			 dialogFormVisible.value = false
-			 //刷新侧边栏
-			 getTabdata()
-			 if(params.date != ''){
-			 	//刷新页面
-			 	getTableData()
-			 }
-	 }
-	 
- }else{
-	 const response = await addedit(restoredData);
-	  if(response.code==0){
-	 ElMessage({
-	   type: 'success',
-	   message: '修改成功',
-	 })
-	  }
-	  dialogFormVisible.value = false
- }
-}
-//键盘 input框跳转
-const ent = (event,id1,id2,id3) => {
-
-  if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-    if(id3!=''){
-		if(id2=='备注'){
-			document.getElementById(id3).focus()
-			document.getElementById(id3).select();
-			enterDialog1()
-		}else{
-			document.getElementById(id3).focus()
-			document.getElementById(id3).select()
-		}
-    }
-  } else if (event.keyCode === 38) { // 向上箭头
-    if(id1!=''){
-      document.getElementById(id1).focus()
-      document.getElementById(id1).select()
-    }
-  }else if (event.keyCode === 8) { // 删除箭头
-    if(id1!='' && document.getElementById(id2).value==''){
-      document.getElementById(id1).focus()
-      document.getElementById(id1).setSelectionRange(0, 0)
-    }
-  }else if (event.keyCode === 37) { // 向左箭头
-    if(id1!='' && document.getElementById(id2).selectionStart==0){
-      document.getElementById(id1).focus()
-      document.getElementById(id1).select()
-    }
-  }else if (event.keyCode === 39) { // 向右箭头
-    if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
-      if(id2=='备注'){
-      	document.getElementById(id3).focus()
-      	document.getElementById(id3).select()
-      	enterDialog1()
-      }else{
-      	document.getElementById(id3).focus()
-      	document.getElementById(id3).select()
-      }
-    }
-  }
-}
-const AddDel = (value) => {
-	if(typeof(lastCellValue)=='object'){
-		ElMessage({
-		  type: 'warning',
-		  message: '未选中记录',
+			}
 		})
-		return
-	}
-	ElMessageBox.confirm(
-	  `确认删除这条数据么?`,
-	  '警告',
-	  {
-	    confirmButtonText: '确认',
-	    cancelButtonText: '取消',
-	    type: 'warning',
-	  }
-	).then(async() => {
-		const response = await adddel({UniqId:lastCellValue});
-		if (response.code === 0) {
+	}
+	const GetjtbhVisible = ref(false)
+	let GetJTtreeData = reactive([]);
+	const GetMachineDedhhandleNodeClick = (node, check, nodeData) => {
+		if (!node.children) {
+			// 点击的是子节点
+			// 执行相应的子节点单击事件处理逻辑
+			const splitIndex = node.label.indexOf('/');
+			formData.value.sczl_jtbh = node.label.substring(0, splitIndex);
+			formData.value.设备名称 = node.label.substring(splitIndex + 1);
+			GetjtbhVisible.value = false
+		}
+	}
+
+	//班组失去焦点事件
+	const getBzsubmit = () => {
+		//弹出选择
+		const data = [{
+			'sczl_bzdh': 'A班'
+		}, {
+			'sczl_bzdh': 'B班'
+		}]
+		selectDataBz.splice(0, selectDataBz.length, ...data)
+		if (!GetjtbhVisible.value) {
+			BzVisible.value = true
+			setCurrent(selectDataBz[0])
+		}
+
+
+	}
+	const table2 = ref()
+	const setCurrent = (row) => {
+		setTimeout(() => {
+			table2.value?.setCurrentRow(row)
+			// SelectClick(row)
+			// console.log(row)
+			// console.log(table)
+			const {
+				sczl_bzdh
+			} = row
+			formData.value.sczl_bzdh = row.sczl_bzdh
+			console.log(row)
+		})
+	}
+	//班组选择
+	const selectDataBz = reactive([])
+	const BzVisible = ref(false)
+	const SelectClickBz = (row, column, event) => {
+		const {
+			sczl_bzdh
+		} = row
+
+		formData.value.sczl_bzdh = row.sczl_bzdh
+
+		BzVisible.value = false
+	}
+	const selectBZ = (event) => {
+		// console.log(selectDataBz.length);
+		if (event.keyCode === 40) { // Enter 或向下箭头
+			setCurrent(selectDataBz[1]);
+
+		} else if (event.keyCode === 38) {
+			setCurrent(selectDataBz[0]);
+
+		} else if (event.keyCode === 13) {
+			BzVisible.value = false
+		}
+	}
+
+	// 更新数据
+	const updateDetailData = async () => {
+		const restoredData = {
+			UniqId: lastCellValue,
+			sczl_rq: formData.value.sczl_rq,
+			sczl_jtbh: formData.value.sczl_jtbh,
+			sczl_bzdh: formData.value.sczl_bzdh,
+			sczl_设备运行工时: formData.value.sczl_设备运行工时,
+			sczl_desc: formData.value.sczl_desc,
+			sys_id: sys_id,
+		}
+		if (ADD.value == '新增') {
+			const response = await reportadd(restoredData);
+			// ADD.value='1'
+			// console.log(ADD.value)
+			ADD.value = '0'
+			if (response.code == 0) {
+				ElMessage({
+					type: 'success',
+					message: '新增成功',
+				})
+				dialogFormVisible.value = false
+				//刷新侧边栏
+				getTabdata()
+				if (params.date != '') {
+					//刷新页面
+					getTableData()
+				}
+			}
+
+		} else {
+			const response = await addedit(restoredData);
+			if (response.code == 0) {
+				ElMessage({
+					type: 'success',
+					message: '修改成功',
+				})
+			}
+			dialogFormVisible.value = false
+		}
+	}
+	//键盘 input框跳转
+	const ent = (event, id1, id2, id3) => {
+
+		if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
+			if (id3 != '') {
+				if (id2 == '备注') {
+					document.getElementById(id3).focus()
+					document.getElementById(id3).select();
+					enterDialog1()
+				} else {
+					document.getElementById(id3).focus()
+					document.getElementById(id3).select()
+				}
+			}
+		} else if (event.keyCode === 38) { // 向上箭头
+			if (id1 != '') {
+				document.getElementById(id1).focus()
+				document.getElementById(id1).select()
+			}
+		} else if (event.keyCode === 8) { // 删除箭头
+			if (id1 != '' && document.getElementById(id2).value == '') {
+				document.getElementById(id1).focus()
+				document.getElementById(id1).setSelectionRange(0, 0)
+			}
+		} else if (event.keyCode === 37) { // 向左箭头
+			if (id1 != '' && document.getElementById(id2).selectionStart == 0) {
+				document.getElementById(id1).focus()
+				document.getElementById(id1).select()
+			}
+		} else if (event.keyCode === 39) { // 向右箭头
+			if (id3 != '' && document.getElementById(id2).selectionStart == document.getElementById(id2).value
+				.length) {
+				if (id2 == '备注') {
+					document.getElementById(id3).focus()
+					document.getElementById(id3).select()
+					enterDialog1()
+				} else {
+					document.getElementById(id3).focus()
+					document.getElementById(id3).select()
+				}
+			}
+		}
+	}
+	const AddDel = (value) => {
+		if (typeof(lastCellValue) == 'object') {
 			ElMessage({
-			  type: 'success',
-			  message: '删除成功',
+				type: 'warning',
+				message: '未选中记录',
 			})
-			//刷新侧边栏
-			getTabdata()
-			//刷新页面
-			getTableData()
+			return
 		}
-	})
-}
-const ADD=ref('0')
-//新增
-const onAdd = () => {
-	type.value = 'create'
-	ADD.value='新增'
-	initFormData()
-	dialogFormVisible.value = true
-	// Productionadd()
-}
-//新增
-const Reportadd = async () => {
-  const response = await reportadd();
-  if (response.code === 0) {
-  }
-  getTableData()
-}
-//删除
-function onDel() {
-	AddDel()
-}
-// 导出excel
-function exportExcel() {
-  console.log('导出到excel');
-}
-
-// 生命周期钩子
-onMounted(async () => {
-});
-</script>
-
-<style>
-.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;
-}
-
-/* 选中某行时的背景色*/
-.el-table__body tr.current-row>td {
-  background: #ff80ff !important;
-  /* 背景颜色 */
-}
+		ElMessageBox.confirm(
+			`确认删除这条数据么?`,
+			'警告', {
+				confirmButtonText: '确认',
+				cancelButtonText: '取消',
+				type: 'warning',
+			}
+		).then(async () => {
+			const response = await adddel({
+				UniqId: lastCellValue
+			});
+			if (response.code === 0) {
+				ElMessage({
+					type: 'success',
+					message: '删除成功',
+				})
+				//刷新侧边栏
+				getTabdata()
+				//刷新页面
+				getTableData()
+			}
+		})
+	}
+	const ADD = ref('0')
+	//新增
+	const onAdd = () => {
+		type.value = 'create'
+		ADD.value = '新增'
+		initFormData()
+		dialogFormVisible.value = true
+		// Productionadd()
+	}
+	//新增
+	const Reportadd = async () => {
+		const response = await reportadd();
+		if (response.code === 0) {}
+		getTableData()
+	}
+	//删除
+	function onDel() {
+		AddDel()
+	}
+	// 导出excel
+	function exportExcel() {
+		console.log('导出到excel');
+	}
+
+	// 生命周期钩子
+	onMounted(async () => {});
+</script>
+
+<style>
+	.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;
+	}
+
+	/* 选中某行时的背景色*/
+	.el-table__body tr.current-row>td {
+		background: #ff80ff !important;
+		/* 背景颜色 */
+	}
 </style>
-<style scoped>
-:deep(.el-table td .cell) {
-  line-height: 20px !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;
-}
+<style scoped>
+	:deep(.el-table td .cell) {
+		line-height: 20px !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;
+	}
 </style>