liuhairui 1 năm trước cách đây
mục cha
commit
0fda3c2f32

+ 253 - 323
src/view/performance/baozhuangbaogong.vue

@@ -39,7 +39,7 @@
 					<!-- 假设 activeButtonValue 是从后端或某个方法获取的,这里直接硬编码为 0 或 1 -->  
 					<div  
 						:class="{'info-button': activeButtonValue === '1', 'default-button': activeButtonValue !== '1'}"  
-						style="margin-top:-20px;margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
+						style="margin-top:-20px; margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
 						:style="{ backgroundColor: activeButtonValue === '1' ? '#ff0000' : '#808080' }"  
 					>  
@@ -53,7 +53,8 @@
 					</div>  
 					</el-form-item>  
 				</el-row>  
-				
+					
+
 
 				<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 0px;">
 					<div @contextmenu.prevent>
@@ -84,9 +85,6 @@
 						<el-button type="primary" @click="add_Dialog" 	 style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
 					</div>
 			</div>
-  
-
-  
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
@@ -158,11 +156,17 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
-  //物理地址获取机台编号
+//全局接口接受的物理地址
+const Machine = '68-ED-A4-26-5F-39'
+//全局获取code,接口接收code
+const _code = '包装'
+//全局获取UniqId
+const UniqId = ref('')
+
+//物理地址获取机台编号
 const getMachineMacdata = async () => {
   try {
-	const Machine = '68-ED-A4-26-5F-38'
-    const data  = await getMachineMac({sys_sbID:Machine,code:'包装'});
+    const data  = await getMachineMac({sys_sbID:Machine,code:_code});
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -172,45 +176,46 @@ const getMachineMacdata = async () => {
   }
 }
 getMachineMacdata();
-
-
-//点击【查询】按钮DC2408001-1,01,8,10,0
+//搜索
 const add_searchInfo = ref('')
+//表格
 const add_tableData = reactive([]);
+//尾包选中值
 const activeButtonValue = ref('')
-const UniqId = ref('')
-//全局获取颜色款式款号
-const _yskskh= ref('')
+//代表扫描两次自动保存
+const searcs = ref('')
+
+//查询询钮
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
-      ElMessage({type: 'warning',message: '请扫描小票二维码' })
+	ElMessage({type: 'warning',message: '请扫描小票二维码' })
   }else{
-    const order =add_searchInfo.value;
-	const sys_sbID = add_formData['机台号']
-	const getSpotLists = await getSpotList({order:order,code:'包装',sys_sbID:sys_sbID,code:'包装'});
-	activeButtonValue.value = getSpotLists.data.result.wb
-    UniqId.value = getSpotLists.data.result.UniqId
-	add_formData['数量'] = getSpotLists.data.result.sl
-	add_formData['尺码'] = getSpotLists.data.result.cm
-	//获取下面报工历史记录
-	add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+	if(searcs.value === ''){
+		 const order =add_searchInfo.value;
+		 const sys_sbID = add_formData['机台号']
+		 //获取下面报工历史记录
+		 const getSpotLists = await getSpotList({order:order,code:_code,sys_sbID:sys_sbID});
+		 activeButtonValue.value = getSpotLists.data.result.wb
+		 UniqId.value = getSpotLists.data.result.UniqId
+		 add_formData['数量'] = getSpotLists.data.result.sl
+		 add_formData['尺码'] = getSpotLists.data.result.cm
+		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+		 searcs.value = 1;
+	}else{
+		 add_Dialog();
+	}
   }
 }
-
-  
-  const AttendanceVisible=ref(false)
-
-  
-  //清空对象的属性值
-  const gd_clearFormData = () => {
+const AttendanceVisible=ref(false)
+//清空对象的属性值
+const gd_clearFormData = () => {
 	Object.keys(add_formData).forEach(key => {
 	  add_formData[key] = '';
 	});
-  };
-
-  const add_formData = reactive({
+};
+const add_formData = reactive({
 	机台号: '',	
 	工序: '',
 	组别: '',
@@ -218,307 +223,232 @@ const add_onSubmit = async ()=>{
 	尺码: '',
 	数量: '',
 	是否订单尾包: '',
-  });
-  
-
-  const currentSlValue=ref('')
+});
+const currentSlValue=ref('')
 //后道确认按钮
 const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
     ElMessage({type: 'warning',message: '请勾选具体的出库订单后,再操作此功能'})
   }else{
-			console.log(UniqId)
-			// 检查paramsList是否为空  
-			if (add_formData.数量 && add_formData.数量 !== '') {  
-				// 假设search函数可以处理一个包含多个参数的数组  
-				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
-				const cf_gettab = await search({UniqId:UniqId._value,code:'包装'}); // 调用search函数  
-				if (cf_gettab.code === 0) {  
-					const firstPart = add_searchInfo.value.split(',')[0];  
-					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
-					console.log(lsjltable)
-					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
-					add_searchInfo.value = '';  
-					setTimeout(() => {
-						const inputElement = document.getElementById('searchInput');
-						if (inputElement) {
-							inputElement.focus();		
-						}
-					}, 100); // 延迟100毫秒
-					ElMessage({type: 'success', message: '报工成功'});  
-				} else {  
-					ElMessage({type: 'error', message: '报工失败'});  
-				}  
-			} else {  
-				ElMessage({type: 'info', message: '没有选中要报工的数据'});  
-			}
+		console.log(UniqId.value)
+		// return false;
+		const cf_gettab = await search({UniqId:UniqId.value,code:_code}); // 调用search函数  
+		if (cf_gettab.code === 0) {
+			const firstPart = add_searchInfo.value.split(',')[0];  
+			const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+			console.log(lsjltable)
+			add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
+			add_searchInfo.value = '';  
+			setTimeout(() => {
+				const inputElement = document.getElementById('searchInput');
+				if (inputElement) {
+					inputElement.focus();		
+				}
+			}, 100); // 延迟100毫秒
+			searcs.value = '';
+			ElMessage({type: 'success', message: '报工成功'});  
+		}
+
   }
 }
-	//  AttendanceVisible.value = false
-  // 新增取消
-  const add_closeDialog = () => {
-	   AttendanceVisible.value = false
-  };
-
+//单机
+const add_tableRowClick = async (row) => {
+roww.value = row
+}
+//双击
+const add_updateCompanyFunc = async (row) => {
 
- 
-  
-  
+}
+//右键
+const handleRightClick = async (row) => {
 
-  //单机
-  const add_tableRowClick = async (row) => {
-	roww.value = row
-  }
-  //双击
-  const add_updateCompanyFunc = async (row) => {
-  
-  }
-  //右键
-  const handleRightClick = async (row) => {
-  
-  }
-  //复选框
-  const add_xpSelectionChange = async (selection) => {
-	  console.log(selection.length)
-	  selectedRows.value = selection; 
-	  if (selection.length === 0) {
-		  ElMessage({type: 'warning', message: '请勾选打印的数据' });
-		  return false;
-	  }else if(selection.length>0){
-		  allPrintData.value = selection.map((row) => {
-		  let weibao = row['是否尾包'] === '是' ? 1 : 0;
-		  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
-		  return {
-			  emm: ewm,
-			  zddbh: row['子订单编号'],
-			  kh: row['款号'],
-			  pm: row['款式'],
-			  ys: row['颜色'],
-			  cm: row['尺码'],
-			  sl: row['数量'],
-			  zb: row['组别'],
-			  dyrq: currentDates,
-			  wb: row['尾包']
-		  };
-	  });
-	  }else{
-		  allPrintData.value = [];
-	  }
-	  console.log(allPrintData.value)
+}
+//复选框
+const add_xpSelectionChange = async (selection) => {
+  console.log(selection.length)
+  selectedRows.value = selection; 
+  if (selection.length === 0) {
+	  ElMessage({type: 'warning', message: '请勾选打印的数据' });
+	  return false;
+  }else if(selection.length>0){
+	  allPrintData.value = selection.map((row) => {
+	  let weibao = row['是否尾包'] === '是' ? 1 : 0;
+	  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
+	  return {
+		  emm: ewm,
+		  zddbh: row['子订单编号'],
+		  kh: row['款号'],
+		  pm: row['款式'],
+		  ys: row['颜色'],
+		  cm: row['尺码'],
+		  sl: row['数量'],
+		  zb: row['组别'],
+		  dyrq: currentDates,
+		  wb: row['尾包']
+	  };
+  });
+  }else{
+	  allPrintData.value = [];
   }
+  console.log(allPrintData.value)
+}
 
-  // =========== 删除按钮 ===========
-  //记录复选框的值
-  const bgSelection = ref(null)
-  const baogong_del = () => {
-	  if(bgSelection.value === null || bgSelection.value === ''){
-			ElMessage({type: 'warning',message: '请选择删除的数据' })
-	  }else{
-		   console.log(bgSelection.value)
-	  }
-  }
-  
-  // 保存当前选中的行数据
-  const table_selectrows = ref([]);
-  
-  // 表格复选框选中变化时触发
-  const table_SelectionChange = (val) => {
-	  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+// =========== 删除按钮 ===========
+//记录复选框的值
+const bgSelection = ref(null)
+const baogong_del = () => {
+  if(bgSelection.value === null || bgSelection.value === ''){
+		ElMessage({type: 'warning',message: '请选择删除的数据' })
+  }else{
+	   console.log(bgSelection.value)
   }
+}
   
-  
+// 保存当前选中的行数据
+const table_selectrows = ref([]);
 
-  // =========== 修改 ===========
-  const dialogFormVisible = ref(false)
-  const edit_formData = ref({})
-  // 双击修改
-  const updateCompanyFunc = async (row) => {
-	  console.log(row)
-	  dialogFormVisible.value = true;
-	  Object.assign(edit_formData.value,row);
-	  edit_formData.value['是否订单尾包'] = row['是否尾包'];
-	// let code = row['员工编号'];
-	// const getStaffInfo_data = await getStaffInfo({code:code});
-	// formDataTest.value = getStaffInfo_data.data;
-  };
-  
-  // 弹窗修改确定
-  const edit_Dialog = async () => {
-	  _ygjbzledit();
-  }
-  
-  // 弹窗修改关闭
-  const edit_closeDialog = () => {
-	  dialogFormVisible.value = false
-  }
-  
-  const _ygjbzledit = async ()=>{
-	// const formattedData = {
-	//   '订单子编号': edit_formData.value['订单子编号'],
-	//   '订单号': edit_formData.value['订单号'],
-	//   '生产款号': edit_formData.value['生产款号'],
-	//   '款式': edit_formData.value['款式'],
-	//   '颜色': edit_formData.value['颜色'],
-	//   '制单总数': edit_formData.value['制单总数'],
-	//   '组别': edit_formData.value['组别'],
-	//   '排产单数': edit_formData.value['排产单数'],
-	//   '尺码': edit_formData.value['尺码'],
-	//   '报工数量': edit_formData.value['报工数量'],
-	//   '是否为尾包': edit_formData.value['是否为尾包'],
-	//   '工序': edit_formData.value['工序'],
-	//   '验片人': edit_formData.value['验片人'],
-	//   '日期': edit_formData.value['日期'],
-	// };
-	// try {
-	//   const edid_edit_formData = await 修改接口(formattedData);
-	//   if (edid_edit_formData .code === 0) {
-	//     dialogFormVisible.value = false;
-	//     ElMessage({type: 'success',message: '更新成功'})
-	//   } else {
-	//     ElMessage({ type: 'error',message: '更新失败'})
-	//   }
-	// } catch (error) {
-	//   console.error(error);
-	// }
-  }
-  
-  // =========== 分页 ===========
-  // 分页相关的响应式变量
-  const page = ref(1)
-  const total = ref(0)
-  const pageSize = ref(10)
-  // 分页
-  const handleCurrentChange = (val) => {
-	page.value = val;
-	_getStaffList();
-  };
-  
-  // 修改页面容量 点击多少条/页
-  const handleSizeChange = (val) => {
-	page.value = 10;//默认显示
-	pageSize.value = val;
-	_getStaffList();
-  };
-  </script>
-  <style scoped>
-  .form-container {
-	display: flex;
-	flex-wrap: wrap;
-  }
-  
-  .form-column {
-	/*flex: 1;*/
-	margin-right: 15px; /* 调整列之间的间距 */
-  }
-  /* 左侧输入框宽度调整 */
-  .form-column .el-form-item .el-input {
-	width: 150px; /* 调整左侧输入框的宽度 */
-  }
-  
-  /* 媒体查询,根据需要调整断点 */
-  @media screen and (max-width: 768px) {
-	.form-column {
-	  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
-	  margin-right: 0;
-	}
-  }
-  /* 表格复选框大小调整 */
-  :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
-	  width: 30px; /* 复选框宽度 */
-	  height: 20px; /* 复选框高度 */
-  }
-  
-  :deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
-	  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
-	  top: 5%; /* 调整对勾位置 */
-	  left: 40%; /* 调整对勾位置 */
-	  width: 5px; /* 调整对勾宽度 */
-	  height: 9px; /* 调整对勾高度 */
-  }
-  
-  /*:deep(.el-table td .cell) {*/
-  /*  line-height: 30px !important;*/
-  /*}*/
-  .JKWTree-container {
-	display: flex;
-  }
-  .JKWTree-tree {
-	/*width: 300px;*/
-	background-color: #fff;
-	padding: 10px;
-	margin-right: 20px;
-  }
-  .JKWTree-tree h3 {
-	font-size: 15px;
-	font-weight: 700;
-	margin: 10px 0;
-  }
-  .JKWTree-content {
-	flex: 1;
-  }
-  /* 图片上传 */
-  .upload-box {
-	width: 200px;
-	height: 200px;
-	border: 2px dashed #e2e2e2;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	position: relative;
-	cursor: pointer;
-  }
-  .uploaded-image {
-	width: 100%;
-	height: 100%;
-	object-fit: cover;
-  }
-  .upload-icon {
-	font-size: 40px;
-	color: #c0c4cc;
-  }
-  .file-input {
-	display: none;
-  }
-  .el-table .warning-row {
-	background: oldlace;
-  }
+// 表格复选框选中变化时触发
+const table_SelectionChange = (val) => {
+  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+}
   
-  /* 选中某行时的背景色 */
-  :deep(.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;
-  }
-  /* 点击按钮改变颜色 */
-  .active-button {  
-	  background-color: #ff0000;
-  }
-  .default-button {  
-	  background-color: #808080;
-  }
-  </style>
-  
+ 
+// =========== 分页 ===========
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+page.value = val;
+_getStaffList();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+page.value = 10;//默认显示
+pageSize.value = val;
+_getStaffList();
+};
+</script>
+<style scoped>
+.form-container {
+display: flex;
+flex-wrap: wrap;
+}
+
+.form-column {
+/*flex: 1;*/
+margin-right: 15px; /* 调整列之间的间距 */
+}
+/* 左侧输入框宽度调整 */
+.form-column .el-form-item .el-input {
+width: 150px; /* 调整左侧输入框的宽度 */
+}
+
+/* 媒体查询,根据需要调整断点 */
+@media screen and (max-width: 768px) {
+.form-column {
+  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+  margin-right: 0;
+}
+}
+/* 表格复选框大小调整 */
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+  width: 30px; /* 复选框宽度 */
+  height: 20px; /* 复选框高度 */
+}
+
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
+  top: 5%; /* 调整对勾位置 */
+  left: 40%; /* 调整对勾位置 */
+  width: 5px; /* 调整对勾宽度 */
+  height: 9px; /* 调整对勾高度 */
+}
+
+/*:deep(.el-table td .cell) {*/
+/*  line-height: 30px !important;*/
+/*}*/
+.JKWTree-container {
+display: flex;
+}
+.JKWTree-tree {
+/*width: 300px;*/
+background-color: #fff;
+padding: 10px;
+margin-right: 20px;
+}
+.JKWTree-tree h3 {
+font-size: 15px;
+font-weight: 700;
+margin: 10px 0;
+}
+.JKWTree-content {
+flex: 1;
+}
+/* 图片上传 */
+.upload-box {
+width: 200px;
+height: 200px;
+border: 2px dashed #e2e2e2;
+display: flex;
+justify-content: center;
+align-items: center;
+position: relative;
+cursor: pointer;
+}
+.uploaded-image {
+width: 100%;
+height: 100%;
+object-fit: cover;
+}
+.upload-icon {
+font-size: 40px;
+color: #c0c4cc;
+}
+.file-input {
+display: none;
+}
+.el-table .warning-row {
+background: oldlace;
+}
+
+/* 选中某行时的背景色 */
+:deep(.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;
+}
+/* 点击按钮改变颜色 */
+.active-button {  
+  background-color: #ff0000;
+}
+.default-button {  
+  background-color: #808080;
+}
+</style>

+ 62 - 45
src/view/performance/chafengbaogong.vue

@@ -187,11 +187,19 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
-  //物理地址获取机台编号
+
+//全局接口接受的物理地址
+const Machine = '68-ED-A4-26-60-84'
+//全局获取code,接口接收code
+const _code = '车缝'
+//全局获取UniqId
+const UniqId = ref('')
+
+
+//物理地址获取机台编号
 const getMachineMacdata = async () => {
   try {
-	const Machine = '68-ED-A4-26-60-84'
-    const data  = await getMachineMac({sys_sbID:Machine,code:'车缝'});
+    const data  = await getMachineMac({sys_sbID:Machine,code:_code});
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -202,7 +210,7 @@ const getMachineMacdata = async () => {
 }
 getMachineMacdata();
 
-  // 尺码
+// 尺码
 const cmformdata = reactive({
   cm1:'',
   cm2:'',
@@ -216,7 +224,7 @@ const cmformdata = reactive({
   cm10:'',
   cm11:'合计',
 });
-// 制单数
+// 制单数/实裁量
 const zdscformdata = reactive({
   zdsc1:'',
   zdsc2:'',
@@ -244,59 +252,68 @@ const slformdata = reactive({
   sl10:'',
   sctotal:'',
 });
-
-//点击【查询】按钮
+//搜索
 const add_searchInfo = ref('')
+//表格
 const add_tableData = reactive([]);
 //全局获取颜色款式款号
 const _yskskh= ref('')
+//代表扫描两次自动保存
+const searcs = ref('')
+
+//点击【查询】按钮
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
       ElMessage({type: 'warning',message: '请扫描小票二维码' })
   }else{
-    const order =add_searchInfo.value;
-	const sys_sbID = add_formData['机台号']
-	const getSpotLists = await getSpotList({order:order,code:'车缝',sys_sbID:sys_sbID});
-	 _yskskh.value = getSpotLists.data.list[0]
-
-	//获取上面信息
-	const keys1 = ['cm1', 'cm2', 'cm3', 'cm4','cm5','cm6','cm7','cm8','cm9','cm10',];
-	const keys2 = ['zdsc1', 'zdsc2', 'zdsc3', 'zdsc4','zdsc5','zdsc6','zdsc7','zdsc8','zdsc9','zdsc10','zdtotal',];
-	if(order.includes('-')){
-		for (let key of keys1) {  
-			if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中  
-				cmformdata[key] = getSpotLists.data.list[0][key];  
-			}  
-		}  
-		for (let key of keys2) {  
-			if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中  
-				zdscformdata[key] = getSpotLists.data.list[0][key];  
-			}  
-		}  
-		setTimeout(() => {
-        const inputElement = document.getElementById('scs1');
-        if (inputElement) {
-            inputElement.focus();		
-        }
-    }, 100); // 延迟100毫秒
-	}else{
-		for (let key of keys1) {  
-			cmformdata[key] = '';  
-		}  
-		for (let key of keys2) {  
-			zdscformdata[key] = '';  
-		}   
-	}
-	//获取下面报工历史记录
-	add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+	  if(searcs.value === ''){
+	  	 const order =add_searchInfo.value;
+	  	 const sys_sbID = add_formData['机台号']
+	  	 //获取下面报工历史记录
+	  	 const getSpotLists = await getSpotList({order:order,code:_code,sys_sbID:sys_sbID});
+	  	  _yskskh.value = getSpotLists.data.list[0]
+	  	  
+	  	 //获取尺码、制单数/实裁量上面信息
+	  	 const keys1 = ['cm1', 'cm2', 'cm3', 'cm4','cm5','cm6','cm7','cm8','cm9','cm10',];
+	  	 const keys2 = ['zdsc1', 'zdsc2', 'zdsc3', 'zdsc4','zdsc5','zdsc6','zdsc7','zdsc8','zdsc9','zdsc10','zdtotal',];
+	  	 
+	  	 //如果搜索是子订单编号    不是
+	  	 if(order.includes('-')){
+	  	 	for (let key of keys1) {  
+	  	 		if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中  
+	  	 			cmformdata[key] = getSpotLists.data.list[0][key];  
+	  	 		}  
+	  	 	}  
+	  	 	for (let key of keys2) {  
+	  	 		if (getSpotLists.data.list[0].hasOwnProperty(key)) { // 确保键存在于对象中  
+	  	 			zdscformdata[key] = getSpotLists.data.list[0][key];  
+	  	 		}  
+	  	 	}  
+	  	 	setTimeout(() => {
+	  	     const inputElement = document.getElementById('scs1');
+	  	     if (inputElement) {
+	  	         inputElement.focus();		
+	  	     }
+	  	 }, 100); // 延迟100毫秒
+	  	 }else{
+	  	 	for (let key of keys1) {  
+	  	 		cmformdata[key] = '';  
+	  	 	}  
+	  	 	for (let key of keys2) {  
+	  	 		zdscformdata[key] = '';  
+	  	 	}   
+	  	 }
+	  	 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+	  	 searcs.value = 1;
+	  }else{
+	  	 add_Dialog();
+	  }
   }
 }
-
   
   const AttendanceVisible=ref(false)
-
   
   //清空对象的属性值
   const gd_clearFormData = () => {
@@ -322,7 +339,6 @@ const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
     ElMessage({type: 'warning',message: '请勾选具体的出库订单后,再操作此功能'})
   }else{
-
 	let cmArray = [cmformdata.cm1, cmformdata.cm2,cmformdata.cm3,cmformdata.cm4,cmformdata.cm5,cmformdata.cm6,cmformdata.cm7,cmformdata.cm8,cmformdata.cm9,cmformdata.cm10,];
 	let zdscArray = [zdscformdata.zdsc1, zdscformdata.zdsc2,zdscformdata.zdsc3,zdscformdata.zdsc4,zdscformdata.zdsc5,zdscformdata.zdsc6,zdscformdata.zdsc7,zdscformdata.zdsc8,zdscformdata.zdsc9,zdscformdata.zdsc10,]; 
 	let slArray = [slformdata.sl1, slformdata.sl2,slformdata.sl3,slformdata.sl4,slformdata.sl5,slformdata.sl6,slformdata.sl7,slformdata.sl8,slformdata.sl9,slformdata.sl10,]; 
@@ -372,6 +388,7 @@ const add_Dialog = async ()=>{
 		console.log(lsjltable)
 		add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
 		add_searchInfo.value = ''; // 清除选择  
+		searcs.value = '';
 		ElMessage({ type: 'success', message: '报工成功' });  
 	}  
  }

+ 253 - 319
src/view/performance/datangbaogong.vue

@@ -39,7 +39,7 @@
 					<!-- 假设 activeButtonValue 是从后端或某个方法获取的,这里直接硬编码为 0 或 1 -->  
 					<div  
 						:class="{'info-button': activeButtonValue === '1', 'default-button': activeButtonValue !== '1'}"  
-						style="margin-top:-20px;margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
+						style="margin-top:-20px; margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
 						:style="{ backgroundColor: activeButtonValue === '1' ? '#ff0000' : '#808080' }"  
 					>  
@@ -53,6 +53,8 @@
 					</div>  
 					</el-form-item>  
 				</el-row>  
+					
+
 
 				<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 0px;">
 					<div @contextmenu.prevent>
@@ -154,11 +156,17 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
-  //物理地址获取机台编号
+//全局接口接受的物理地址
+const Machine = '68-ED-A4-16-7F-37'
+//全局获取code,接口接收code
+const _code = '大烫'
+//全局获取UniqId
+const UniqId = ref('')
+
+//物理地址获取机台编号
 const getMachineMacdata = async () => {
   try {
-	const Machine = '68-ED-A4-16-7F-36'
-    const data  = await getMachineMac({sys_sbID:Machine,code:'大烫'});
+    const data  = await getMachineMac({sys_sbID:Machine,code:_code});
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -168,45 +176,46 @@ const getMachineMacdata = async () => {
   }
 }
 getMachineMacdata();
-
-
-//点击【查询】按钮DC2408001-1,01,8,10,0
+//搜索
 const add_searchInfo = ref('')
+//表格
 const add_tableData = reactive([]);
+//尾包选中值
 const activeButtonValue = ref('')
-const UniqId = ref('')
-//全局获取颜色款式款号
-const _yskskh= ref('')
+//代表扫描两次自动保存
+const searcs = ref('')
+
+//查询询钮
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
-      ElMessage({type: 'warning',message: '请扫描小票二维码' })
+	ElMessage({type: 'warning',message: '请扫描小票二维码' })
   }else{
-    const order =add_searchInfo.value;
-	const sys_sbID = add_formData['机台号']
-	const getSpotLists = await getSpotList({order:order,code:'大烫',sys_sbID:sys_sbID});
-	activeButtonValue.value = getSpotLists.data.result.wb
-    UniqId.value = getSpotLists.data.result.UniqId
-	add_formData['数量'] = getSpotLists.data.result.sl
-	add_formData['尺码'] = getSpotLists.data.result.cm
-	//获取下面报工历史记录
-	add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+	if(searcs.value === ''){
+		 const order =add_searchInfo.value;
+		 const sys_sbID = add_formData['机台号']
+		 //获取下面报工历史记录
+		 const getSpotLists = await getSpotList({order:order,code:_code,sys_sbID:sys_sbID});
+		 activeButtonValue.value = getSpotLists.data.result.wb
+		 UniqId.value = getSpotLists.data.result.UniqId
+		 add_formData['数量'] = getSpotLists.data.result.sl
+		 add_formData['尺码'] = getSpotLists.data.result.cm
+		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+		 searcs.value = 1;
+	}else{
+		 add_Dialog();
+	}
   }
 }
-
-  
-  const AttendanceVisible=ref(false)
-
-  
-  //清空对象的属性值
-  const gd_clearFormData = () => {
+const AttendanceVisible=ref(false)
+//清空对象的属性值
+const gd_clearFormData = () => {
 	Object.keys(add_formData).forEach(key => {
 	  add_formData[key] = '';
 	});
-  };
-
-  const add_formData = reactive({
+};
+const add_formData = reactive({
 	机台号: '',	
 	工序: '',
 	组别: '',
@@ -214,307 +223,232 @@ const add_onSubmit = async ()=>{
 	尺码: '',
 	数量: '',
 	是否订单尾包: '',
-  });
-  
-
-  const currentSlValue=ref('')
+});
+const currentSlValue=ref('')
 //后道确认按钮
 const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
     ElMessage({type: 'warning',message: '请勾选具体的出库订单后,再操作此功能'})
   }else{
-			console.log(UniqId)
-			// 检查paramsList是否为空  
-			if (add_formData.数量 && add_formData.数量 !== '') {  
-				// 假设search函数可以处理一个包含多个参数的数组  
-				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
-				const cf_gettab = await search({UniqId:UniqId._value,code:'大烫'}); // 调用search函数  
-				if (cf_gettab.code === 0) {  
-					const firstPart = add_searchInfo.value.split(',')[0];  
-					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
-					console.log(lsjltable)
-					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
-					add_searchInfo.value = '';  
-					setTimeout(() => {
-						const inputElement = document.getElementById('searchInput');
-						if (inputElement) {
-							inputElement.focus();		
-						}
-					}, 100); // 延迟100毫秒
-					ElMessage({type: 'success', message: '报工成功'});  
-				} else {  
-					ElMessage({type: 'error', message: '报工失败'});  
-				}  
-			} else {  
-				ElMessage({type: 'info', message: '没有选中要报工的数据'});  
-			}
+		console.log(UniqId.value)
+		// return false;
+		const cf_gettab = await search({UniqId:UniqId.value,code:_code}); // 调用search函数  
+		if (cf_gettab.code === 0) {
+			const firstPart = add_searchInfo.value.split(',')[0];  
+			const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+			console.log(lsjltable)
+			add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
+			add_searchInfo.value = '';  
+			setTimeout(() => {
+				const inputElement = document.getElementById('searchInput');
+				if (inputElement) {
+					inputElement.focus();		
+				}
+			}, 100); // 延迟100毫秒
+			searcs.value = '';
+			ElMessage({type: 'success', message: '报工成功'});  
+		}
+
   }
 }
-	//  AttendanceVisible.value = false
-  // 新增取消
-  const add_closeDialog = () => {
-	   AttendanceVisible.value = false
-  };
-
+//单机
+const add_tableRowClick = async (row) => {
+roww.value = row
+}
+//双击
+const add_updateCompanyFunc = async (row) => {
 
- 
-  
-  
+}
+//右键
+const handleRightClick = async (row) => {
 
-  //单机
-  const add_tableRowClick = async (row) => {
-	roww.value = row
-  }
-  //双击
-  const add_updateCompanyFunc = async (row) => {
-  
-  }
-  //右键
-  const handleRightClick = async (row) => {
-  
-  }
-  //复选框
-  const add_xpSelectionChange = async (selection) => {
-	  console.log(selection.length)
-	  selectedRows.value = selection; 
-	  if (selection.length === 0) {
-		  ElMessage({type: 'warning', message: '请勾选打印的数据' });
-		  return false;
-	  }else if(selection.length>0){
-		  allPrintData.value = selection.map((row) => {
-		  let weibao = row['是否尾包'] === '是' ? 1 : 0;
-		  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
-		  return {
-			  emm: ewm,
-			  zddbh: row['子订单编号'],
-			  kh: row['款号'],
-			  pm: row['款式'],
-			  ys: row['颜色'],
-			  cm: row['尺码'],
-			  sl: row['数量'],
-			  zb: row['组别'],
-			  dyrq: currentDates,
-			  wb: row['尾包']
-		  };
-	  });
-	  }else{
-		  allPrintData.value = [];
-	  }
-	  console.log(allPrintData.value)
+}
+//复选框
+const add_xpSelectionChange = async (selection) => {
+  console.log(selection.length)
+  selectedRows.value = selection; 
+  if (selection.length === 0) {
+	  ElMessage({type: 'warning', message: '请勾选打印的数据' });
+	  return false;
+  }else if(selection.length>0){
+	  allPrintData.value = selection.map((row) => {
+	  let weibao = row['是否尾包'] === '是' ? 1 : 0;
+	  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
+	  return {
+		  emm: ewm,
+		  zddbh: row['子订单编号'],
+		  kh: row['款号'],
+		  pm: row['款式'],
+		  ys: row['颜色'],
+		  cm: row['尺码'],
+		  sl: row['数量'],
+		  zb: row['组别'],
+		  dyrq: currentDates,
+		  wb: row['尾包']
+	  };
+  });
+  }else{
+	  allPrintData.value = [];
   }
+  console.log(allPrintData.value)
+}
 
-  // =========== 删除按钮 ===========
-  //记录复选框的值
-  const bgSelection = ref(null)
-  const baogong_del = () => {
-	  if(bgSelection.value === null || bgSelection.value === ''){
-			ElMessage({type: 'warning',message: '请选择删除的数据' })
-	  }else{
-		   console.log(bgSelection.value)
-	  }
-  }
-  
-  // 保存当前选中的行数据
-  const table_selectrows = ref([]);
-  
-  // 表格复选框选中变化时触发
-  const table_SelectionChange = (val) => {
-	  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+// =========== 删除按钮 ===========
+//记录复选框的值
+const bgSelection = ref(null)
+const baogong_del = () => {
+  if(bgSelection.value === null || bgSelection.value === ''){
+		ElMessage({type: 'warning',message: '请选择删除的数据' })
+  }else{
+	   console.log(bgSelection.value)
   }
+}
   
-  
+// 保存当前选中的行数据
+const table_selectrows = ref([]);
 
-  // =========== 修改 ===========
-  const dialogFormVisible = ref(false)
-  const edit_formData = ref({})
-  // 双击修改
-  const updateCompanyFunc = async (row) => {
-	  console.log(row)
-	  dialogFormVisible.value = true;
-	  Object.assign(edit_formData.value,row);
-	  edit_formData.value['是否订单尾包'] = row['是否尾包'];
-	// let code = row['员工编号'];
-	// const getStaffInfo_data = await getStaffInfo({code:code});
-	// formDataTest.value = getStaffInfo_data.data;
-  };
-  
-  // 弹窗修改确定
-  const edit_Dialog = async () => {
-	  _ygjbzledit();
-  }
-  
-  // 弹窗修改关闭
-  const edit_closeDialog = () => {
-	  dialogFormVisible.value = false
-  }
-  
-  const _ygjbzledit = async ()=>{
-	// const formattedData = {
-	//   '订单子编号': edit_formData.value['订单子编号'],
-	//   '订单号': edit_formData.value['订单号'],
-	//   '生产款号': edit_formData.value['生产款号'],
-	//   '款式': edit_formData.value['款式'],
-	//   '颜色': edit_formData.value['颜色'],
-	//   '制单总数': edit_formData.value['制单总数'],
-	//   '组别': edit_formData.value['组别'],
-	//   '排产单数': edit_formData.value['排产单数'],
-	//   '尺码': edit_formData.value['尺码'],
-	//   '报工数量': edit_formData.value['报工数量'],
-	//   '是否为尾包': edit_formData.value['是否为尾包'],
-	//   '工序': edit_formData.value['工序'],
-	//   '验片人': edit_formData.value['验片人'],
-	//   '日期': edit_formData.value['日期'],
-	// };
-	// try {
-	//   const edid_edit_formData = await 修改接口(formattedData);
-	//   if (edid_edit_formData .code === 0) {
-	//     dialogFormVisible.value = false;
-	//     ElMessage({type: 'success',message: '更新成功'})
-	//   } else {
-	//     ElMessage({ type: 'error',message: '更新失败'})
-	//   }
-	// } catch (error) {
-	//   console.error(error);
-	// }
-  }
-  
-  // =========== 分页 ===========
-  // 分页相关的响应式变量
-  const page = ref(1)
-  const total = ref(0)
-  const pageSize = ref(10)
-  // 分页
-  const handleCurrentChange = (val) => {
-	page.value = val;
-	_getStaffList();
-  };
-  
-  // 修改页面容量 点击多少条/页
-  const handleSizeChange = (val) => {
-	page.value = 10;//默认显示
-	pageSize.value = val;
-	_getStaffList();
-  };
-  </script>
-  <style scoped>
-  .form-container {
-	display: flex;
-	flex-wrap: wrap;
-  }
-  
-  .form-column {
-	/*flex: 1;*/
-	margin-right: 15px; /* 调整列之间的间距 */
-  }
-  /* 左侧输入框宽度调整 */
-  .form-column .el-form-item .el-input {
-	width: 150px; /* 调整左侧输入框的宽度 */
-  }
-  
-  /* 媒体查询,根据需要调整断点 */
-  @media screen and (max-width: 768px) {
-	.form-column {
-	  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
-	  margin-right: 0;
-	}
-  }
-  /* 表格复选框大小调整 */
-  :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
-	  width: 30px; /* 复选框宽度 */
-	  height: 20px; /* 复选框高度 */
-  }
-  
-  :deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
-	  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
-	  top: 5%; /* 调整对勾位置 */
-	  left: 40%; /* 调整对勾位置 */
-	  width: 5px; /* 调整对勾宽度 */
-	  height: 9px; /* 调整对勾高度 */
-  }
-  
-  /*:deep(.el-table td .cell) {*/
-  /*  line-height: 30px !important;*/
-  /*}*/
-  .JKWTree-container {
-	display: flex;
-  }
-  .JKWTree-tree {
-	/*width: 300px;*/
-	background-color: #fff;
-	padding: 10px;
-	margin-right: 20px;
-  }
-  .JKWTree-tree h3 {
-	font-size: 15px;
-	font-weight: 700;
-	margin: 10px 0;
-  }
-  .JKWTree-content {
-	flex: 1;
-  }
-  /* 图片上传 */
-  .upload-box {
-	width: 200px;
-	height: 200px;
-	border: 2px dashed #e2e2e2;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	position: relative;
-	cursor: pointer;
-  }
-  .uploaded-image {
-	width: 100%;
-	height: 100%;
-	object-fit: cover;
-  }
-  .upload-icon {
-	font-size: 40px;
-	color: #c0c4cc;
-  }
-  .file-input {
-	display: none;
-  }
-  .el-table .warning-row {
-	background: oldlace;
-  }
+// 表格复选框选中变化时触发
+const table_SelectionChange = (val) => {
+  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+}
   
-  /* 选中某行时的背景色 */
-  :deep(.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;
-  }
-  /* 点击按钮改变颜色 */
-  .active-button {  
-	  background-color: #ff0000;
-  }
-  .default-button {  
-	  background-color: #808080;
-  }
-  </style>
-  
+ 
+// =========== 分页 ===========
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+page.value = val;
+_getStaffList();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+page.value = 10;//默认显示
+pageSize.value = val;
+_getStaffList();
+};
+</script>
+<style scoped>
+.form-container {
+display: flex;
+flex-wrap: wrap;
+}
+
+.form-column {
+/*flex: 1;*/
+margin-right: 15px; /* 调整列之间的间距 */
+}
+/* 左侧输入框宽度调整 */
+.form-column .el-form-item .el-input {
+width: 150px; /* 调整左侧输入框的宽度 */
+}
+
+/* 媒体查询,根据需要调整断点 */
+@media screen and (max-width: 768px) {
+.form-column {
+  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+  margin-right: 0;
+}
+}
+/* 表格复选框大小调整 */
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+  width: 30px; /* 复选框宽度 */
+  height: 20px; /* 复选框高度 */
+}
+
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
+  top: 5%; /* 调整对勾位置 */
+  left: 40%; /* 调整对勾位置 */
+  width: 5px; /* 调整对勾宽度 */
+  height: 9px; /* 调整对勾高度 */
+}
+
+/*:deep(.el-table td .cell) {*/
+/*  line-height: 30px !important;*/
+/*}*/
+.JKWTree-container {
+display: flex;
+}
+.JKWTree-tree {
+/*width: 300px;*/
+background-color: #fff;
+padding: 10px;
+margin-right: 20px;
+}
+.JKWTree-tree h3 {
+font-size: 15px;
+font-weight: 700;
+margin: 10px 0;
+}
+.JKWTree-content {
+flex: 1;
+}
+/* 图片上传 */
+.upload-box {
+width: 200px;
+height: 200px;
+border: 2px dashed #e2e2e2;
+display: flex;
+justify-content: center;
+align-items: center;
+position: relative;
+cursor: pointer;
+}
+.uploaded-image {
+width: 100%;
+height: 100%;
+object-fit: cover;
+}
+.upload-icon {
+font-size: 40px;
+color: #c0c4cc;
+}
+.file-input {
+display: none;
+}
+.el-table .warning-row {
+background: oldlace;
+}
+
+/* 选中某行时的背景色 */
+:deep(.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;
+}
+/* 点击按钮改变颜色 */
+.active-button {  
+  background-color: #ff0000;
+}
+.default-button {  
+  background-color: #808080;
+}
+</style>

+ 221 - 287
src/view/performance/houdaoshougong.vue

@@ -4,7 +4,7 @@
 		  <layout-content >
 		  <!-- <el-main> -->
 			<div class="gva-table-box">
-				<h1 style="margin: 0%;margin-bottom: 10px;">后道(手工确认)</h1>
+				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">后道(手工确认)</h1>
 				<el-row :gutter="24" style="margin-bottom: 15px;">
 					<el-input v-model="add_searchInfo" placeholder="扫描标签二维码" 
 								  @keyup.enter="add_onSubmit"
@@ -156,11 +156,17 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
-  //物理地址获取机台编号
+//全局接口接受的物理地址
+const Machine = '68-ED-A4-26-60-D1'
+//全局获取code,接口接收code
+const _code = '后道'
+//全局获取UniqId
+const UniqId = ref('')
+
+//物理地址获取机台编号
 const getMachineMacdata = async () => {
   try {
-	const Machine = '68-ED-A4-26-60-D1'
-    const data  = await getMachineMac({sys_sbID:Machine,code:'后道'});
+    const data  = await getMachineMac({sys_sbID:Machine,code:_code});
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -170,49 +176,46 @@ const getMachineMacdata = async () => {
   }
 }
 getMachineMacdata();
-
-
-//点击【查询】按钮DC2408001-1,01,8,10,0
+//搜索
 const add_searchInfo = ref('')
+//表格
 const add_tableData = reactive([]);
+//尾包选中值
 const activeButtonValue = ref('')
-const UniqId = ref('')
-//全局获取颜色款式款号
-const _yskskh= ref('')
+//代表扫描两次自动保存
 const searcs = ref('')
+
+//查询询钮
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
-      ElMessage({type: 'warning',message: '请扫描小票二维码' })
+	ElMessage({type: 'warning',message: '请扫描小票二维码' })
   }else{
 	if(searcs.value === ''){
 		 const order =add_searchInfo.value;
 		 const sys_sbID = add_formData['机台号']
-		 const getSpotLists = await getSpotList({order:order,code:'后道',sys_sbID:sys_sbID});
+		 //获取下面报工历史记录
+		 const getSpotLists = await getSpotList({order:order,code:_code,sys_sbID:sys_sbID});
 		 activeButtonValue.value = getSpotLists.data.result.wb
 		 UniqId.value = getSpotLists.data.result.UniqId
 		 add_formData['数量'] = getSpotLists.data.result.sl
 		 add_formData['尺码'] = getSpotLists.data.result.cm
-		 //获取下面报工历史记录
-		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
 		 searcs.value = 1;
 	}else{
 		 add_Dialog();
 	}
-   
   }
 }
-
-  const AttendanceVisible=ref(false)
-  //清空对象的属性值
-  const gd_clearFormData = () => {
+const AttendanceVisible=ref(false)
+//清空对象的属性值
+const gd_clearFormData = () => {
 	Object.keys(add_formData).forEach(key => {
 	  add_formData[key] = '';
 	});
-  };
-
-  const add_formData = reactive({
+};
+const add_formData = reactive({
 	机台号: '',	
 	工序: '',
 	组别: '',
@@ -220,10 +223,8 @@ const add_onSubmit = async ()=>{
 	尺码: '',
 	数量: '',
 	是否订单尾包: '',
-  });
-  
-
-  const currentSlValue=ref('')
+});
+const currentSlValue=ref('')
 //后道确认按钮
 const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
@@ -231,7 +232,7 @@ const add_Dialog = async ()=>{
   }else{
 		console.log(UniqId.value)
 		// return false;
-		const cf_gettab = await search({UniqId:UniqId.value,code:'后道'}); // 调用search函数  
+		const cf_gettab = await search({UniqId:UniqId.value,code:_code}); // 调用search函数  
 		if (cf_gettab.code === 0) {
 			const firstPart = add_searchInfo.value.split(',')[0];  
 			const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
@@ -250,271 +251,204 @@ const add_Dialog = async ()=>{
 
   }
 }
-	//  AttendanceVisible.value = false
-  // 新增取消
-  const add_closeDialog = () => {
-	   AttendanceVisible.value = false
-  };
-
+//单机
+const add_tableRowClick = async (row) => {
+roww.value = row
+}
+//双击
+const add_updateCompanyFunc = async (row) => {
 
- 
-  
-  
+}
+//右键
+const handleRightClick = async (row) => {
 
-  //单机
-  const add_tableRowClick = async (row) => {
-	roww.value = row
-  }
-  //双击
-  const add_updateCompanyFunc = async (row) => {
-  
-  }
-  //右键
-  const handleRightClick = async (row) => {
-  
-  }
-  //复选框
-  const add_xpSelectionChange = async (selection) => {
-	  console.log(selection.length)
-	  selectedRows.value = selection; 
-	  if (selection.length === 0) {
-		  ElMessage({type: 'warning', message: '请勾选打印的数据' });
-		  return false;
-	  }else if(selection.length>0){
-		  allPrintData.value = selection.map((row) => {
-		  let weibao = row['是否尾包'] === '是' ? 1 : 0;
-		  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
-		  return {
-			  emm: ewm,
-			  zddbh: row['子订单编号'],
-			  kh: row['款号'],
-			  pm: row['款式'],
-			  ys: row['颜色'],
-			  cm: row['尺码'],
-			  sl: row['数量'],
-			  zb: row['组别'],
-			  dyrq: currentDates,
-			  wb: row['尾包']
-		  };
-	  });
-	  }else{
-		  allPrintData.value = [];
-	  }
-	  console.log(allPrintData.value)
+}
+//复选框
+const add_xpSelectionChange = async (selection) => {
+  console.log(selection.length)
+  selectedRows.value = selection; 
+  if (selection.length === 0) {
+	  ElMessage({type: 'warning', message: '请勾选打印的数据' });
+	  return false;
+  }else if(selection.length>0){
+	  allPrintData.value = selection.map((row) => {
+	  let weibao = row['是否尾包'] === '是' ? 1 : 0;
+	  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
+	  return {
+		  emm: ewm,
+		  zddbh: row['子订单编号'],
+		  kh: row['款号'],
+		  pm: row['款式'],
+		  ys: row['颜色'],
+		  cm: row['尺码'],
+		  sl: row['数量'],
+		  zb: row['组别'],
+		  dyrq: currentDates,
+		  wb: row['尾包']
+	  };
+  });
+  }else{
+	  allPrintData.value = [];
   }
+  console.log(allPrintData.value)
+}
 
-  // =========== 删除按钮 ===========
-  //记录复选框的值
-  const bgSelection = ref(null)
-  const baogong_del = () => {
-	  if(bgSelection.value === null || bgSelection.value === ''){
-			ElMessage({type: 'warning',message: '请选择删除的数据' })
-	  }else{
-		   console.log(bgSelection.value)
-	  }
-  }
-  
-  // 保存当前选中的行数据
-  const table_selectrows = ref([]);
-  
-  // 表格复选框选中变化时触发
-  const table_SelectionChange = (val) => {
-	  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+// =========== 删除按钮 ===========
+//记录复选框的值
+const bgSelection = ref(null)
+const baogong_del = () => {
+  if(bgSelection.value === null || bgSelection.value === ''){
+		ElMessage({type: 'warning',message: '请选择删除的数据' })
+  }else{
+	   console.log(bgSelection.value)
   }
+}
   
-  
+// 保存当前选中的行数据
+const table_selectrows = ref([]);
 
-  // =========== 修改 ===========
-  const dialogFormVisible = ref(false)
-  const edit_formData = ref({})
-  // 双击修改
-  const updateCompanyFunc = async (row) => {
-	  console.log(row)
-	  dialogFormVisible.value = true;
-	  Object.assign(edit_formData.value,row);
-	  edit_formData.value['是否订单尾包'] = row['是否尾包'];
-	// let code = row['员工编号'];
-	// const getStaffInfo_data = await getStaffInfo({code:code});
-	// formDataTest.value = getStaffInfo_data.data;
-  };
-  
-  // 弹窗修改确定
-  const edit_Dialog = async () => {
-	  _ygjbzledit();
-  }
-  
-  // 弹窗修改关闭
-  const edit_closeDialog = () => {
-	  dialogFormVisible.value = false
-  }
-  
-  const _ygjbzledit = async ()=>{
-	// const formattedData = {
-	//   '订单子编号': edit_formData.value['订单子编号'],
-	//   '订单号': edit_formData.value['订单号'],
-	//   '生产款号': edit_formData.value['生产款号'],
-	//   '款式': edit_formData.value['款式'],
-	//   '颜色': edit_formData.value['颜色'],
-	//   '制单总数': edit_formData.value['制单总数'],
-	//   '组别': edit_formData.value['组别'],
-	//   '排产单数': edit_formData.value['排产单数'],
-	//   '尺码': edit_formData.value['尺码'],
-	//   '报工数量': edit_formData.value['报工数量'],
-	//   '是否为尾包': edit_formData.value['是否为尾包'],
-	//   '工序': edit_formData.value['工序'],
-	//   '验片人': edit_formData.value['验片人'],
-	//   '日期': edit_formData.value['日期'],
-	// };
-	// try {
-	//   const edid_edit_formData = await 修改接口(formattedData);
-	//   if (edid_edit_formData .code === 0) {
-	//     dialogFormVisible.value = false;
-	//     ElMessage({type: 'success',message: '更新成功'})
-	//   } else {
-	//     ElMessage({ type: 'error',message: '更新失败'})
-	//   }
-	// } catch (error) {
-	//   console.error(error);
-	// }
-  }
-  
-  // =========== 分页 ===========
-  // 分页相关的响应式变量
-  const page = ref(1)
-  const total = ref(0)
-  const pageSize = ref(10)
-  // 分页
-  const handleCurrentChange = (val) => {
-	page.value = val;
-	_getStaffList();
-  };
-  
-  // 修改页面容量 点击多少条/页
-  const handleSizeChange = (val) => {
-	page.value = 10;//默认显示
-	pageSize.value = val;
-	_getStaffList();
-  };
-  </script>
-  <style scoped>
-  .form-container {
-	display: flex;
-	flex-wrap: wrap;
-  }
-  
-  .form-column {
-	/*flex: 1;*/
-	margin-right: 15px; /* 调整列之间的间距 */
-  }
-  /* 左侧输入框宽度调整 */
-  .form-column .el-form-item .el-input {
-	width: 150px; /* 调整左侧输入框的宽度 */
-  }
-  
-  /* 媒体查询,根据需要调整断点 */
-  @media screen and (max-width: 768px) {
-	.form-column {
-	  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
-	  margin-right: 0;
-	}
-  }
-  /* 表格复选框大小调整 */
-  :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
-	  width: 30px; /* 复选框宽度 */
-	  height: 20px; /* 复选框高度 */
-  }
-  
-  :deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
-	  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
-	  top: 5%; /* 调整对勾位置 */
-	  left: 40%; /* 调整对勾位置 */
-	  width: 5px; /* 调整对勾宽度 */
-	  height: 9px; /* 调整对勾高度 */
-  }
-  
-  /*:deep(.el-table td .cell) {*/
-  /*  line-height: 30px !important;*/
-  /*}*/
-  .JKWTree-container {
-	display: flex;
-  }
-  .JKWTree-tree {
-	/*width: 300px;*/
-	background-color: #fff;
-	padding: 10px;
-	margin-right: 20px;
-  }
-  .JKWTree-tree h3 {
-	font-size: 15px;
-	font-weight: 700;
-	margin: 10px 0;
-  }
-  .JKWTree-content {
-	flex: 1;
-  }
-  /* 图片上传 */
-  .upload-box {
-	width: 200px;
-	height: 200px;
-	border: 2px dashed #e2e2e2;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	position: relative;
-	cursor: pointer;
-  }
-  .uploaded-image {
-	width: 100%;
-	height: 100%;
-	object-fit: cover;
-  }
-  .upload-icon {
-	font-size: 40px;
-	color: #c0c4cc;
-  }
-  .file-input {
-	display: none;
-  }
-  .el-table .warning-row {
-	background: oldlace;
-  }
+// 表格复选框选中变化时触发
+const table_SelectionChange = (val) => {
+  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+}
   
-  /* 选中某行时的背景色 */
-  :deep(.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;
-  }
-  /* 点击按钮改变颜色 */
-  .active-button {  
-	  background-color: #ff0000;
-  }
-  .default-button {  
-	  background-color: #808080;
-  }
-  </style>
-  
+ 
+// =========== 分页 ===========
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+page.value = val;
+_getStaffList();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+page.value = 10;//默认显示
+pageSize.value = val;
+_getStaffList();
+};
+</script>
+<style scoped>
+.form-container {
+display: flex;
+flex-wrap: wrap;
+}
+
+.form-column {
+/*flex: 1;*/
+margin-right: 15px; /* 调整列之间的间距 */
+}
+/* 左侧输入框宽度调整 */
+.form-column .el-form-item .el-input {
+width: 150px; /* 调整左侧输入框的宽度 */
+}
+
+/* 媒体查询,根据需要调整断点 */
+@media screen and (max-width: 768px) {
+.form-column {
+  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+  margin-right: 0;
+}
+}
+/* 表格复选框大小调整 */
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+  width: 30px; /* 复选框宽度 */
+  height: 20px; /* 复选框高度 */
+}
+
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
+  top: 5%; /* 调整对勾位置 */
+  left: 40%; /* 调整对勾位置 */
+  width: 5px; /* 调整对勾宽度 */
+  height: 9px; /* 调整对勾高度 */
+}
+
+/*:deep(.el-table td .cell) {*/
+/*  line-height: 30px !important;*/
+/*}*/
+.JKWTree-container {
+display: flex;
+}
+.JKWTree-tree {
+/*width: 300px;*/
+background-color: #fff;
+padding: 10px;
+margin-right: 20px;
+}
+.JKWTree-tree h3 {
+font-size: 15px;
+font-weight: 700;
+margin: 10px 0;
+}
+.JKWTree-content {
+flex: 1;
+}
+/* 图片上传 */
+.upload-box {
+width: 200px;
+height: 200px;
+border: 2px dashed #e2e2e2;
+display: flex;
+justify-content: center;
+align-items: center;
+position: relative;
+cursor: pointer;
+}
+.uploaded-image {
+width: 100%;
+height: 100%;
+object-fit: cover;
+}
+.upload-icon {
+font-size: 40px;
+color: #c0c4cc;
+}
+.file-input {
+display: none;
+}
+.el-table .warning-row {
+background: oldlace;
+}
+
+/* 选中某行时的背景色 */
+:deep(.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;
+}
+/* 点击按钮改变颜色 */
+.active-button {  
+  background-color: #ff0000;
+}
+.default-button {  
+  background-color: #808080;
+}
+</style>

+ 251 - 322
src/view/performance/zongjianbaogong.vue

@@ -39,7 +39,7 @@
 					<!-- 假设 activeButtonValue 是从后端或某个方法获取的,这里直接硬编码为 0 或 1 -->  
 					<div  
 						:class="{'info-button': activeButtonValue === '1', 'default-button': activeButtonValue !== '1'}"  
-						style="margin-top:-20px;margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
+						style="margin-top:-20px; margin-right:15px; height: 50px; width: 70px; display: flex; justify-content: center; align-items: center; cursor: not-allowed; border: 1px solid #ccc; border-radius: 4px; color: #000000;"  
 						:style="{ backgroundColor: activeButtonValue === '1' ? '#ff0000' : '#808080' }"  
 					>  
@@ -85,9 +85,6 @@
 						<el-button type="primary" @click="add_Dialog" 	 style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
 					</div>
 			</div>
-  
-
-  
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
@@ -159,11 +156,17 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
-  //物理地址获取机台编号
+//全局接口接受的物理地址
+const Machine = '68-ED-A4-26-5F-84'
+//全局获取code,接口接收code
+const _code = '总检'
+//全局获取UniqId
+const UniqId = ref('')
+
+//物理地址获取机台编号
 const getMachineMacdata = async () => {
   try {
-	const Machine = '68-ED-A4-26-5F-84'
-    const data  = await getMachineMac({sys_sbID:Machine,code:'总检'});
+    const data  = await getMachineMac({sys_sbID:Machine,code:_code});
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -173,45 +176,46 @@ const getMachineMacdata = async () => {
   }
 }
 getMachineMacdata();
-
-
-//点击【查询】按钮DC2408001-1,01,8,10,0
+//搜索
 const add_searchInfo = ref('')
+//表格
 const add_tableData = reactive([]);
+//尾包选中值
 const activeButtonValue = ref('')
-const UniqId = ref('')
-//全局获取颜色款式款号
-const _yskskh= ref('')
+//代表扫描两次自动保存
+const searcs = ref('')
+
+//查询询钮
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
-      ElMessage({type: 'warning',message: '请扫描小票二维码' })
+	ElMessage({type: 'warning',message: '请扫描小票二维码' })
   }else{
-    const order =add_searchInfo.value;
-	const sys_sbID = add_formData['机台号']
-	const getSpotLists = await getSpotList({order:order,code:'总检',sys_sbID:sys_sbID});
-	activeButtonValue.value = getSpotLists.data.result.wb
-    UniqId.value = getSpotLists.data.result.UniqId
-	add_formData['数量'] = getSpotLists.data.result.sl
-	add_formData['尺码'] = getSpotLists.data.result.cm
-	//获取下面报工历史记录
-	add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);//表格数据
+	if(searcs.value === ''){
+		 const order =add_searchInfo.value;
+		 const sys_sbID = add_formData['机台号']
+		 //获取下面报工历史记录
+		 const getSpotLists = await getSpotList({order:order,code:_code,sys_sbID:sys_sbID});
+		 activeButtonValue.value = getSpotLists.data.result.wb
+		 UniqId.value = getSpotLists.data.result.UniqId
+		 add_formData['数量'] = getSpotLists.data.result.sl
+		 add_formData['尺码'] = getSpotLists.data.result.cm
+		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+		 searcs.value = 1;
+	}else{
+		 add_Dialog();
+	}
   }
 }
-
-  
-  const AttendanceVisible=ref(false)
-
-  
-  //清空对象的属性值
-  const gd_clearFormData = () => {
+const AttendanceVisible=ref(false)
+//清空对象的属性值
+const gd_clearFormData = () => {
 	Object.keys(add_formData).forEach(key => {
 	  add_formData[key] = '';
 	});
-  };
-
-  const add_formData = reactive({
+};
+const add_formData = reactive({
 	机台号: '',	
 	工序: '',
 	组别: '',
@@ -219,307 +223,232 @@ const add_onSubmit = async ()=>{
 	尺码: '',
 	数量: '',
 	是否订单尾包: '',
-  });
-  
-
-  const currentSlValue=ref('')
+});
+const currentSlValue=ref('')
 //后道确认按钮
 const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
     ElMessage({type: 'warning',message: '请勾选具体的出库订单后,再操作此功能'})
   }else{
-			console.log(UniqId)
-			// 检查paramsList是否为空  
-			if (add_formData.数量 && add_formData.数量 !== '') {  
-				// 假设search函数可以处理一个包含多个参数的数组  
-				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
-				const cf_gettab = await search({UniqId:UniqId._value,code:'总检'}); // 调用search函数  
-				if (cf_gettab.code === 0) {  
-					const firstPart = add_searchInfo.value.split(',')[0];  
-					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
-					console.log(lsjltable)
-					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
-					add_searchInfo.value = '';  
-					setTimeout(() => {
-						const inputElement = document.getElementById('searchInput');
-						if (inputElement) {
-							inputElement.focus();		
-						}
-					}, 100); // 延迟100毫秒
-					ElMessage({type: 'success', message: '报工成功'});  
-				} else {  
-					ElMessage({type: 'error', message: '报工失败'});  
-				}  
-			} else {  
-				ElMessage({type: 'info', message: '没有选中要报工的数据'});  
-			}
+		console.log(UniqId.value)
+		// return false;
+		const cf_gettab = await search({UniqId:UniqId.value,code:_code}); // 调用search函数  
+		if (cf_gettab.code === 0) {
+			const firstPart = add_searchInfo.value.split(',')[0];  
+			const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+			console.log(lsjltable)
+			add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
+			add_searchInfo.value = '';  
+			setTimeout(() => {
+				const inputElement = document.getElementById('searchInput');
+				if (inputElement) {
+					inputElement.focus();		
+				}
+			}, 100); // 延迟100毫秒
+			searcs.value = '';
+			ElMessage({type: 'success', message: '报工成功'});  
+		}
+
   }
 }
-	//  AttendanceVisible.value = false
-  // 新增取消
-  const add_closeDialog = () => {
-	   AttendanceVisible.value = false
-  };
-
+//单机
+const add_tableRowClick = async (row) => {
+roww.value = row
+}
+//双击
+const add_updateCompanyFunc = async (row) => {
 
- 
-  
-  
+}
+//右键
+const handleRightClick = async (row) => {
 
-  //单机
-  const add_tableRowClick = async (row) => {
-	roww.value = row
-  }
-  //双击
-  const add_updateCompanyFunc = async (row) => {
-  
-  }
-  //右键
-  const handleRightClick = async (row) => {
-  
-  }
-  //复选框
-  const add_xpSelectionChange = async (selection) => {
-	  console.log(selection.length)
-	  selectedRows.value = selection; 
-	  if (selection.length === 0) {
-		  ElMessage({type: 'warning', message: '请勾选打印的数据' });
-		  return false;
-	  }else if(selection.length>0){
-		  allPrintData.value = selection.map((row) => {
-		  let weibao = row['是否尾包'] === '是' ? 1 : 0;
-		  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
-		  return {
-			  emm: ewm,
-			  zddbh: row['子订单编号'],
-			  kh: row['款号'],
-			  pm: row['款式'],
-			  ys: row['颜色'],
-			  cm: row['尺码'],
-			  sl: row['数量'],
-			  zb: row['组别'],
-			  dyrq: currentDates,
-			  wb: row['尾包']
-		  };
-	  });
-	  }else{
-		  allPrintData.value = [];
-	  }
-	  console.log(allPrintData.value)
+}
+//复选框
+const add_xpSelectionChange = async (selection) => {
+  console.log(selection.length)
+  selectedRows.value = selection; 
+  if (selection.length === 0) {
+	  ElMessage({type: 'warning', message: '请勾选打印的数据' });
+	  return false;
+  }else if(selection.length>0){
+	  allPrintData.value = selection.map((row) => {
+	  let weibao = row['是否尾包'] === '是' ? 1 : 0;
+	  const ewm = `${row['订单子编号']},01,${row['尺码']},${row['数量']},${weibao}`;
+	  return {
+		  emm: ewm,
+		  zddbh: row['子订单编号'],
+		  kh: row['款号'],
+		  pm: row['款式'],
+		  ys: row['颜色'],
+		  cm: row['尺码'],
+		  sl: row['数量'],
+		  zb: row['组别'],
+		  dyrq: currentDates,
+		  wb: row['尾包']
+	  };
+  });
+  }else{
+	  allPrintData.value = [];
   }
+  console.log(allPrintData.value)
+}
 
-  // =========== 删除按钮 ===========
-  //记录复选框的值
-  const bgSelection = ref(null)
-  const baogong_del = () => {
-	  if(bgSelection.value === null || bgSelection.value === ''){
-			ElMessage({type: 'warning',message: '请选择删除的数据' })
-	  }else{
-		   console.log(bgSelection.value)
-	  }
-  }
-  
-  // 保存当前选中的行数据
-  const table_selectrows = ref([]);
-  
-  // 表格复选框选中变化时触发
-  const table_SelectionChange = (val) => {
-	  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+// =========== 删除按钮 ===========
+//记录复选框的值
+const bgSelection = ref(null)
+const baogong_del = () => {
+  if(bgSelection.value === null || bgSelection.value === ''){
+		ElMessage({type: 'warning',message: '请选择删除的数据' })
+  }else{
+	   console.log(bgSelection.value)
   }
+}
   
-  
+// 保存当前选中的行数据
+const table_selectrows = ref([]);
 
-  // =========== 修改 ===========
-  const dialogFormVisible = ref(false)
-  const edit_formData = ref({})
-  // 双击修改
-  const updateCompanyFunc = async (row) => {
-	  console.log(row)
-	  dialogFormVisible.value = true;
-	  Object.assign(edit_formData.value,row);
-	  edit_formData.value['是否订单尾包'] = row['是否尾包'];
-	// let code = row['员工编号'];
-	// const getStaffInfo_data = await getStaffInfo({code:code});
-	// formDataTest.value = getStaffInfo_data.data;
-  };
-  
-  // 弹窗修改确定
-  const edit_Dialog = async () => {
-	  _ygjbzledit();
-  }
-  
-  // 弹窗修改关闭
-  const edit_closeDialog = () => {
-	  dialogFormVisible.value = false
-  }
-  
-  const _ygjbzledit = async ()=>{
-	// const formattedData = {
-	//   '订单子编号': edit_formData.value['订单子编号'],
-	//   '订单号': edit_formData.value['订单号'],
-	//   '生产款号': edit_formData.value['生产款号'],
-	//   '款式': edit_formData.value['款式'],
-	//   '颜色': edit_formData.value['颜色'],
-	//   '制单总数': edit_formData.value['制单总数'],
-	//   '组别': edit_formData.value['组别'],
-	//   '排产单数': edit_formData.value['排产单数'],
-	//   '尺码': edit_formData.value['尺码'],
-	//   '报工数量': edit_formData.value['报工数量'],
-	//   '是否为尾包': edit_formData.value['是否为尾包'],
-	//   '工序': edit_formData.value['工序'],
-	//   '验片人': edit_formData.value['验片人'],
-	//   '日期': edit_formData.value['日期'],
-	// };
-	// try {
-	//   const edid_edit_formData = await 修改接口(formattedData);
-	//   if (edid_edit_formData .code === 0) {
-	//     dialogFormVisible.value = false;
-	//     ElMessage({type: 'success',message: '更新成功'})
-	//   } else {
-	//     ElMessage({ type: 'error',message: '更新失败'})
-	//   }
-	// } catch (error) {
-	//   console.error(error);
-	// }
-  }
-  
-  // =========== 分页 ===========
-  // 分页相关的响应式变量
-  const page = ref(1)
-  const total = ref(0)
-  const pageSize = ref(10)
-  // 分页
-  const handleCurrentChange = (val) => {
-	page.value = val;
-	_getStaffList();
-  };
-  
-  // 修改页面容量 点击多少条/页
-  const handleSizeChange = (val) => {
-	page.value = 10;//默认显示
-	pageSize.value = val;
-	_getStaffList();
-  };
-  </script>
-  <style scoped>
-  .form-container {
-	display: flex;
-	flex-wrap: wrap;
-  }
-  
-  .form-column {
-	/*flex: 1;*/
-	margin-right: 15px; /* 调整列之间的间距 */
-  }
-  /* 左侧输入框宽度调整 */
-  .form-column .el-form-item .el-input {
-	width: 150px; /* 调整左侧输入框的宽度 */
-  }
-  
-  /* 媒体查询,根据需要调整断点 */
-  @media screen and (max-width: 768px) {
-	.form-column {
-	  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
-	  margin-right: 0;
-	}
-  }
-  /* 表格复选框大小调整 */
-  :deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
-	  width: 30px; /* 复选框宽度 */
-	  height: 20px; /* 复选框高度 */
-  }
-  
-  :deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
-	  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
-	  top: 5%; /* 调整对勾位置 */
-	  left: 40%; /* 调整对勾位置 */
-	  width: 5px; /* 调整对勾宽度 */
-	  height: 9px; /* 调整对勾高度 */
-  }
-  
-  /*:deep(.el-table td .cell) {*/
-  /*  line-height: 30px !important;*/
-  /*}*/
-  .JKWTree-container {
-	display: flex;
-  }
-  .JKWTree-tree {
-	/*width: 300px;*/
-	background-color: #fff;
-	padding: 10px;
-	margin-right: 20px;
-  }
-  .JKWTree-tree h3 {
-	font-size: 15px;
-	font-weight: 700;
-	margin: 10px 0;
-  }
-  .JKWTree-content {
-	flex: 1;
-  }
-  /* 图片上传 */
-  .upload-box {
-	width: 200px;
-	height: 200px;
-	border: 2px dashed #e2e2e2;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	position: relative;
-	cursor: pointer;
-  }
-  .uploaded-image {
-	width: 100%;
-	height: 100%;
-	object-fit: cover;
-  }
-  .upload-icon {
-	font-size: 40px;
-	color: #c0c4cc;
-  }
-  .file-input {
-	display: none;
-  }
-  .el-table .warning-row {
-	background: oldlace;
-  }
+// 表格复选框选中变化时触发
+const table_SelectionChange = (val) => {
+  table_selectrows.value = val; // 将选中的行数据保存到 table_selectrows
+}
   
-  /* 选中某行时的背景色 */
-  :deep(.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;
-  }
-  /* 点击按钮改变颜色 */
-  .active-button {  
-	  background-color: #ff0000;
-  }
-  .default-button {  
-	  background-color: #808080;
-  }
-  </style>
-  
+ 
+// =========== 分页 ===========
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+page.value = val;
+_getStaffList();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+page.value = 10;//默认显示
+pageSize.value = val;
+_getStaffList();
+};
+</script>
+<style scoped>
+.form-container {
+display: flex;
+flex-wrap: wrap;
+}
+
+.form-column {
+/*flex: 1;*/
+margin-right: 15px; /* 调整列之间的间距 */
+}
+/* 左侧输入框宽度调整 */
+.form-column .el-form-item .el-input {
+width: 150px; /* 调整左侧输入框的宽度 */
+}
+
+/* 媒体查询,根据需要调整断点 */
+@media screen and (max-width: 768px) {
+.form-column {
+  flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+  margin-right: 0;
+}
+}
+/* 表格复选框大小调整 */
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+  width: 30px; /* 复选框宽度 */
+  height: 20px; /* 复选框高度 */
+}
+
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+  transform: scale(1.2) rotate(45deg); /* 调整选中后的对勾大小 */
+  top: 5%; /* 调整对勾位置 */
+  left: 40%; /* 调整对勾位置 */
+  width: 5px; /* 调整对勾宽度 */
+  height: 9px; /* 调整对勾高度 */
+}
+
+/*:deep(.el-table td .cell) {*/
+/*  line-height: 30px !important;*/
+/*}*/
+.JKWTree-container {
+display: flex;
+}
+.JKWTree-tree {
+/*width: 300px;*/
+background-color: #fff;
+padding: 10px;
+margin-right: 20px;
+}
+.JKWTree-tree h3 {
+font-size: 15px;
+font-weight: 700;
+margin: 10px 0;
+}
+.JKWTree-content {
+flex: 1;
+}
+/* 图片上传 */
+.upload-box {
+width: 200px;
+height: 200px;
+border: 2px dashed #e2e2e2;
+display: flex;
+justify-content: center;
+align-items: center;
+position: relative;
+cursor: pointer;
+}
+.uploaded-image {
+width: 100%;
+height: 100%;
+object-fit: cover;
+}
+.upload-icon {
+font-size: 40px;
+color: #c0c4cc;
+}
+.file-input {
+display: none;
+}
+.el-table .warning-row {
+background: oldlace;
+}
+
+/* 选中某行时的背景色 */
+:deep(.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;
+}
+/* 点击按钮改变颜色 */
+.active-button {  
+  background-color: #ff0000;
+}
+.default-button {  
+  background-color: #808080;
+}
+</style>