liuhairui 1 yıl önce
ebeveyn
işleme
602d0d359d

+ 35 - 1
src/api/mes/job.js

@@ -15,6 +15,15 @@ export const getDepartment = (data) => {
   })
 }
 
+// 删除报工记录
+export const spotcheckdel = (params) => {
+  return service({
+    url: '/mes_server/work_order_spot_check/del',
+    method: 'get',
+    params
+  })
+}
+
 export const CfdataAllList = (data) => {
   return service({
     url: '/mes_server/manufacture/CfdataAllList',
@@ -295,6 +304,15 @@ export const getTabByGdbh = (data) => {
   })
 }
 
+//生产产量进度月报表
+export const getOneWorkOrder = (params) => {
+  return service({
+    url: '/mes_server/work_order_verification/getOneWorkOrder',
+    method: 'get',
+    params
+  })
+}
+
 // //获取物理地址
 // export const getMac = (params) => {
 //   return service({
@@ -304,7 +322,14 @@ export const getTabByGdbh = (data) => {
 //   })
 // }
 
-
+//出库报工搜索列表
+export const ProductInformation = (params) => {
+  return service({
+    url: '/mes_server/work_order/ProductInformation',
+    method: 'get',
+    params
+  })
+}
 
 //出库报工搜索列表
 export const getSpotList = (params) => {
@@ -315,6 +340,15 @@ export const getSpotList = (params) => {
   })
 }
 
+//获取PO号接口
+export const getPonumber = (params) => {
+  return service({
+    url: '/mes_server/work_order/getPonumber',
+    method: 'get',
+    params
+  })
+}
+
 
 
 //出库报工修改

+ 9 - 6
src/view/chatgpt/chatTable.vue

@@ -169,24 +169,27 @@ const handleQueryTable = async() => {
   padding: 30px;
   margin-top: 20px;
   background: #F5F5F5;
-  p {
+
+}
+.secret p{
+
     line-height: 30px;
-  }
 }
 .query-ipt{
   width: 300px;
   margin-right: 30px;
 }
 .content{
-  p {
-    font-size: 16px;
-    line-height: 20px;
-  }
+
   padding: 10px;
   width: 100%;
   background: #F5F5F5;
   margin-top: 30px;
 }
+.content p{
+
+    line-height: 30px;
+}
 .tables{
   width: 100%;
   margin-top: 30px;

+ 5 - 4
src/view/layout/setting/index.vue

@@ -89,11 +89,12 @@ const changeMode = (e) => {
 </script>
 
 <style lang="scss" scoped>
+	// &:hover{
+	//   right: 0
+	// }
 .drawer-container {
   transition: all 0.2s;
-  &:hover{
-    right: 0
-  }
+
   position: fixed;
   right: -20px;
   bottom: 15%;
@@ -106,7 +107,7 @@ const changeMode = (e) => {
   color: #fff;
   border-radius: 4px 0 0 4px;
   cursor: pointer;
-  -webkit-box-shadow: inset 0 0 6px rgba(0 ,0 ,0, 10%);
+  // -webkit-box-shadow: inset 0 0 6px rgba(0 ,0 ,0, 10%);
 }
 .setting_body{
   padding: 20px;

+ 95 - 61
src/view/performance/baozhuangbaogong.vue

@@ -4,7 +4,7 @@
 		  <layout-content >
 		  <!-- <el-main> -->
 			<div class="gva-table-box">
-				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">包装报工</h1>
+				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">{{_code}}报工</h1>
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<!-- 子订单编号输入框 -->
 					<el-col :span="4"  style="padding: 0px;margin: 0px;">
@@ -64,7 +64,7 @@
 						<el-text style="font-size: 30px;">上报数量</el-text>
 					</el-col>
 					<!--上报数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" style="width: 100%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" id="s_num" style="width: 100%; height: 40px;"/></el-col>
 						
 				
 					<!-- 是否尾包文本 -->
@@ -96,7 +96,7 @@
 
 				<layout-content >
 					<el-main>
-						<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 8px;">
+						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
 								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
@@ -112,13 +112,13 @@
 									<el-table-column sortable align="left" label="报工时间" prop="sys_rq" width="160"/>
 									<el-table-column sortable align="left" label="订单编号" prop="订单编号" width="130"/>
 									<el-table-column sortable align="left" label="订单子编号" prop="子订单编号" width="140"/>
-									<!-- <el-table-column sortable align="left" label="款式" prop="款式" width="140"/> -->
+									<el-table-column sortable align="left" label="款式" prop="款式" width="140"/>
 									<el-table-column sortable align="left" label="色系名称" prop="颜色" width="130"/>
 									<el-table-column sortable align="left" label="尺码" prop="尺码" width="110"/>
 									<el-table-column sortable align="left" label="数量" prop="数量" width="110"/>
 									<el-table-column sortable align="left" label="上报数量" prop="上报数量" width="110"/>
 									<el-table-column sortable align="left" label="是否尾包" prop="尾包" width="130"/>
-									<el-table-column sortable align="left" label="组别" prop="组别" width="130"/>
+									<!-- <el-table-column sortable align="left" label="组别" prop="组别" width="130"/> -->
 									</el-table>
 								</el-tab-pane>
 								
@@ -147,7 +147,7 @@
 				</layout-content>
 					<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
 						<el-button type="primary" @click="add_Dialog" id="add_Dialog"	:disabled="add_Dialogonclick === false"  style="width: 110px;height: 60px;font-size: 20px;margin-left: 20px;">报工</el-button>
-						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">工单预览</el-button>
+						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">订单表预览</el-button>
 					</div>
 			</div>
 		  <!-- </el-main> -->
@@ -218,17 +218,20 @@ import LuckyExcel from 'luckyexcel';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getTab,OrderAttachments} from '@/api/mes/job'
+import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh } from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
+import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
-const printPageRef = ref()
-// =========== 全局获取当前日期 ===========
-// currentDate  年月日 时分秒
-// currentDates  年月日
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
 const today = new Date();
 const year = today.getFullYear();
 const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
@@ -238,6 +241,8 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
 const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
+const printPageRef = ref()
+
 
 //全局获取code,接口接收code
 const _code = '包装'
@@ -248,7 +253,18 @@ const UniqId = ref('')
 //全局获取工序
 const _gx = '7'
 //全局获取工序名称
-const _gxmc = '包装'
+const _gxmc = _code
+const add_formData = reactive({
+	机台号: '',	
+	工序: '',
+	组别: '',
+	人员: '',	
+	尺码: '',
+	数量: '',
+	剩余数量: '',
+	上报数量:'',
+	是否订单尾包: '',
+});
 
 
 //物理地址获取机台编号
@@ -260,12 +276,12 @@ const getMachineMacdata = async () => {
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
 	add_formData['人员'] = data.data['组长']
-  setTimeout(() => {
-				const inputElement = document.getElementById('searchInput');
-				if (inputElement) {
-					inputElement.focus();		
-				}
-			}, 100); // 延迟100毫秒
+	  setTimeout(() => {
+			const inputElement = document.getElementById('searchInput');
+			if (inputElement) {
+				inputElement.focus();		
+			}
+	 }, 100); // 延迟100毫秒
   } catch (error) {
     console.error(error)
   }
@@ -312,10 +328,10 @@ const searcs = ref('')
 const _order = ref('')
 //技术附件
 const jstableData = reactive([])
-	
-//查询按钮
+const _list = ref('')
+
+// 查询按钮
 const add_onSubmit = async ()=>{
-	
 	if(add_formData['机台号'] === ''){
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
@@ -325,36 +341,45 @@ const add_onSubmit = async ()=>{
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
 	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-  }else{
-		//技术附件
-		const searchValue = add_searchInfo.value.split('-')[0];
-		const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
-		jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
-
-		add_formData['尺码'] = ''
-		add_formData['总数量'] = ''
-		add_formData['剩余数量'] = ''
-	// if(searcs.value === ''){
-		 _order.value = add_searchInfo.value;
-		 const sys_sbID = add_formData['机台号']
-		 //获取下面报工历史记录
-		 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:sys_sbID});
-		 activeButtonValue.value = getSpotLists.data.result.wb
-		 UniqId.value = getSpotLists.data.result.UniqId
-		 add_formData['尺码'] = getSpotLists.data.result.cm
-		 add_formData['总数量'] = getSpotLists.data.result.sl
-		 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
-		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
-		//  searcs.value = 1;
+	return false;
+  }
+  
+	setTimeout(() => {
+		const inputElement = document.getElementById('s_num');
+		if (inputElement) {
+			inputElement.focus();		
+		}
+	}, 100);
+	
+	 _order.value = add_searchInfo.value;
+	 //获取下面报工历史记录
+	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
+	 console.log(getSpotLists)
+	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
+		 add_formData['尺码'] = ''
+		 add_formData['总数量'] = ''
+		 add_formData['剩余数量'] = ''
 		 setTimeout(() => {
-			const inputElement = document.getElementById('sbsl');
-			if (add_formData['剩余数量']) {
-				inputElement.focus();		
-			}
-		 }, 100); // 延迟100毫秒
-		 
-  }
+		 	const inputElement = document.getElementById('searchInput');
+		 	if (inputElement) {
+		 		inputElement.focus();		
+		 	}
+		 }, 100);
+	 }
+	 activeButtonValue.value = getSpotLists.data.result.wb
+	 UniqId.value = getSpotLists.data.result.UniqId
+	 _list.value = getSpotLists.data.result
+	 add_formData['尺码'] = getSpotLists.data.result.cm
+	 add_formData['总数量'] = getSpotLists.data.result.sl
+	 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
+	 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+	 
+	 //技术附件
+	 const searchValue = add_searchInfo.value.split('-')[0];
+	 const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
+	 jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
+	 
 }
 
 //技术资料excel展示
@@ -427,18 +452,7 @@ const gd_clearFormData = () => {
 	  add_formData[key] = '';
 	});
 };
-const add_formData = reactive({
-	机台号: '',	
-	工序: '',
-	组别: '',
-	人员: '',	
-	尺码: '',
-	数量: '',
-	剩余数量: '',
-	上报数量:'',
-	是否订单尾包: '',
 
-});
 const add_Dialogonclick = ref(false)
 
 //获取input事件
@@ -457,9 +471,10 @@ function baogongslpd() {
   }  
 }
 const currentSlValue=ref('')
+
 //报工
 const add_Dialog = async ()=>{
-
+console.log(UniqId.value)
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -485,6 +500,25 @@ const add_Dialog = async ()=>{
 		params.s_num = add_formData['上报数量']
 		params.ci_num = add_formData['剩余数量']
 		console.log(params)
+		
+		// 记录每一次上报数据信息日志
+			let datalog = {};
+			datalog.code = _code;
+			datalog.订单编号 = _list.value.订单编号;
+			datalog.子订单编号 = _list.value.order;
+			datalog.款号 = _list.value.生产款号;
+			datalog.款式 = _list.value.款式;
+			datalog.颜色 = _list.value.颜色;
+			datalog.上报时间 = currentDate;
+			datalog.上报数量 = add_formData['上报数量'];
+			// 记录总实裁数
+			datalog.sctotal = _list.value.sctotal;
+			datalog.zdtotal = _list.value.zdtotal;
+			datalog['组别'] = add_formData['组别'];
+			
+			console.log(_list)
+			console.log(datalog)
+			const getTabByGdbhs = await getTabByGdbh(datalog);
 		// return false;
 		const cf_gettab = await search(params); // 调用search函数  
 		if (cf_gettab.code === 0) {

+ 190 - 80
src/view/performance/caiqiebaogong.vue

@@ -4,7 +4,7 @@
 	  <layout-content >
 		<div class="gva-table-box">
 			<div style="display: flex; align-items: baseline; margin-bottom: 10px;">
-			    <h1 style="margin: 0;">裁切完工报工</h1>
+			    <h1 style="margin: 0;">{{_code}}完工报工</h1>
 			</div>
 		      <el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 		      	<!-- 子订单编号输入框 -->
@@ -96,24 +96,27 @@
 		      <el-main>
 					<!-- 表格数据 -->
 					  <el-tabs v-model="activeName">
-						<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+						<el-tab-pane label="产量进度汇总记录"   @click="showTable('产量进度汇总记录')" name="first">
 							<el-table ref="multipleTable" style="width: 100%;height: 52vh" tooltip-effect="dark"
 							          :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 							          :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
-							          :data="add_tableData"  border row-key="ID"
+							          :data="jdhz_tableData"  border row-key="ID"
 							          size="small" 
+									  show-summary  :summary-method="getSummaries"
 							          highlight-current-row="true" @row-dblclick="updateCompanyFunc"
 							          @row-click="tableRowClick" :show-overflow-tooltip="true"
 							          @selection-change="handleSelectionChange">
 									  <!-- <el-table-column type="selection" width="55" /> -->
-									  <el-table-column  sortable  align="center" label="订单编号" prop="订单编号" width="120"/>
+									  <!-- <el-table-column  sortable  align="center" label="订单编号" prop="订单编号" width="120"/> -->
 									  <el-table-column  sortable align="left" label="订单子编号" prop="子订单编号"  width="130"/>
+									  <!-- <el-table-column  sortable  align="left" label="客户编号" prop="客户编号" width="120"/> -->
 									  <el-table-column  sortable  align="left" label="款号" prop="款号" width="120" />
-									  <el-table-column  sortable  align="left" label="款式" prop="款式" width="100" />
-									  <el-table-column  sortable  align="left" label="色系名称" prop="颜色" width="108"  />
+									  <!-- <el-table-column  sortable  align="left" label="款式" prop="款式" width="100" /> -->
+									  <el-table-column  sortable  align="left" label="色系名称" prop="颜色" width="108" />
+									  <!-- <el-table-column  sortable  align="left" label="组别" prop="组别" width="100" /> -->
 									  
 									  <el-table-column v-for="item in sizeDatas" :key="item" align="center" :label="item"
-										:prop="item" width="100" :cell-style="cellStyle">
+										:prop="item" width="70" :cell-style="cellStyle">
 										<template v-slot="scope">
 											<div 
 												style="margin-left: -5px;width: 80px;"
@@ -123,13 +126,12 @@
 										</template>
 										</el-table-column>
 										
-									  <el-table-column  sortable  align="left" label="制单总数" prop="zdtotal" width="108" />
-									  <el-table-column  sortable  align="left" label="实裁总数" prop="sctotal" width="110" />
-									  <!-- <el-table-column  sortable  align="left" label="单位" prop="单位" width="80" /> -->
-									  <el-table-column  sortable  align="left" label="日期" prop="Sys_rq" width="160" />
-									  <!-- <el-table-column  sortable  align="left" label="验片人" prop="Sys_id" width="130" /> -->
+									  <el-table-column  sortable  align="left" label="制单总数" prop="制单数" width="108" />
+									  <el-table-column  sortable  align="left" label="裁剪总数" prop="裁剪数" width="110" />
+									  <el-table-column  sortable  align="left" label="上报时间" prop="上报时间" width="160" />
 							</el-table>
 						</el-tab-pane>
+						
 					
 					  <el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
 					  	<el-table ref="multipleTable"
@@ -151,7 +153,7 @@
 					      </el-table>
 					    </el-tab-pane>
 					</el-tabs>
-</el-main>
+				</el-main>
 			</div>
 			
 				<!-- 是否订单尾包确认弹窗 -->
@@ -234,20 +236,35 @@ export default {
 import $script from 'scriptjs'
 import $ from 'jquery';
 import LuckyExcel from 'luckyexcel';
-
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue';
-import {getSpotList,getInfo,OrderAttachments,getTabByGdbh} from '@/api/mes/job';
+import {getSpotList,getInfo,OrderAttachments,getTabByGdbh,search} from '@/api/mes/job';
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import {ElMessage} from "element-plus";
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
+import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+const hours = String(today.getHours()).padStart(2, '0');
+const minutes = String(today.getMinutes()).padStart(2, '0');
+const seconds = String(today.getSeconds()).padStart(2, '0');
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
 const printPageRef = ref()
 const add_searchInfo = ref('')
 
 //全局获取code,接口接收code
-const _code = '裁切'
+const _code = '裁'
 //全局接口接受的物理地址
 const Machine = ref('')
 //全局获取UniqId
@@ -255,7 +272,6 @@ const UniqId = ref('')
 
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
-  console.log("裁切页面获取物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	// console.log(data)
@@ -305,16 +321,7 @@ const GetAddr =  () => {
 // getMachineMacdata();
 GetAddr()
 
-//全局调用获取当前日期
-const today = new Date();
-const year = today.getFullYear();
-const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
-const day = String(today.getDate()).padStart(2, '0');
-const hours = String(today.getHours()).padStart(2, '0');
-const minutes = String(today.getMinutes()).padStart(2, '0');
-const seconds = String(today.getSeconds()).padStart(2, '0');
-const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
-const currentDates = `${year}-${month}-${day}`;
+
 
 //技术附件
 
@@ -386,7 +393,9 @@ function updateTotal() {
   scsformdata.sctotal = values.reduce((sum, value) => sum + value, 0);  
 }  
 
+//进度汇总表格数据
 const add_tableData = reactive([]);
+const jdhz_tableData = reactive([]);
 const _order = ref('');
 const _UniqId = ref('');
 //尺寸列表
@@ -395,41 +404,52 @@ const sizeDatas = reactive([])
 const jstableData = reactive([])
 const _list = ref('');
 
-//点击【查询】按钮
+//查询
 const add_onSubmit = async ()=>{
-  sizeDatas.length = 0;
   
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
-    const WorkListdata = [];
-    add_tableData.splice(0,add_tableData.length,...WorkListdata);
-      ElMessage({type: 'warning',message: '搜索内容不能为空' })
-  }else{
+	const WorkListdata = [];
+	add_tableData.splice(0,add_tableData.length,...WorkListdata);
+	jdhz_tableData.splice(0,jdhz_tableData.length,...WorkListdata);
+	ElMessage({type: 'warning',message: '搜索内容不能为空' })
+	return;
+  }
+  // 如果没有以"DC"开头,自动补充添加DC 
+  if (!add_searchInfo.value.startsWith('DC')) {
+	
+	add_searchInfo.value = 'DC' + add_searchInfo.value;  
+  }
+  
+
 	  
-	if (!add_searchInfo.value.startsWith('DC')) {
-		// 如果没有以"DC"开头,自动补充添加DC 
-		add_searchInfo.value = 'DC' + add_searchInfo.value;  
-	} 
+	  sizeDatas.length = 0;
+	 
+	 _order.value = add_searchInfo.value;
+	 //进度汇总表格数据
+	 const getSpotLists = await getSpotList({order:_order.value,code:_code});
+	 if(getSpotLists.data.total === 0){
+	   ElMessage({type: 'warning',message: '此订单未出库,请先出库' })
+	   return false
+	 }
+	 setTimeout(() => {
+	 	  const inputElement = document.getElementById('scs1');
+	 	  if (inputElement) {
+	 		  inputElement.focus();		
+	 	  }
+	 }, 100);//100毫秒
+	 
+	 sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers);
+	 add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.table);
+	 jdhz_tableData.splice(0, jdhz_tableData.length, ...getSpotLists.data.rows);
 	
 	//技术附件
 	const searchValue = add_searchInfo.value.split('-')[0];
 	const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
-	// console.log(jsOrderAttachments)
 	jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
 	
-	_order.value = add_searchInfo.value;
-    const getSpotLists = await getSpotList({order:_order.value,code:'裁切'});
-	console.log(getSpotLists)
-	//将 list 数据存到全局变量中
 	_list.value = getSpotLists.data.list
-    if(getSpotLists.data.total === 0){
-      ElMessage({type: 'warning',message: '请先出库此订单再使用裁切报工' })
-      return false
-    }
-	
-	sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers); //表格尺码数据
-	add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.table); //表格数据
-	
 	_UniqId.value = getSpotLists.data.list[0].UniqId
+	
 	const keys1 = ['cm1', 'cm2', 'cm3', 'cm4','cm5','cm6','cm7','cm8','cm9','cm10',];
 	const keys2 = ['cmsl1', 'cmsl2', 'cmsl3', 'cmsl4','cmsl5','cmsl6','cmsl7','cmsl8','cmsl9','cmsl10','zdtotal',];
 	if(_order.value.includes('-')){
@@ -443,12 +463,7 @@ const add_onSubmit = async ()=>{
 				cmslformdata[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] = '';  
@@ -457,16 +472,47 @@ const add_onSubmit = async ()=>{
 			cmslformdata[key] = '';  
 		}   
 	}
-    setTimeout(() => {
-        const inputElement = document.querySelector('#searchInput');
-        if (inputElement) {
-            inputElement.focus();
-        }
-    }, 100); // 延迟100毫秒
-  }
+
+  
+  // getSummaries();
 };
 
 
+//合计
+  const getSummaries = (param) => {  
+    const { columns, data } = param;  
+    const sums = {};  
+    const summableLabels = [...sizeDatas, "裁剪总数"];
+    columns.forEach((column, index) => {  
+        if (index === 1) {  
+            sums[index] = '总数量合计';  
+            return;  
+        }  
+  
+        if (summableLabels.includes(column.label)) {  
+            const values = data.map(item => Number(item[column.property]));  
+  
+            // 检查数组中是否所有值都是 NaN  
+            if (!values.every(value => isNaN(value))) {  
+                sums[index] = values.reduce((prev, curr) => {  
+                    const value = Number(curr);  
+                    if (!isNaN(value)) {  
+                        return prev + value; 
+                    }  
+                    return prev;  
+                }, 0);  
+                // 如果需要,可以在这里添加单位  
+                // sums[index] += ' 件';  
+            } else {  
+                 sums[index] = 'N/A';  
+            }  
+        }  
+    });  
+  
+    return sums;  
+};  
+
+
 //技术资料excel展示
 const ExcelShow = (row) =>{
 	console.log("技术资料excel展示")
@@ -532,11 +578,12 @@ const luckyexcelCloseDialog = () => {
 //表格行点击
 const tableRowClick = async (row)=>{
   add_searchInfo.value = row.子订单编号
-	console.log(row)
+	// console.log(row)
 	_order.value = row.子订单编号
   add_onSubmit();
 }
 
+
 //复选框选择
 const ckSelection = ref('')
 const handleSelectionChange = (selection, type) => {
@@ -547,7 +594,7 @@ const handleSelectionChange = (selection, type) => {
   console.log(ckSelection.value)
 }
 
-//确认
+//报工
 const add_Dialog = async ()=>{
 	if (!add_formData['机台号']) {
 	    ElMessage({ type: 'warning', message: '未获取到机台' });
@@ -563,9 +610,66 @@ const add_Dialog = async ()=>{
 	    ElMessage({ type: 'warning', message: '请至少填写一个报工数据' });
 	    return;
 	}
+	
+	//尺码
+	let cmArray = [cmformdata.cm1, cmformdata.cm2, cmformdata.cm3, cmformdata.cm4, cmformdata.cm5, cmformdata
+		.cm6, cmformdata.cm7, cmformdata.cm8, cmformdata.cm9, cmformdata.cm10
+	];
+	//制单数
+	let zdsl1Array = [cmslformdata.cmsl1, cmslformdata.cmsl2, cmslformdata.cmsl3, cmslformdata.cmsl4,
+		cmslformdata.cmsl5, cmslformdata.cmsl6, cmslformdata.cmsl7, cmslformdata.cmsl8, cmslformdata
+		.cmsl9, cmslformdata.cmsl10
+	];
+	//上报数量
+	let scArray = [scsformdata.scs1, scsformdata.scs2, scsformdata.scs3, scsformdata.scs4, scsformdata.scs5, scsformdata.scs6, scsformdata.scs7, scsformdata.scs8, scsformdata.scs9, scsformdata.scs10
+	];
+	let resultArrays = [];
+	for (let i = 0; i < scArray.length; i++) {
+		// 创建一个新数组来存储当前索引下的所有值  
+		let currentValues = [add_formData['机台号'], cmArray[i], zdsl1Array[i], scArray[i]];
+		// 添加到结果数组中  
+		resultArrays.push(currentValues);
+	}
+	let paramsList = []; 
+	for (let i = 0; i < resultArrays.length; i++) {
+		if (scArray[i]) {
+			let params = {};
+			params.order_id = add_searchInfo.value;
+			params.sczl_jtbh = add_formData['机台号'];
+			params.gxmc = add_formData['工序'];
+			params.sys_id = add_formData['人员'];
+			params.sczl_bh = add_formData['组别'];
+			params.cm = resultArrays[i][1];
+			params.sl = resultArrays[i][3];
+			params.sys_rq = currentDates;
+			params.code = _code;
+			paramsList.push(params);
+		}
+	}
+	
+	if (paramsList.length === 0) {
+		ElMessage({type: 'info',message: '请填写实裁数'});
+		return;
+	}
+	
+	let allSuccess = true;
+	for (let i = 0; i < paramsList.length; i++) {
+		const cf_gettab = await search(paramsList[i]);
+		console.log('新增产量计酬返回信息',cf_gettab)
+		if (cf_gettab.code !== 0) {
+			// ElMessage({ type: 'error', message: '报工失败' });  
+			allSuccess = false;
+			break; // 如果某个报工失败,则中断循环  
+		}
+	}
+	// return;
+	
+	
+	
+	
 	// 记录每一次上报数据信息日志
 	let datalog = {};
-	datalog.code = '裁切';
+	datalog.code = _code;
 	datalog.订单编号 = _list.value[0].订单编号;
 	datalog.子订单编号 = _list.value[0].子订单编号;
 	datalog.款号 = _list.value[0].款号;
@@ -582,18 +686,20 @@ const add_Dialog = async ()=>{
 	}
 	// 记录总实裁数
 	datalog.sctotal = scsformdata.sctotal;
+	datalog.zdtotal = cmslformdata['zdtotal'];
+	datalog['组别'] = add_formData['组别'];
 	console.log(datalog)
 	const getTabByGdbhs = await getTabByGdbh(datalog);
 	
-	//光标跳转input框
-	setTimeout(() => {
-		const inputElement = document.getElementById('searchInput');
-		if (inputElement) {
-			inputElement.focus();		
-		}
-	}, 100); // 延迟100毫秒
+	// //光标跳转input框
+	// setTimeout(() => {
+	// 	const inputElement = document.getElementById('searchInput');
+	// 	if (inputElement) {
+	// 		inputElement.focus();		
+	// 	}
+	// }, 100); // 延迟100毫秒
 	  
-	//报工
+	//报工修改印件资料一条数据
 	if (_order.value.indexOf('-') !== -1) {
 	    let params = {}
 		params.scsl1 = scsformdata.scs1
@@ -606,15 +712,20 @@ const add_Dialog = async ()=>{
 		params.scsl8 = scsformdata.scs8
 		params.scsl9 = scsformdata.scs9
 		params.scsl10 = scsformdata.scs10
-		params.sctotal = scsformdata['sctotal'];
+		params.sctotal = scsformdata['sctotal']
 		params.order_id = _order.value;//子订单编号
 		params.rq = currentDates;//时间
 		params.UniqId = _UniqId.value
 	    console.log(params)
-	    //裁切完工报工接口
 	    const baogong_getInfo = await getInfo(params);
 	   if (baogong_getInfo.code === 0) {
 	           ElMessage({ type: 'success', message: '报工成功' });
+			   setTimeout(() => {
+			   	const inputElement = document.getElementById('searchInput');
+			   	if (inputElement) {
+			   		inputElement.focus();		
+			   	}
+			   }, 100); // 延迟100毫秒
 	           // 清空表单数据
 	           if (scsformdata) {
 	               // 批量清空 scs1 到 scs10 和总和字段
@@ -625,14 +736,13 @@ const add_Dialog = async ()=>{
 	           } else {
 	               console.error('scsformdata 未定义');
 	           }
-	           // 获取列表数据并更新表格
-	           const { data: { data: spotListData } } = await getSpotList({ order: _order.value, code: _code });
-	           add_tableData.value = spotListData;
+			   const getSpotLists = await getSpotList({ order: _order.value, code: _code });
+			   jdhz_tableData.splice(0, jdhz_tableData.length, ...getSpotLists.data.rows); //表格数据
 	           add_searchInfo.value = ''; // 清空搜索信息
 	       } else {
 	           ElMessage({ type: 'error', message: '报工失败' });
 	       }
-  }
+	}
 }
 
 const gd_yulan = () => {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 246 - 666
src/view/performance/chafengbaogong.vue


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

@@ -58,6 +58,7 @@ import { useUserStore } from '@/pinia/modules/user'
 const userStore = useUserStore()
 const _username = ref('')
 _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
 //全局调用获取当前日期
 const today = new Date();
 const year = today.getFullYear();

+ 95 - 61
src/view/performance/datangbaogong.vue

@@ -4,7 +4,7 @@
 		  <layout-content >
 		  <!-- <el-main> -->
 			<div class="gva-table-box">
-				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">大烫报工</h1>
+				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">{{_code}}报工</h1>
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<!-- 子订单编号输入框 -->
 					<el-col :span="4"  style="padding: 0px;margin: 0px;">
@@ -64,7 +64,7 @@
 						<el-text style="font-size: 30px;">上报数量</el-text>
 					</el-col>
 					<!--上报数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" style="width: 100%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" id="s_num" style="width: 100%; height: 40px;"/></el-col>
 						
 				
 					<!-- 是否尾包文本 -->
@@ -96,7 +96,7 @@
 
 				<layout-content >
 					<el-main>
-						<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 8px;">
+						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
 								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
@@ -112,13 +112,13 @@
 									<el-table-column sortable align="left" label="报工时间" prop="sys_rq" width="160"/>
 									<el-table-column sortable align="left" label="订单编号" prop="订单编号" width="130"/>
 									<el-table-column sortable align="left" label="订单子编号" prop="子订单编号" width="140"/>
-									<!-- <el-table-column sortable align="left" label="款式" prop="款式" width="140"/> -->
+									<el-table-column sortable align="left" label="款式" prop="款式" width="140"/>
 									<el-table-column sortable align="left" label="色系名称" prop="颜色" width="130"/>
 									<el-table-column sortable align="left" label="尺码" prop="尺码" width="110"/>
 									<el-table-column sortable align="left" label="数量" prop="数量" width="110"/>
 									<el-table-column sortable align="left" label="上报数量" prop="上报数量" width="110"/>
 									<el-table-column sortable align="left" label="是否尾包" prop="尾包" width="130"/>
-									<el-table-column sortable align="left" label="组别" prop="组别" width="130"/>
+									<!-- <el-table-column sortable align="left" label="组别" prop="组别" width="130"/> -->
 									</el-table>
 								</el-tab-pane>
 								
@@ -147,7 +147,7 @@
 				</layout-content>
 					<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
 						<el-button type="primary" @click="add_Dialog" id="add_Dialog"	:disabled="add_Dialogonclick === false"  style="width: 110px;height: 60px;font-size: 20px;margin-left: 20px;">报工</el-button>
-						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">工单预览</el-button>
+						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">订单表预览</el-button>
 					</div>
 			</div>
 		  <!-- </el-main> -->
@@ -218,17 +218,20 @@ import LuckyExcel from 'luckyexcel';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getTab,OrderAttachments} from '@/api/mes/job'
+import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh } from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
+import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
-const printPageRef = ref()
-// =========== 全局获取当前日期 ===========
-// currentDate  年月日 时分秒
-// currentDates  年月日
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
 const today = new Date();
 const year = today.getFullYear();
 const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
@@ -238,6 +241,8 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
 const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
+const printPageRef = ref()
+
 
 //全局获取code,接口接收code
 const _code = '大烫'
@@ -248,7 +253,18 @@ const UniqId = ref('')
 //全局获取工序
 const _gx = '5'
 //全局获取工序名称
-const _gxmc = '大烫'
+const _gxmc = _code
+const add_formData = reactive({
+	机台号: '',	
+	工序: '',
+	组别: '',
+	人员: '',	
+	尺码: '',
+	数量: '',
+	剩余数量: '',
+	上报数量:'',
+	是否订单尾包: '',
+});
 
 
 //物理地址获取机台编号
@@ -260,12 +276,12 @@ const getMachineMacdata = async () => {
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
 	add_formData['人员'] = data.data['组长']
-  setTimeout(() => {
-				const inputElement = document.getElementById('searchInput');
-				if (inputElement) {
-					inputElement.focus();		
-				}
-			}, 100); // 延迟100毫秒
+	  setTimeout(() => {
+			const inputElement = document.getElementById('searchInput');
+			if (inputElement) {
+				inputElement.focus();		
+			}
+	 }, 100); // 延迟100毫秒
   } catch (error) {
     console.error(error)
   }
@@ -312,10 +328,10 @@ const searcs = ref('')
 const _order = ref('')
 //技术附件
 const jstableData = reactive([])
-	
-//查询按钮
+const _list = ref('')
+
+// 查询按钮
 const add_onSubmit = async ()=>{
-	
 	if(add_formData['机台号'] === ''){
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
@@ -325,36 +341,45 @@ const add_onSubmit = async ()=>{
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
 	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-  }else{
-		//技术附件
-		const searchValue = add_searchInfo.value.split('-')[0];
-		const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
-		jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
-
-		add_formData['尺码'] = ''
-		add_formData['总数量'] = ''
-		add_formData['剩余数量'] = ''
-	// if(searcs.value === ''){
-		 _order.value = add_searchInfo.value;
-		 const sys_sbID = add_formData['机台号']
-		 //获取下面报工历史记录
-		 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:sys_sbID});
-		 activeButtonValue.value = getSpotLists.data.result.wb
-		 UniqId.value = getSpotLists.data.result.UniqId
-		 add_formData['尺码'] = getSpotLists.data.result.cm
-		 add_formData['总数量'] = getSpotLists.data.result.sl
-		 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
-		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
-		//  searcs.value = 1;
+	return false;
+  }
+  
+	setTimeout(() => {
+		const inputElement = document.getElementById('s_num');
+		if (inputElement) {
+			inputElement.focus();		
+		}
+	}, 100);
+	
+	 _order.value = add_searchInfo.value;
+	 //获取下面报工历史记录
+	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
+	 console.log(getSpotLists)
+	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
+		 add_formData['尺码'] = ''
+		 add_formData['总数量'] = ''
+		 add_formData['剩余数量'] = ''
 		 setTimeout(() => {
-			const inputElement = document.getElementById('sbsl');
-			if (add_formData['剩余数量']) {
-				inputElement.focus();		
-			}
-		 }, 100); // 延迟100毫秒
-		 
-  }
+		 	const inputElement = document.getElementById('searchInput');
+		 	if (inputElement) {
+		 		inputElement.focus();		
+		 	}
+		 }, 100);
+	 }
+	 activeButtonValue.value = getSpotLists.data.result.wb
+	 UniqId.value = getSpotLists.data.result.UniqId
+	 _list.value = getSpotLists.data.result
+	 add_formData['尺码'] = getSpotLists.data.result.cm
+	 add_formData['总数量'] = getSpotLists.data.result.sl
+	 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
+	 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+	 
+	 //技术附件
+	 const searchValue = add_searchInfo.value.split('-')[0];
+	 const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
+	 jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
+	 
 }
 
 //技术资料excel展示
@@ -427,18 +452,7 @@ const gd_clearFormData = () => {
 	  add_formData[key] = '';
 	});
 };
-const add_formData = reactive({
-	机台号: '',	
-	工序: '',
-	组别: '',
-	人员: '',	
-	尺码: '',
-	数量: '',
-	剩余数量: '',
-	上报数量:'',
-	是否订单尾包: '',
 
-});
 const add_Dialogonclick = ref(false)
 
 //获取input事件
@@ -457,9 +471,10 @@ function baogongslpd() {
   }  
 }
 const currentSlValue=ref('')
+
 //报工
 const add_Dialog = async ()=>{
-
+console.log(UniqId.value)
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -485,6 +500,25 @@ const add_Dialog = async ()=>{
 		params.s_num = add_formData['上报数量']
 		params.ci_num = add_formData['剩余数量']
 		console.log(params)
+		
+		// 记录每一次上报数据信息日志
+			let datalog = {};
+			datalog.code = _code;
+			datalog.订单编号 = _list.value.订单编号;
+			datalog.子订单编号 = _list.value.order;
+			datalog.款号 = _list.value.生产款号;
+			datalog.款式 = _list.value.款式;
+			datalog.颜色 = _list.value.颜色;
+			datalog.上报时间 = currentDate;
+			datalog.上报数量 = add_formData['上报数量'];
+			// 记录总实裁数
+			datalog.sctotal = _list.value.sctotal;
+			datalog.zdtotal = _list.value.zdtotal;
+			datalog['组别'] = add_formData['组别'];
+			
+			console.log(_list)
+			console.log(datalog)
+			const getTabByGdbhs = await getTabByGdbh(datalog);
 		// return false;
 		const cf_gettab = await search(params); // 调用search函数  
 		if (cf_gettab.code === 0) {

+ 96 - 62
src/view/performance/houdaoshougong.vue

@@ -4,7 +4,7 @@
 		  <layout-content >
 		  <!-- <el-main> -->
 			<div class="gva-table-box">
-				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">后道(手工确认)</h1>
+				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">{{_code}}报工</h1>
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<!-- 子订单编号输入框 -->
 					<el-col :span="4"  style="padding: 0px;margin: 0px;">
@@ -64,7 +64,7 @@
 						<el-text style="font-size: 30px;">上报数量</el-text>
 					</el-col>
 					<!--上报数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" style="width: 100%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" id="s_num" style="width: 100%; height: 40px;"/></el-col>
 						
 				
 					<!-- 是否尾包文本 -->
@@ -96,7 +96,7 @@
 
 				<layout-content >
 					<el-main>
-						<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 8px;">
+						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
 								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
@@ -112,13 +112,13 @@
 									<el-table-column sortable align="left" label="报工时间" prop="sys_rq" width="160"/>
 									<el-table-column sortable align="left" label="订单编号" prop="订单编号" width="130"/>
 									<el-table-column sortable align="left" label="订单子编号" prop="子订单编号" width="140"/>
-									<!-- <el-table-column sortable align="left" label="款式" prop="款式" width="140"/> -->
+									<el-table-column sortable align="left" label="款式" prop="款式" width="140"/>
 									<el-table-column sortable align="left" label="色系名称" prop="颜色" width="130"/>
 									<el-table-column sortable align="left" label="尺码" prop="尺码" width="110"/>
 									<el-table-column sortable align="left" label="数量" prop="数量" width="110"/>
 									<el-table-column sortable align="left" label="上报数量" prop="上报数量" width="110"/>
 									<el-table-column sortable align="left" label="是否尾包" prop="尾包" width="130"/>
-									<el-table-column sortable align="left" label="组别" prop="组别" width="130"/>
+									<!-- <el-table-column sortable align="left" label="组别" prop="组别" width="130"/> -->
 									</el-table>
 								</el-tab-pane>
 								
@@ -147,7 +147,7 @@
 				</layout-content>
 					<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
 						<el-button type="primary" @click="add_Dialog" id="add_Dialog"	:disabled="add_Dialogonclick === false"  style="width: 110px;height: 60px;font-size: 20px;margin-left: 20px;">报工</el-button>
-						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">工单预览</el-button>
+						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">订单表预览</el-button>
 					</div>
 			</div>
 		  <!-- </el-main> -->
@@ -218,17 +218,20 @@ import LuckyExcel from 'luckyexcel';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getTab,OrderAttachments} from '@/api/mes/job'
+import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh } from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
+import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
-const printPageRef = ref()
-// =========== 全局获取当前日期 ===========
-// currentDate  年月日 时分秒
-// currentDates  年月日
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
 const today = new Date();
 const year = today.getFullYear();
 const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
@@ -238,9 +241,11 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
 const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
+const printPageRef = ref()
+
 
 //全局获取code,接口接收code
-const _code = '后道'
+const _code = '手工'
 //全局接口接受的物理地址
 const Machine = ref('')
 //全局获取UniqId
@@ -248,7 +253,18 @@ const UniqId = ref('')
 //全局获取工序
 const _gx = '4'
 //全局获取工序名称
-const _gxmc = '后道收样'
+const _gxmc = _code
+const add_formData = reactive({
+	机台号: '',	
+	工序: '',
+	组别: '',
+	人员: '',	
+	尺码: '',
+	数量: '',
+	剩余数量: '',
+	上报数量:'',
+	是否订单尾包: '',
+});
 
 
 //物理地址获取机台编号
@@ -260,12 +276,12 @@ const getMachineMacdata = async () => {
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
 	add_formData['人员'] = data.data['组长']
-  setTimeout(() => {
-				const inputElement = document.getElementById('searchInput');
-				if (inputElement) {
-					inputElement.focus();		
-				}
-			}, 100); // 延迟100毫秒
+	  setTimeout(() => {
+			const inputElement = document.getElementById('searchInput');
+			if (inputElement) {
+				inputElement.focus();		
+			}
+	 }, 100); // 延迟100毫秒
   } catch (error) {
     console.error(error)
   }
@@ -312,10 +328,10 @@ const searcs = ref('')
 const _order = ref('')
 //技术附件
 const jstableData = reactive([])
-	
-//查询按钮
+const _list = ref('')
+
+// 查询按钮
 const add_onSubmit = async ()=>{
-	
 	if(add_formData['机台号'] === ''){
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
@@ -325,36 +341,45 @@ const add_onSubmit = async ()=>{
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
 	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-  }else{
-		//技术附件
-		const searchValue = add_searchInfo.value.split('-')[0];
-		const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
-		jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
-
-		add_formData['尺码'] = ''
-		add_formData['总数量'] = ''
-		add_formData['剩余数量'] = ''
-	// if(searcs.value === ''){
-		 _order.value = add_searchInfo.value;
-		 const sys_sbID = add_formData['机台号']
-		 //获取下面报工历史记录
-		 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:sys_sbID});
-		 activeButtonValue.value = getSpotLists.data.result.wb
-		 UniqId.value = getSpotLists.data.result.UniqId
-		 add_formData['尺码'] = getSpotLists.data.result.cm
-		 add_formData['总数量'] = getSpotLists.data.result.sl
-		 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
-		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
-		//  searcs.value = 1;
+	return false;
+  }
+  
+	setTimeout(() => {
+		const inputElement = document.getElementById('s_num');
+		if (inputElement) {
+			inputElement.focus();		
+		}
+	}, 100);
+	
+	 _order.value = add_searchInfo.value;
+	 //获取下面报工历史记录
+	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
+	 console.log(getSpotLists)
+	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
+		 add_formData['尺码'] = ''
+		 add_formData['总数量'] = ''
+		 add_formData['剩余数量'] = ''
 		 setTimeout(() => {
-			const inputElement = document.getElementById('sbsl');
-			if (add_formData['剩余数量']) {
-				inputElement.focus();		
-			}
-		 }, 100); // 延迟100毫秒
-		 
-  }
+		 	const inputElement = document.getElementById('searchInput');
+		 	if (inputElement) {
+		 		inputElement.focus();		
+		 	}
+		 }, 100);
+	 }
+	 activeButtonValue.value = getSpotLists.data.result.wb
+	 UniqId.value = getSpotLists.data.result.UniqId
+	 _list.value = getSpotLists.data.result
+	 add_formData['尺码'] = getSpotLists.data.result.cm
+	 add_formData['总数量'] = getSpotLists.data.result.sl
+	 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
+	 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+	 
+	 //技术附件
+	 const searchValue = add_searchInfo.value.split('-')[0];
+	 const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
+	 jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
+	 
 }
 
 //技术资料excel展示
@@ -427,18 +452,7 @@ const gd_clearFormData = () => {
 	  add_formData[key] = '';
 	});
 };
-const add_formData = reactive({
-	机台号: '',	
-	工序: '',
-	组别: '',
-	人员: '',	
-	尺码: '',
-	数量: '',
-	剩余数量: '',
-	上报数量:'',
-	是否订单尾包: '',
 
-});
 const add_Dialogonclick = ref(false)
 
 //获取input事件
@@ -457,9 +471,10 @@ function baogongslpd() {
   }  
 }
 const currentSlValue=ref('')
+
 //报工
 const add_Dialog = async ()=>{
-
+console.log(UniqId.value)
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -485,6 +500,25 @@ const add_Dialog = async ()=>{
 		params.s_num = add_formData['上报数量']
 		params.ci_num = add_formData['剩余数量']
 		console.log(params)
+		
+		// 记录每一次上报数据信息日志
+			let datalog = {};
+			datalog.code = _code;
+			datalog.订单编号 = _list.value.订单编号;
+			datalog.子订单编号 = _list.value.order;
+			datalog.款号 = _list.value.生产款号;
+			datalog.款式 = _list.value.款式;
+			datalog.颜色 = _list.value.颜色;
+			datalog.上报时间 = currentDate;
+			datalog.上报数量 = add_formData['上报数量'];
+			// 记录总实裁数
+			datalog.sctotal = _list.value.sctotal;
+			datalog.zdtotal = _list.value.zdtotal;
+			datalog['组别'] = add_formData['组别'];
+			
+			console.log(_list)
+			console.log(datalog)
+			const getTabByGdbhs = await getTabByGdbh(datalog);
 		// return false;
 		const cf_gettab = await search(params); // 调用search函数  
 		if (cf_gettab.code === 0) {

+ 95 - 61
src/view/performance/zongjianbaogong.vue

@@ -4,7 +4,7 @@
 		  <layout-content >
 		  <!-- <el-main> -->
 			<div class="gva-table-box">
-				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">总检报工</h1>
+				<h1 id="title" style="margin: 0%;margin-bottom: 10px;">{{_code}}报工</h1>
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<!-- 子订单编号输入框 -->
 					<el-col :span="4"  style="padding: 0px;margin: 0px;">
@@ -64,7 +64,7 @@
 						<el-text style="font-size: 30px;">上报数量</el-text>
 					</el-col>
 					<!--上报数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" style="width: 100%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['上报数量']"  @input="baogongslpd" id="s_num" style="width: 100%; height: 40px;"/></el-col>
 						
 				
 					<!-- 是否尾包文本 -->
@@ -96,7 +96,7 @@
 
 				<layout-content >
 					<el-main>
-						<el-row :gutter="24" style="margin-bottom: 15px;margin-left: 8px;">
+						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
 								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
@@ -112,13 +112,13 @@
 									<el-table-column sortable align="left" label="报工时间" prop="sys_rq" width="160"/>
 									<el-table-column sortable align="left" label="订单编号" prop="订单编号" width="130"/>
 									<el-table-column sortable align="left" label="订单子编号" prop="子订单编号" width="140"/>
-									<!-- <el-table-column sortable align="left" label="款式" prop="款式" width="140"/> -->
+									<el-table-column sortable align="left" label="款式" prop="款式" width="140"/>
 									<el-table-column sortable align="left" label="色系名称" prop="颜色" width="130"/>
 									<el-table-column sortable align="left" label="尺码" prop="尺码" width="110"/>
 									<el-table-column sortable align="left" label="数量" prop="数量" width="110"/>
 									<el-table-column sortable align="left" label="上报数量" prop="上报数量" width="110"/>
 									<el-table-column sortable align="left" label="是否尾包" prop="尾包" width="130"/>
-									<el-table-column sortable align="left" label="组别" prop="组别" width="130"/>
+									<!-- <el-table-column sortable align="left" label="组别" prop="组别" width="130"/> -->
 									</el-table>
 								</el-tab-pane>
 								
@@ -147,7 +147,7 @@
 				</layout-content>
 					<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
 						<el-button type="primary" @click="add_Dialog" id="add_Dialog"	:disabled="add_Dialogonclick === false"  style="width: 110px;height: 60px;font-size: 20px;margin-left: 20px;">报工</el-button>
-						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">工单预览</el-button>
+						<el-button type="primary" @click="gd_yulan" 	 style="width: 100px;height: 60px;font-size: 20px;">订单表预览</el-button>
 					</div>
 			</div>
 		  <!-- </el-main> -->
@@ -218,17 +218,20 @@ import LuckyExcel from 'luckyexcel';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getTab,OrderAttachments} from '@/api/mes/job'
+import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh } from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
+import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
-const printPageRef = ref()
-// =========== 全局获取当前日期 ===========
-// currentDate  年月日 时分秒
-// currentDates  年月日
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
 const today = new Date();
 const year = today.getFullYear();
 const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
@@ -238,6 +241,8 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
 const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
+const printPageRef = ref()
+
 
 //全局获取code,接口接收code
 const _code = '总检'
@@ -248,7 +253,18 @@ const UniqId = ref('')
 //全局获取工序
 const _gx = '6'
 //全局获取工序名称
-const _gxmc = '总检'
+const _gxmc = _code
+const add_formData = reactive({
+	机台号: '',	
+	工序: '',
+	组别: '',
+	人员: '',	
+	尺码: '',
+	数量: '',
+	剩余数量: '',
+	上报数量:'',
+	是否订单尾包: '',
+});
 
 
 //物理地址获取机台编号
@@ -260,12 +276,12 @@ const getMachineMacdata = async () => {
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
 	add_formData['人员'] = data.data['组长']
-  setTimeout(() => {
-				const inputElement = document.getElementById('searchInput');
-				if (inputElement) {
-					inputElement.focus();		
-				}
-			}, 100); // 延迟100毫秒
+	  setTimeout(() => {
+			const inputElement = document.getElementById('searchInput');
+			if (inputElement) {
+				inputElement.focus();		
+			}
+	 }, 100); // 延迟100毫秒
   } catch (error) {
     console.error(error)
   }
@@ -312,10 +328,10 @@ const searcs = ref('')
 const _order = ref('')
 //技术附件
 const jstableData = reactive([])
-	
-//查询按钮
+const _list = ref('')
+
+// 查询按钮
 const add_onSubmit = async ()=>{
-	
 	if(add_formData['机台号'] === ''){
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
@@ -325,36 +341,45 @@ const add_onSubmit = async ()=>{
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
 	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-  }else{
-		//技术附件
-		const searchValue = add_searchInfo.value.split('-')[0];
-		const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
-		jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
-
-		add_formData['尺码'] = ''
-		add_formData['总数量'] = ''
-		add_formData['剩余数量'] = ''
-	// if(searcs.value === ''){
-		 _order.value = add_searchInfo.value;
-		 const sys_sbID = add_formData['机台号']
-		 //获取下面报工历史记录
-		 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:sys_sbID});
-		 activeButtonValue.value = getSpotLists.data.result.wb
-		 UniqId.value = getSpotLists.data.result.UniqId
-		 add_formData['尺码'] = getSpotLists.data.result.cm
-		 add_formData['总数量'] = getSpotLists.data.result.sl
-		 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
-		 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
-		//  searcs.value = 1;
+	return false;
+  }
+  
+	setTimeout(() => {
+		const inputElement = document.getElementById('s_num');
+		if (inputElement) {
+			inputElement.focus();		
+		}
+	}, 100);
+	
+	 _order.value = add_searchInfo.value;
+	 //获取下面报工历史记录
+	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
+	 console.log(getSpotLists)
+	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
+		 add_formData['尺码'] = ''
+		 add_formData['总数量'] = ''
+		 add_formData['剩余数量'] = ''
 		 setTimeout(() => {
-			const inputElement = document.getElementById('sbsl');
-			if (add_formData['剩余数量']) {
-				inputElement.focus();		
-			}
-		 }, 100); // 延迟100毫秒
-		 
-  }
+		 	const inputElement = document.getElementById('searchInput');
+		 	if (inputElement) {
+		 		inputElement.focus();		
+		 	}
+		 }, 100);
+	 }
+	 activeButtonValue.value = getSpotLists.data.result.wb
+	 UniqId.value = getSpotLists.data.result.UniqId
+	 _list.value = getSpotLists.data.result
+	 add_formData['尺码'] = getSpotLists.data.result.cm
+	 add_formData['总数量'] = getSpotLists.data.result.sl
+	 add_formData['剩余数量'] = getSpotLists.data.result.ci_num
+	 add_tableData.splice(0,add_tableData.length,...getSpotLists.data.records);
+	 
+	 //技术附件
+	 const searchValue = add_searchInfo.value.split('-')[0];
+	 const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
+	 jstableData.splice(0,jsOrderAttachments.data.length,...jsOrderAttachments.data);
+	 
 }
 
 //技术资料excel展示
@@ -427,18 +452,7 @@ const gd_clearFormData = () => {
 	  add_formData[key] = '';
 	});
 };
-const add_formData = reactive({
-	机台号: '',	
-	工序: '',
-	组别: '',
-	人员: '',	
-	尺码: '',
-	数量: '',
-	剩余数量: '',
-	上报数量:'',
-	是否订单尾包: '',
 
-});
 const add_Dialogonclick = ref(false)
 
 //获取input事件
@@ -457,9 +471,10 @@ function baogongslpd() {
   }  
 }
 const currentSlValue=ref('')
+
 //报工
 const add_Dialog = async ()=>{
-
+console.log(UniqId.value)
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -485,6 +500,25 @@ const add_Dialog = async ()=>{
 		params.s_num = add_formData['上报数量']
 		params.ci_num = add_formData['剩余数量']
 		console.log(params)
+		
+		// 记录每一次上报数据信息日志
+			let datalog = {};
+			datalog.code = _code;
+			datalog.订单编号 = _list.value.订单编号;
+			datalog.子订单编号 = _list.value.order;
+			datalog.款号 = _list.value.生产款号;
+			datalog.款式 = _list.value.款式;
+			datalog.颜色 = _list.value.颜色;
+			datalog.上报时间 = currentDate;
+			datalog.上报数量 = add_formData['上报数量'];
+			// 记录总实裁数
+			datalog.sctotal = _list.value.sctotal;
+			datalog.zdtotal = _list.value.zdtotal;
+			datalog['组别'] = add_formData['组别'];
+			
+			console.log(_list)
+			console.log(datalog)
+			const getTabByGdbhs = await getTabByGdbh(datalog);
 		// return false;
 		const cf_gettab = await search(params); // 调用search函数  
 		if (cf_gettab.code === 0) {

+ 576 - 485
src/view/yunyin/shengchanguanli/baogongshuju.vue

@@ -1,27 +1,68 @@
 <template>
     <div>
       <layout>
-       <!-- <layout-header>
+       <layout-header>
           <div class="">
-            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
+            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule">
               <el-form-item>
-                <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 180px;"></el-input>
-                <el-button type="primary" icon="search" @click="onSubmit" 
-                style="margin: 0px 5px 0px 0px;width: 80px;height:40px;border-radius: 5%;">查询</el-button>
+				<el-input v-model="searchInfo"  placeholder="搜索订单编号" style="width: 180px;" @keyup.enter="onSubmit()"></el-input>
+				<el-button type="primary" icon="search" @click="onSubmit" title="搜索">查询</el-button>
+				<el-button type="primary" icon="document"  @click="statusExcel" title="查看当前月产量汇总">产量进度表汇总</el-button>
+				<el-button  type="danger"  icon="delete"  title="请选择要删除的数据"  @click="del_delclick"  v-if="delall === true" 
+				  :disabled="Selection === ''"  class="bt"
+				  :style="{
+				    backgroundColor: Selection === '' ? '' : 'red',
+				    borderColor: Selection === '' ? '' : 'red',
+				    color: Selection === '' ? '' : '#fff'
+				  }">删除报工
+				</el-button>
+				 
+				<!-- 查询产量进度表弹窗 -->
+				<el-dialog v-model="statusExceldialog" :before-close="luckyexcelCloseDialog" style='height: 100%;margin: 0px;' width="100%"  >
+					<div class="block">
+					    <span class="demonstration">月份选择:</span>
+						<el-date-picker v-model="ExcelformData['rq']" type="month" placeholder="选择月份"style='width: 10%;'></el-date-picker>
+						<el-button type="primary" @click="ExcelonSubmit" style='margin-left: 10px;'>查询</el-button>
+						<el-button type="primary" class="bt" icon="download" @click="exportToExcel2" >导出Excel</el-button>
+					  </div>
+					  <br>
+					<el-table ref="multipleTable" style="width: 100%;height: 80vh" tooltip-effect="dark"
+					          :row-style="{ height: '30px' }" :header-cell-style="{ padding: '0px' }"
+					          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
+					          :data="ExceltableData" border row-key="ID" id="Excel_table"
+					          size="small" highlight-current-row="true" :show-overflow-tooltip="true"
+					          @row-click="add_tableRowClick" @row-dblclick="add_updateCompanyFunc"
+					          @selection-change="Excel_Selection">
+					    <el-table-column  align="left" label="订单编号" prop="订单编号" width="105"/>
+						<el-table-column  align="left" label="客户" prop="客户编号" width="70"/>
+					    <el-table-column  align="left" label="组别" prop="组别" width="80"/>
+					    <el-table-column  align="left" label="款式" prop="款式" width="110"/>
+						<el-table-column  align="left" label="生产款号" prop="款号" width="110"/>
+					    <el-table-column  align="left" label="制单数" prop="制单数" width="75"/>
+					    <el-table-column  align="left" label="裁剪数" prop="裁剪数" width="75"/>
+					    <el-table-column  align="left" label="上月累计" prop="上月累计" width="75"/>
+						<el-table-column  align="left" label="本月累计" prop="本月累计" width="75"/>
+					
+					    <!-- 动态生成从 1 号到 31 号的列 -->
+					    <el-table-column v-for="day in 31" :key="day" :label="day" :prop="day" width="45" align="left"/>
+					</el-table>
+				</el-dialog>
+				
               </el-form-item>
             </el-form>
           </div>
-        </layout-header> -->
+        </layout-header>
   
         <layout>
           <!--左侧树侧形结构-->
           <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
-            <div class="JKWTree-tree" style="height: 200px">
+           <div class="JKWTree-tree" style="height: 200px">
               <h3>报工数据</h3>
               <el-tree :data="treeData" class="treecolor"   @node-click="handleNodeClick"></el-tree>
             </div>
+			
           </layout-sider>
-  
+
           <!-- 右侧区域 -->
           <layout-content >
           <el-main>
@@ -30,133 +71,31 @@
              <el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
                         :row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-                        :data="tableData"  border row-key="ID"
-                        size="small" 
+                        :data="tableData"  border row-key="ID" 
+                        size="small"  show-summary :summary-method="getSummaries"
                         highlight-current-row="true" @row-dblclick="updateCompanyFunc"
                         @row-click="tableRowClick" :show-overflow-tooltip="true"
-                        @selection-change="handleSelectionChange">
-                <!-- <el-table-column type="selection" width="55" /> -->
-				<el-table-column sortable align="left" label="订单编号" prop="订单编号" width="120"/>
-				<el-table-column sortable align="left" label="子订单编号" prop="子订单编号" width="140"/>
-				<el-table-column sortable align="left" label="款号" prop="款号" width="125"/>
-				<el-table-column sortable align="left" label="色系名称" prop="颜色" width="127"/>
-				<el-table-column sortable align="left" label="船样" prop="船样" width="80"/>
-				<el-table-column sortable align="left" label="尺码" prop="尺码" width="80"/>
-				<el-table-column sortable align="left" label="上报数量" prop="已完成" width="105"/>
-				<el-table-column sortable align="left" label="制单总数" prop="制单数" width="105"/>
-				<el-table-column sortable align="left" label="上报时间" prop="上报时间" width="160"/>
+                        @selection-change="selectionChange">
+				<el-table-column align="center" type="selection" width="30"/>
+				<el-table-column  align="left" label="订单编号" prop="订单编号" width="98"/>
+				<el-table-column  align="left" label="客户编号" prop="客户编号" width="80"/>
+				<el-table-column  align="left" label="款式" prop="款式" width="100"/>
+				<el-table-column  align="left" label="生产款号" prop="生产款号" width="110"/>
+				<!-- 尺码列表 -->
+				<template v-for="item in sizeDatas">
+				  <el-table-column align="left"  :label=item :prop=item  width="80"/> 
+				</template>
+				<el-table-column  align="left" label="制单数" prop="制单数" width="80"/>
+				<el-table-column  align="left" label="上报时间" prop="上报时间" width="150"/>
+				<el-table-column  align="left" label="船样" prop="船样" width="70"/>
+
               </el-table>
-              <!-- 分页 -->
               <div class="gva-pagination">
                 <el-pagination layout="total" :current-page="page" :page-size="pageSize"
                  :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-  <!--              <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="edit_closeDialog"  destroy-on-close style="width: 60%; height: 70%;">
-                  <h1 style="margin: 0%;margin-bottom: 10px;">出库报工修改</h1>
-                  <el-row :gutter="24"  style="margin-bottom: 20px;">
-                      <el-col :span="10">
-                          <el-form-item label="订单号:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['订单号']" style="width: 70%; height: 40px;" id="订单号:" />
-                          </el-form-item>
-                      </el-col>
-                      <el-col :span="12">
-                          <el-form-item label="生产款号:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['生产款号']" style="width: 70%; height: 40px;" id="生产款号" />
-                          </el-form-item>
-                      </el-col>
-                  </el-row>
-  
-                  <el-row :gutter="24"  style="margin-bottom: 20px;">
-                      <el-col :span="10">
-                          <el-form-item label="款式:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['款式']" style="width: 70%; height: 40px;" id="款式" />
-                          </el-form-item>
-                      </el-col>
-                      <el-col :span="12">
-                          <el-form-item label="颜色:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['颜色']" style="width: 70%; height: 40px;" id="颜色" />
-                          </el-form-item>
-                      </el-col>
-                  </el-row>
-  
-                  <el-row :gutter="24"  style="margin-bottom: 20px;">
-                      <el-col :span="10">
-                          <el-form-item label="工序:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['工序']" style="width: 70%; height: 40px;" id="工序" />
-                          </el-form-item>
-                      </el-col>
-                      <el-col :span="12">
-                          <el-form-item label="面料出库人:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['面料出库人']" style="width: 70%; height: 40px;" id="面料出库人" />
-                          </el-form-item>
-                      </el-col>
-                  </el-row>
-  
-                  <el-row :gutter="24"  style="margin-bottom: 20px;">
-                      <el-col :span="10">
-                          <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
-                              <el-input v-model="edit_formData['日期']" style="width: 70%; height: 40px;" id="日期" />
-                          </el-form-item>
-                      </el-col>
-                  </el-row>
-  
-                  <template #footer>
-                      <div class="dialog-footer">
-                          <el-button @click="edit_closeDialog"  style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
-                          <el-button type="primary" @click="edit_Dialog"  style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
-                      </div>
-                  </template>
-              </el-dialog>
-  
-  
-           <!-- 新增弹窗 -->
-            <el-dialog v-model="AttendanceVisible"  destroy-on-close  style="width: 100%;height: 100%;margin: 0px;">
-                <h1 style="margin: 0%;margin-bottom: 10px;">新增</h1>
-                <el-row :gutter="24" style="margin-bottom: 20px;">
-                    <el-input v-model="add_searchInfo" placeholder="扫描订单二维码获取订单信息" 
-                                  @keyup.enter="add_onSubmit"
-                                id="searchInput" 
-                                  style="width: 270px;margin: 5px;height: 50px;">
-                                  </el-input>
-                    <el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
-                    
-                    <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="100" style="font-size: 30px;margin: 10px;">
-                        <el-date-picker v-model="add_riqiformData['日期']" type="date" style="width: 150px;height: 40px;"/>
-                    </el-form-item>
-                    
-                </el-row>
-                
-                <el-row :gutter="24" style="margin-bottom: 50px;">
-                    <el-table ref="multipleTable" style="width: 100%;height: 54vh" tooltip-effect="dark"
-                              :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px' }"
-                              :cell-style="{ padding: '10px' }" :header-row-style="{ height: '20px' }"
-                              :data="add_tableData" border row-key="ID"
-                              size="small" highlight-current-row="true" @row-dblclick="add_updateCompanyFunc"
-                              @row-click="add_tableRowClick" :show-overflow-tooltip="true"
-                              @selection-change="handleSelectionChange">
-                        <el-table-column sortable align="left" label="订单编号" prop="订单编号" width="105"/>
-                        <el-table-column sortable align="left" label="子订单编号" prop="子订单编号" width="110"/>
-                        <el-table-column sortable align="left" label="款号" prop="款号" width="110"/>
-						<el-table-column sortable align="left" label="颜色" prop="颜色" width="110"/>
-						<el-table-column sortable align="left" label="船样" prop="船样" width="110"/>
-						<el-table-column sortable align="left" label="制单数" prop="制单数" width="110"/>
-						<el-table-column sortable align="left" label="已完成" prop="已完成" width="110"/>
-                    </el-table>
-                </el-row>
-                <template #footer>
-                    <div class="dialog-footer">
-                        <el-button @click="add_closeDialog"  style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
-                        <el-button type="primary" @click="add_Dialog"  style="width: 110px;height: 60px;font-size: 20px;">确认出库</el-button>
-                    </div>
-                </template>
-            </el-dialog>
-  
-  
           </el-main>
         </layout-content>
         </layout>
@@ -231,379 +170,531 @@
       }
     }
   };
-  </script>
-  <script setup>
-  // 全量引入格式化工具 请按需保留
-  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
-  
-  import {ref, reactive} from 'vue'
- import {MachineList,MachineDetail} from '@/api/mes/job'
-  import {ElMessage} from "element-plus";
-  defineOptions({name: 'Company'})
-  
-  // =========== 获取左侧树侧形结构 ===========
-  const treeData = ref({})
-  const DataListdata = async () => {
-    try {
-		const response = await MachineList();
-		const data = response.data;
-     treeData.value = formatTreeData(data);
-    } catch (error) {
-		console.error(error);
-    }
-  };
-  DataListdata();
-  
-// 格式化数据为 el-tree 组件要求的格式,同时在日期节点中保存父节点信息
-const formatTreeData = (data) => {
-  return Object.keys(data).map(category => ({
-    label: category,
-    children: Object.keys(data[category]).map(group => ({
-      label: group,
-      // 在日期节点中存储其父组名(简写)
-      children: data[category][group].map(item => ({
-        label: item.split(' ')[0], // 保留日期部分
-        parentGroup: group.split('--')[0] // 保留组名的简写部分
-      }))
-    }))
-  }));
-};
-  
-  //点击左侧树形 获取右侧table列表
-  const tableData = reactive([]);
-  const _Machine = ref('');
-  const _Machine_riqi = ref('');
-  let parentGroup = '';
-  //左侧
-  const handleNodeClick = async (node) => {
-	  // 取消所有节点的颜色
-	  const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
-	  allNodes.forEach(node => {
-		node.querySelector('.el-tree-node__label').style.color = '';
-	  });
-	  // 获取点击的节点
-	  const clickedNodeId = node['$treeNodeId'];
-	  const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
-	  if (clickedNode) {
-		// 给当前点击的节点改变颜色
-		clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
-	  }
-	  tableData.splice(0,tableData.length,...[]);//表格数据
-	 if (node.children) {
-		 // 如果是组节点,获取组名的简写
-		 _Machine.value = node.label.split('--')[0];
-		 _Machine_riqi.value = ''; // 清空日期
-	   } else {
-		 // 如果是日期节点,直接从节点中获取父组名和日期
-		 _Machine.value = node.parentGroup;
-		 _Machine_riqi.value = node.label;
-	   }
-	  console.log(_Machine.value);
-	  console.log( _Machine_riqi.value);
-	  
-		_getStaffList();
-  };
-  
+</script>
+<script setup>
+// 全量引入格式化工具 请按需保留
+import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import {ref, reactive,onMounted } from 'vue'
+import {MachineList,MachineDetail,getOneWorkOrder,spotcheckdel} from '@/api/mes/job'
+import {ElMessage} from "element-plus";
+import { useUserStore } from '@/pinia/modules/user';
+defineOptions({name: 'Company'})
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+const hours = String(today.getHours()).padStart(2, '0');
+const minutes = String(today.getMinutes()).padStart(2, '0');
+const seconds = String(today.getSeconds()).padStart(2, '0');
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
+const treeData = ref([]);
+ 
 
-  // const handleNodeExpand = async (node) => {
-  //   // _department_code.value = node['编号'];
-  //   searchInfo.value = '';
-  //  _getStaffList();
-  // }
-  
-  // =========== 搜索 ===========
-  const searchInfo = ref('')
-  const _department_code = ref(null)
-  //查询
-  const onSubmit = () => {
-    _department_code.value = '';
-    if(searchInfo.value === ''){
-      tableData.length = 0;
-    }else{
-     _getStaffList();
-    }
-  };
-  //调用报工数据接口
-  const _getStaffList = async ()=>{
-      try {
-		  if(_Machine_riqi.value === ''){
-			 const WorkListdata = await MachineDetail({ machine: _Machine.value });
-			 console.log(WorkListdata);
-			 // 遍历数据,将 "船样" 由 0/1 转换为 "否"/"是"
-			 WorkListdata.data.forEach(item => {
-			     item.船样 = item.船样 === 1 ? '是' : '否';  // 将 1 转换为 "是",0 转换为 "否"
-			 });
-			 // 更新表格数据
-			 tableData.splice(0, tableData.length, ...WorkListdata.data);
-		  }else{
-			  const WorkListdata = await MachineDetail({machine:_Machine.value,date:_Machine_riqi.value});
-			  console.log(WorkListdata)
-			  // 遍历数据,将 "船样" 由 0/1 转换为 "否"/"是"
-			  WorkListdata.data.forEach(item => {
-			      item.船样 = item.船样 === 1 ? '是' : '否';  // 将 1 转换为 "是",0 转换为 "否"
-			  });
-			  tableData.splice(0,tableData.length,...WorkListdata.data);//表格数据
-		  }
-          // total.value =WorkListdata.data.total;//共多少条
-    } catch (error) {
-      console.error(error);
+const DataListdata = async () => {
+  try {
+    const response = await MachineList(); // 假设 MachineList 是一个已定义的 API 请求函数
+    const data = response.data;
+    
+    // 初始化树形结构数据
+    treeData.value = [];
+
+    // 遍历 data 对象
+    for (const [yearMonth, machineList] of Object.entries(data)) {
+      // 创建一个新的一级节点(年月)
+      const yearMonthNode = {
+        label: yearMonth,  // 年月作为一级节点
+        children: []  // 二级节点的容器
+      };
+
+      // 遍历每个生产工序
+      for (const [process, machines] of Object.entries(machineList)) {
+        // 创建一个新的二级节点(生产工序)
+        const processNode = {
+          label: process,  // 生产工序作为二级节点
+          children: []  // 机器信息的容器
+        };
+
+        // 遍历每个机器编号及其日期
+        for (const [machine, dates] of Object.entries(machines)) {
+          // 创建一个三级节点(机器编号)
+          const machineNode = {
+            label: machine,  // 机器编号作为三级节点
+            children: dates.map(date => ({ label: date, parent: null }))  // 日期作为四级节点
+          };
+
+          // 为每个日期节点添加 `parent` 属性指向机器节点
+          machineNode.children.forEach(dateNode => {
+            dateNode.parent = machineNode;
+          });
+
+          // 将机器节点的 `parent` 指向生产工序节点
+          machineNode.parent = processNode;
+
+          // 将该机器节点添加到对应的生产工序下
+          processNode.children.push(machineNode);
+        }
+
+        // 将生产工序节点的 `parent` 指向年月节点
+        processNode.parent = yearMonthNode;
+
+        // 将生产工序节点添加到对应的年月节点下
+        yearMonthNode.children.push(processNode);
+      }
+
+      // 将年月节点添加到树形结构的根节点
+      treeData.value.push(yearMonthNode);
     }
+  } catch (error) {
+    console.error(error);
   }
+};
+DataListdata();
   
-  // =========== 新增按钮 ===========
-  const AttendanceVisible=ref(false)
-  const add_tableData = reactive([]);
-  // 获取当前日期
-  const today = new Date();
-  const year = today.getFullYear();
-  const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
-  const day = String(today.getDate()).padStart(2, '0');
-  const hours = String(today.getHours()).padStart(2, '0');
-  const minutes = String(today.getMinutes()).padStart(2, '0');
-  const seconds = String(today.getSeconds()).padStart(2, '0');
-  const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
-  
-  //新增按钮
-  const onAttendance = () => {
-      AttendanceVisible.value=true
-      setTimeout(() => {
-          const inputElement = document.querySelector('#searchInput');
-          if (inputElement) {
-              inputElement.focus();
-          }
-      }, 100); // 延迟100毫秒
-      add_riqiformData['日期'] = currentDate
-  };
-  const add_riqiformData = reactive({
-    日期: '',
+// 点击左侧树形 获取右侧 table 列表
+const tableData = reactive([]);
+const _Machine = ref('');
+const _Machine_riqi = ref('');
+let parentGroup = '';
+
+// 左侧树形节点点击事件
+const handleNodeClick = async (node) => {
+  // 重置所有节点颜色
+  document.querySelectorAll('.treecolor .el-tree-node').forEach(node => {
+    node.querySelector('.el-tree-node__label').style.color = '';
   });
-  // 新增确定
-  const add_Dialog = () => {
-     AttendanceVisible.value = false
-  };
-  // 新增取消
-  const add_closeDialog = () => {
-      AttendanceVisible.value = false
-  };
-  
-  // =========== 新增搜索 ===========
-  const add_searchInfo = 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{
-      console.log(add_searchInfo.value)
-      if(add_searchInfo.value === '2408001'){
-          const WorkListdata = [
-              {
-                '订单子编号':'2408001-1',
-                '订单号':'2408001',
-                '生产款号':'2401-1622款',
-                '款式':'连衣裙',
-                '颜色':'红色'
-              },
-              {
-                '订单子编号':'2408001-2',
-                '订单号':'2408001',
-                '生产款号':'2401-1623款',
-                '款式':'长袖',
-                '颜色':'蓝色'
-              },
-          ];
-          add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
-      }else if(add_searchInfo.value === '2408002'){
-          const WorkListdata = [
-              {
-                '订单子编号':'2408002-2',
-                '订单号':'2408002',
-                '生产款号':'2402-1624款',
-                '款式':'西服',
-                '颜色':'白色'
-              },
-          ];
-          add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
-      }else if(add_searchInfo.value === '2408003'){
-          const WorkListdata = [
-              {
-                '订单子编号':'2408003-3',
-                '订单号':'2408003',
-                '生产款号':'2403-1625款',
-                '款式':'西服',
-                '颜色':'白色'
-              },
-          ];
-          add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
-      }
-      add_searchInfo.value  = '';
-      setTimeout(() => {
-          const inputElement = document.querySelector('#searchInput');
-          if (inputElement) {
-              inputElement.focus();
-          }
-      }, 100); // 延迟100毫秒
-    }
-  };
-  // =========== 删除按钮 ===========
-  const bgSelection = ref(null)
-  const baogong_del = () => {
-      if(bgSelection.value === null || bgSelection.value === ''){
-            ElMessage({type: 'warning',message: '请选择删除的数据' })
-      }else{
-           console.log(bgSelection.value)
-      }
-  }
-  // 复选框
-  const handleSelectionChange = (selection, type) => {
-    const ids = selection.map(item => {
-      return item.订单子编号
-    })
-    bgSelection.value = ids.join(',')
+
+  // 获取当前点击的节点并设置颜色
+  const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${node['$treeNodeId']}"]`);
+  if (clickedNode) {
+    clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
   }
-  
-  // =========== 修改 ===========
-  const dialogFormVisible = ref(false)
-  const edit_formData = ref({})
-  // 双击修改
-  const updateCompanyFunc = async (row) => {
-      console.log(row)
-      dialogFormVisible.value = true;
-      Object.assign(edit_formData.value,row);
-  };
-  // 修改确认
-  const edit_Dialog = async (row) => {
-      dialogFormVisible.value = false;
-  };
-  // 修改取消
-  const edit_closeDialog = async (row) => {
-      dialogFormVisible.value = false;
-  };
-  // =========== 分页 ===========
-  // 分页相关的响应式变量
-  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();
-  };
 
+  // 清空表格数据
+  tableData.splice(0, tableData.length);
 
- 
+  // 判断点击节点的层级并设置相应值
+  if (!node.children || node.children.length === 0) {  // 底层日期节点
+    _Machine_riqi.value = node.label;  // 设置日期
+    const parentNode = node.parent;
 
-  
-  </script>
-  
-  <style scoped>
-  .form-container {
-    display: flex;
-    flex-wrap: wrap;
+    // 获取机台名称
+    if (parentNode && parentNode.label.includes('--')) {
+      _Machine.value = parentNode.label.split('--')[0];  // 获取机台名
+    }
+  } else {  
+    // 非日期节点时清空 _Machine 和 _Machine_riqi
+    _Machine.value = '';
+    _Machine_riqi.value = '';
   }
+
+  // 调用获取员工列表的函数
+  _getStaffList();
+};
+
+
+
+// =========== 搜索 ===========
+const searchInfo = ref('')
+const _department_code = ref('')
+//查询
+const onSubmit = () => {
+	_department_code.value = '';
+	if(searchInfo.value === ''){
+	  tableData.length = 0;
+	}else{
+	 _getStaffList();
+	}
+};
+
+//尺寸列表
+const sizeDatas = reactive([])
+//调用报工数据接口
+const _getStaffList = async ()=>{
+	console.log(_Machine.value)
+	console.log("日期",_Machine_riqi.value)
+  try {
+	  const WorkListdata = await MachineDetail({machine:_Machine.value,date:_Machine_riqi.value,order:searchInfo.value});
+	  console.log(WorkListdata)
+	  //将 1 转换为 "是",0 转换为 "否"
+	  WorkListdata.data.table.forEach(item => {
+		  item.船样 = item.船样 === 1 ? '是' : '否';
+	  });
+	  sizeDatas.splice(0,WorkListdata.data.headers.length,...WorkListdata.data.headers);
+	  tableData.splice(0,tableData.length,...WorkListdata.data.table);
+	  total.value = WorkListdata.data.length
+	  // searchInfo.value = ''
+} catch (error) {
+  console.error(error);
+}
+}
+
+  //合计
+  const getSummaries = (param) => {  
+    const { columns, data } = param;  
+    const sums = {};  
+	//选择你希望合计的列
+    const summableLabels = [...sizeDatas,];
+    columns.forEach((column, index) => {  
+        if (index === 1) {  
+            sums[index] = '总数量合计';  
+            return;  
+        }  
   
-  .form-column {
-    /*flex: 1;*/
-    margin-right: 15px; /* 调整列之间的间距 */
-  }
+        if (summableLabels.includes(column.label)) {  
+            const values = data.map(item => Number(item[column.property]));  
   
-  /* 左侧输入框宽度调整 */
-  .form-column .el-form-item .el-input {
-    width: 150px; /* 调整左侧输入框的宽度 */
-  }
+            // 检查数组中是否所有值都是 NaN  
+            if (!values.every(value => isNaN(value))) {  
+                sums[index] = values.reduce((prev, curr) => {  
+                    const value = Number(curr);  
+                    if (!isNaN(value)) {  
+                        return prev + value; 
+                    }  
+                    return prev;  
+                }, 0);  
+                // 如果需要,可以在这里添加单位  
+                // sums[index] += ' 件';  
+            } else {  
+                 sums[index] = '';  
+            }  
+        }  
+    });  
   
-  /* 媒体查询,根据需要调整断点 */
-  @media screen and (max-width: 768px) {
-    .form-column {
-      flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
-      margin-right: 0;
+    return sums;  
+};  
+//=========查询产量进度表============
+const statusExceldialog = ref(false)
+const ExcelformData = ref({})
+const ExceltableData = reactive([]);
+const statusExcel = () => {
+	statusExceldialog.value = true
+	const today = new Date();
+	ExcelformData.value.rq = today;
+	ExcelonSubmit();
+}
+// 选中的日期
+const selectedDate = ref(null);
+// 查询按钮的点击事件
+const ExcelonSubmit = async ()=>{
+	// 日期转换
+	let lhrq_formattedDeliveryDate = ''
+	// 检查是否有选中的日期
+	if (ExcelformData.value.rq) {
+	// 将日期转换为JavaScript的Date对象
+	const date = new Date(ExcelformData.value.rq)
+	// 格式化日期为YYYY-MM-DD
+	lhrq_formattedDeliveryDate = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`
+	}
+	const getOneWorkOrderdata = await getOneWorkOrder({riqi:lhrq_formattedDeliveryDate});
+	console.log(getOneWorkOrderdata)
+	ExceltableData.splice(0,ExceltableData.length,...getOneWorkOrderdata.data);
+}
+
+
+//报工删除
+const delall = ref(true)
+const Selection = ref('')
+const selectionChange = (selection, type) => {
+  console.log(selection)
+	const ids = selection.map(item => {
+		return item.UniqId
+	})
+	Selection.value = ids.join(',')
+}
+const del_delclick = async () => {
+	console.log(Selection.value)
+	console.log(_username.value)
+	const res1 = await spotcheckdel({UniqId:Selection.value,sys_id:_username.value})
+	res1.code === 0 && ElMessage.success('删除成功')
+	_getStaffList()
+}
+
+
+//导出Ex
+const exportToExcel2 = () => {
+  const data = ExceltableData;
+  const fixedProcessList = ['裁剪', '车缝', '手工', '大烫', '总检', '包装'];
+
+  // 按工序对数据进行分组
+  const groupedData = data.reduce((acc, item) => {
+    const { 工序 } = item;
+    if (!acc[工序]) {
+      acc[工序] = [];
     }
+    acc[工序].push(item);
+    return acc;
+  }, {});
+
+  // 设置每一列的宽度,您可以在这里调整各列宽度
+  const columns = [
+    // { label: '订单编号', prop: '订单编号', width: 10 }, 
+    { label: '组别', prop: '组别', width: 9 },
+    { label: '款号', prop: '款号', width: 9 },
+    { label: '款式', prop: '款式', width: 12 }, 
+    { label: '工序', prop: '工序', width: 4 },
+    { label: '制单数', prop: '制单数', width: 6 },
+    { label: '裁剪数', prop: '裁剪数', width: 6 },
+    { label: '上月累计', prop: '上月累计', width: 8 },
+    { label: '本月累计', prop: '本月累计', width: 8 },
+    ...Array.from({ length: 31 }, (_, i) => ({
+      label: `${i + 1}`,
+      prop: `${i + 1}`,
+      width: 4 // 每天的列宽为5
+    }))
+  ];
+
+  const wb = XLSX.utils.book_new();
+
+  // 为每个工序创建工作表
+  fixedProcessList.forEach((工序) => {
+    const sheetData = groupedData[工序] || [];
+    const sheetHeader = [columns.map(col => col.label)];
+    const sheetBody = sheetData.map(item => columns.map(col => item[col.prop] ?? ''));
+
+    // 计算每一列的合计值
+    const totals = columns.map((col) => {
+      if (['制单数', '裁剪数', '上个月累计', '本月累计', ...Array.from({ length: 31 }, (_, i) => `${i + 1}`)].includes(col.prop)) {
+        return sheetData.reduce((sum, item) => sum + (parseFloat(item[col.prop]) || 0), 0);
+      }
+      return ''; // 非数字列不计算
+    });
+
+    // 在 "款式" 列中写入 "汇总合计"
+    totals[columns.findIndex(col => col.prop === '款式')] = '汇总合计';
+
+    // 将合计行加入到表格数据中
+    sheetBody.push(totals);
+
+    // 合并表头和数据
+    const wsData = [...sheetHeader, ...sheetBody];
+    const ws = XLSX.utils.aoa_to_sheet(wsData);
+
+    // 设置列宽
+    ws['!cols'] = columns.map(col => ({ wch: col.width }));
+
+    // 添加边框样式
+    const borderStyle = {
+      top: { style: 'thin' },
+      bottom: { style: 'thin' },
+      left: { style: 'thin' },
+      right: { style: 'thin' }
+    };
+    Object.keys(ws).forEach(cell => {
+      if (cell[0] !== '!') {
+        ws[cell].s = { border: borderStyle };
+      }
+    });
+
+    // 将工作表添加到工作簿
+    XLSX.utils.book_append_sheet(wb, ws, 工序);
+  });
+
+  // 生成文件名
+  const year = new Date(ExcelformData.value.rq).getFullYear();
+  const month = (new Date(ExcelformData.value.rq).getMonth() + 1).toString().padStart(2, '0');
+  const filename = `服装生产部${year}年${month}月份日产量进度表.xlsx`;
+
+  // 导出 Excel 文件
+  const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
+  try {
+    FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
+  } catch (e) {
+    console.log(e);
   }
-  /*: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 AttendanceVisible=ref(false)
+const add_tableData = reactive([]);
+
+
+//新增按钮
+const onAttendance = () => {
+  AttendanceVisible.value=true
+  setTimeout(() => {
+	  const inputElement = document.querySelector('#searchInput');
+	  if (inputElement) {
+		  inputElement.focus();
+	  }
+  }, 100); // 延迟100毫秒
+  add_riqiformData['日期'] = currentDate
+};
+const add_riqiformData = reactive({
+日期: '',
+});
+// 新增确定
+const add_Dialog = () => {
+ AttendanceVisible.value = false
+};
+// 新增取消
+const add_closeDialog = () => {
+  AttendanceVisible.value = false
+};
+
+// =========== 新增搜索 ===========
+const add_searchInfo = ref('')
+//点击【查询】按钮
+const add_onSubmit = async ()=>{
   
-  /* 选中某行时的背景色 */
-  :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;
+
+};
+// =========== 删除按钮 ===========
+const bgSelection = ref(null)
+const baogong_del = () => {
+  if(bgSelection.value === null || bgSelection.value === ''){
+		ElMessage({type: 'warning',message: '请选择删除的数据' })
+  }else{
+	   console.log(bgSelection.value)
   }
-  </style>
-  
+}
+// 复选框
+const handleSelectionChange = (selection, type) => {
+const ids = selection.map(item => {
+  return item.订单子编号
+})
+bgSelection.value = ids.join(',')
+}
+
+// =========== 修改 ===========
+const dialogFormVisible = ref(false)
+const edit_formData = ref({})
+// 双击修改
+const updateCompanyFunc = async (row) => {
+};
+// 修改确认
+const edit_Dialog = async (row) => {
+  dialogFormVisible.value = false;
+};
+// 修改取消
+const edit_closeDialog = async (row) => {
+  dialogFormVisible.value = false;
+};
+// =========== 分页 ===========
+// 分页相关的响应式变量
+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-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;
+}
+</style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
src/view/yunyin/shengchanguanli/components/print.vue


Dosya farkı çok büyük olduğundan ihmal edildi
+ 264 - 685
src/view/yunyin/shengchanguanli/gongdanziliao.vue


+ 82 - 135
src/view/yunyin/shengchanguanli/shengchanpaichan.vue

@@ -10,24 +10,20 @@
               <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 180px;"></el-input>
               <el-button type="primary" icon="search" @click="onSubmit" >查询</el-button>
               <!-- <el-button type="primary" title="设置工单的状态--【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button> -->
-
               <div v-if="(currentNode == '计划中') && treeType === 'customTree'">
                 <!-- <el-button type="primary" title="排产" icon="edit" @click="ongxztgzClick" class="bt">排产</el-button> -->
                 <!-- <el-button type="primary" title="修改" icon="edit" @click="pd_yysjcsonClick" class="bt">修改</el-button> -->
               </div> 
-
               <div v-if="(currentNode == '制程中') && treeType === 'customTree'">
                 <el-button type="primary" title="修改" icon="edit" @click="pd_yysjcsonClick" class="bt">修改</el-button>
               </div> 
-
               <div v-if="(currentNode == '已完工') && treeType === 'customTree'">
-
               </div> 
 
               <div v-else>
               </div> 
-              <el-button type="primary" title="打印生产工单" icon="edit" @click="pd_gdprintonClick" class="bt">订单打印</el-button>
-			 <el-button type="primary" icon="edit"   @click="del_ddzlClick" v-if="table_del=== true" :disabled="table_Selection === ''"  class="bt" title="删除"  >删除</el-button>
+              <!-- <el-button type="primary" title="打印生产工单" icon="edit" @click="pd_gdprintonClick" class="bt">订单打印</el-button> -->
+			 <!-- <el-button type="primary" icon="edit"   @click="del_ddzlClick" v-if="table_del=== true" :disabled="table_Selection === ''"  class="bt" title="删除"  >删除</el-button> -->
             </el-form-item>
           </el-form>
 
@@ -344,9 +340,6 @@
                   </el-form-item>
                   </el-form-item>
                 </div>
-
-
-
               </el-form>
               <template #footer>
                 <div class="dialog-footer" style="text-align: right;">
@@ -361,7 +354,7 @@
 
       <!-- 左侧 -->
       <layout>
-        <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+        <layout-sider :resize-directions="['right']" :width="280" style="margin-right: 10px;">
           <div class="JKWTree-tree" style="height: 200px">
 			  <h3>车缝车间列表</h3>
             <el-tree :data="treeData" :props="defaultProps" class="treecolor"  :current-node-key="currentNodeKey" @node-click="handleNodeClick"></el-tree>
@@ -383,17 +376,7 @@
                 </template>
               </el-table>
               <!-- 分页 -->
-              <div class="gva-pagination" v-if="(currentNode == '计划中' || currentNode == '已完工') &&  treeType === 'customTree'">
-                <el-pagination
-                    @size-change="jhz_handleSizeChange"
-                    @current-change="jhz_handleCurrentChange"
-                    :current-page="jhz_page"
-                    :page-sizes="[10,30,50,100]"
-                    :page-size="30"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="jhz_total">
-                </el-pagination>
-              </div>
+             
             </div>
 
             <el-tabs v-model="activeName" @tab-click="handleClick" v-if="(currentNode == '计划中' || currentNode == '已完工') &&  treeType === 'customTree'">
@@ -469,14 +452,19 @@
                 <!-- 车缝小烫车间列表-->
                 <el-table-column type="selection" width="30" />
                 <template v-for="item in [
-                  { align:'left', title:'订单编号', prop: '订单编号', width: 150, sortable: 'sortable', },
-                  { align:'left', title: '子订单编号', prop: '子订单编号', width: 150, sortable: 'sortable', },
-                  { align:'left', title: '班组编号', prop: '班组编号', width: 150,  sortable: 'sortable', },
-                  { align:'left', title: '创建人员', prop: '创建人员', width: 200,  sortable: 'sortable', },
-				  { align:'left', title: '创建时间', prop: '创建时间', width: 200,  sortable: 'sortable', },
+                  { align:'left', title:'订单编号', prop: '订单编号', width: 110, sortable: 'sortable', },
+                  { align:'left', title: '客户编号', prop: '客户编号', width: 110, sortable: 'sortable', },
+                  { align:'left', title: '款式', prop: '款式', width: 110,  sortable: 'sortable', },
+				  { align:'left', title: '生产款号', prop: '生产款号', width: 160,  sortable: 'sortable', },
+				  { align:'left', title: '落货日期', prop: '落货日期', width: 120,  sortable: 'sortable', },
+				  { align:'left', title: '生产时间', prop: '创建时间', width: 160,  sortable: 'sortable', },
               ]">
                   <el-table-column :align="item.align" :label="item.title"  :fixed="item.fixed" :prop="item.prop" :width="item.width" :sortable="item.sortable" />
                 </template>
+				 <div class="gva-pagination">
+				                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
+				                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+				              </div>
               </el-table> 
             </div>
           </el-main>
@@ -527,88 +515,70 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, reactive,onMounted } from 'vue'
 import dayjs from 'dayjs'
 import {MachineList,MachineDetail,CfmachineList,CfdataList,CfdataDel} from '@/api/mes/job'
-import {
-  DataList,
-  getProduct,
-  getProductData,
-  scheduleProcess,
-  ProductionSchedulingAdd,
-  Project,
-  StatusEdit,
-  EquipmentScheduling,
-  ScheduleSelection,
-  MachineWorkOrderList,
-  projectCraft,
-  ProcessStatusCorrection,
-  ProductionSchedulingPause,
-  ProcessStatusCorrectionEdit,
-  projectPrint,
-  setProductStatus,
-  workbench,
-  ProcessFlow,
-  Schedule,
-  complete,
-  getOrderProcessCount,
-  getOrderProcessLeft,
-  getOrderProcessRight,
-  EquipmentSchedulingEdit,
-  MachineTeamEdit,
-  PrintDetailList
+import {DataList,getProduct,ProductionSchedulingAdd,Project,
+  StatusEdit,EquipmentScheduling,ScheduleSelection,MachineWorkOrderList,ProcessStatusCorrection,
+  ProductionSchedulingPause,ProcessStatusCorrectionEdit,Schedule,complete,getOrderProcessCount,
+  getOrderProcessLeft,EquipmentSchedulingEdit,MachineTeamEdit,PrintDetailList
 } from "@/api/yunyin/yunying";
 
 import PrintPage from './components/print.vue'
-defineOptions({name: 'Company'})
 
+import { useUserStore } from '@/pinia/modules/user';
+defineOptions({name: 'Company'})
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+const hours = String(today.getHours()).padStart(2, '0');
+const minutes = String(today.getMinutes()).padStart(2, '0');
+const seconds = String(today.getSeconds()).padStart(2, '0');
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
 const printPageRef = ref()
-
-// =========== 左侧树侧形结构 ===========
-
 //上方表格
 const tableFields = ref({})
-
-
-
-// =========== 获取左侧树侧形结构 ===========
-  const treeData = ref([]);  
-  const _department_code = ref(null)
-const getDepartmentdata = async () => {  
-  try {  
-	const CfmachineLists = await CfmachineList();
-	CfmachineLists.data.forEach(id => {
-	  treeData.value.push({  
-	    label: id,
-	  });  
-	}); 
-  } catch (error) {  
-    console.error(error);  
-  }  
-};  
-  
-getDepartmentdata();
-  
-
-
 //全局获取工单编号
 const _Gd_gdbh = ref(null)
 const _Gd_yjno = ref(null)
-//点击表格 通过上方表格【工单编号】获取下方表格数据
-const chejianRowClick = async (row) => {
-	console.log(row.订单编号)
-  _Gd_gdbh.value = row.订单编号;
-}
-const gdtableRowClick = async (row) => {
-  _Gd_gdbh.value = row.订单号
-};
-//点击左侧树形获取侧边栏列表数据
-// const tableData = ref([]);
 const tableData = reactive([])
 const chejianData = reactive([])
 const _machine = ref(null);
+const _Machine_riqi = ref(null);
 const treeType = ref('dataTree') // customTree // 计划中,排产中 ,dataTree 车间
 const machine = ref('');//记录左侧车间机台编号
+
+// =========== 获取左侧树侧形结构 ===========
+const treeData = ref([]);
+const _department_code = ref(null); 
+const getDepartmentdata = async () => {
+  try {
+    //车缝派工菜单
+    const CfmachineLists = await CfmachineList();
+    console.log(CfmachineLists); 
+    const [yearMonth, machineList] = Object.entries(CfmachineLists.data)[0];
+    treeData.value.push({
+      label: yearMonth,  // 年月作为一级节点
+      children: machineList.map(id => ({
+        label: id  // 每个设备编号作为二级节点
+      }))
+    });	
+	_Machine_riqi.value=yearMonth
+    console.log(treeData.value);
+  } catch (error) {
+    console.error('获取数据失败:', error);
+  }
+};
+getDepartmentdata();
+
+
 //点击左侧菜单栏
 const handleNodeClick = async (node) => {
-	
   // 取消所有节点的颜色
   const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
   allNodes.forEach(node => {
@@ -621,22 +591,15 @@ const handleNodeClick = async (node) => {
     // 给当前点击的节点改变颜色
     clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
   }
-
-  console.log(node.type)
-  
-  if (node.type && node.type === '__customer') {
-    treeType.value = 'customTree'
-    schandleNodeClick(node)
-  } else if (!node.children) {
-	 machine.value =  node.label
-    treeType.value = 'dataTree'
-    const CfdataListtable = await CfdataList({machine:machine.value});
-    console.log(99999,CfdataListtable)
-    const cjData = CfdataListtable.data
-    console.log(cjData)
-    chejianData.splice(0,chejianData.length,...cjData);//表格数据
-  } 
+   // 以 '【' 分隔,取第一部分
+  const machineCode = node.label.split('【')[0]; 
+  console.log(machineCode);  // 输出: CF01
+  console.log(_Machine_riqi.value);  // 输出: 日期
+  const CfdataListtable = await CfdataList({machine:machineCode});
+  chejianData.splice(0,chejianData.length,...CfdataListtable.data.table);
+  jhz_total.value = CfdataListtable.data.table
 };
+
 //默认显示计划中表格
 const currentNode = ref("计划中")
 //计划中、已完工下方印件资料
@@ -945,39 +908,23 @@ const schandleNodeClick = async (node) => {
   }
 };
 //分页
-const jhz_page = ref(1)//前往多少页
-const jhz_total = ref(0)//共多少条
-const jhz_pageSize = ref(30)//一页多少条
-const jhz_handleCurrentChange = (val) => {
-  jhz_page.value = val;
-  _jhz_Projectdata_page();
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+page.value = val;
+_getStaffList();
 };
+
 // 修改页面容量 点击多少条/页
-const jhz_handleSizeChange = (val) => {
-  jhz_pageSize.value = val;
-  _jhz_Projectdata_page();
-};
-//分页查询调用接口
-const _jhz_Projectdata_page = async () => {
-  if( _cname.value === null ||  _cname.value === ''){
-    return false;
-  }
-  const jhz_Projectdata = await Project({status: _cname.value,search:'',page:jhz_page.value,limit:jhz_pageSize.value});
-  for (let i = 0; i < jhz_Projectdata.data.data.length; i++) {
-    const item = jhz_Projectdata.data.data[i];
-    if (item.status === 0) {
-      //获取状态
-      item.statusColumn = "*";
-    }
-    // 如果 status 为 1,可以在相应列中添加其他内容
-    else if (item.status === 1) {
-      item.statusColumn = "";
-    }
-  }
-  tableData.value = jhz_Projectdata.data.data;
-  jhz_total.value = jhz_Projectdata.data.total;//共多少条
+const handleSizeChange = (val) => {
+page.value = 10;//默认显示
+pageSize.value = val;
 };
 
+
 //左上角搜索计划中、已完工工单编号
 const searchInfo = ref('');
 //搜索按钮

+ 18 - 40
src/view/yunyin/shengchanguanli/yangyipihe.vue

@@ -15,15 +15,7 @@
 		</layout-header>
   
 		<layout>
-		  <!--左侧树侧形结构-->
-		  <!-- <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
-			<div class="JKWTree-tree" style="height: 200px">
-			  <h3>客户编号</h3>
-			  <el-tree :data="treeData" class="treecolor" :current-node-key="currentNodeKey" @node-click="handleNodeClick">
-			  </el-tree>
-			</div>
-		  </layout-sider> -->
-  
+
 		  <!-- 右侧区域 -->
 		  <layout-content >
 		  <!-- <el-main> -->
@@ -64,34 +56,6 @@
 						<el-table-column  sortable align="left" label="审核日期" prop="审核日期"  width="120" />
 					</el-table>
 				</el-tab-pane>
-
-              <!-- <el-tab-pane label="样衣已核批列表"  @click="showTable('样衣已核批列表')" name="second">
-				<el-table ref="multipleTable"  :row-style="{ height: '20px' }"
-							:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-							:header-cell-style="{ padding: '0px' }"
-							highlight-current-row="true"
-							 @row-click="yyyp_clickybupdate"
-                        	 @row-dblclick="yyyp_updateCompanyFunc"
-							style="width: 100%;height: 65vh" border  :data="tableData2" row-key="ID" >
-						<el-table-column  sortable align="center" label="序号" prop="序号"  width="80" />
-						<el-table-column  sortable align="center" label="订单子编号" prop="订单子编号"  width="120" />
-						<el-table-column  sortable align="center" label="颜色名称" prop="颜色名称"  width="120" />
-						<el-table-column  sortable align="center" label="生产款号" prop="生产款号"  width="120" />
-						<el-table-column  sortable align="center" label="客户" prop="客户"  width="100" />
-						<el-table-column  sortable align="center" label="船样" prop="船样"  width="90" />
-						<el-table-column  sortable align="center" label="S" prop="S"  width="80" />
-						<el-table-column  sortable align="center" label="M" prop="M"  width="80" />
-						<el-table-column  sortable align="center" label="L" prop="L"  width="80" />
-						<el-table-column  sortable align="center" label="XL" prop="XL"  width="80" />
-						<el-table-column  sortable align="center" label="XXL" prop="XXL"  width="80" />
-						<el-table-column  sortable align="center" label="制单总数" prop="制单总数"  width="120" />
-						<el-table-column  sortable align="center" label="建档用户" prop="建档用户"  width="120" />
-						<el-table-column  sortable align="center" label="建档日期" prop="建档日期"  width="120" />
-						<el-table-column  sortable align="center" label="更新时间" prop="更新时间"  width="120" />
-						<el-table-column  sortable align="center" label="核批人" prop="核批人"  width="100" />
-						<el-table-column  sortable align="center" label="核批日期" prop="核批日期"  width="120" />
-					</el-table>
-              </el-tab-pane> -->
             </el-tabs>
 
   
@@ -131,12 +95,26 @@
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   import {ref, reactive} from 'vue'
   import {UnapprovalList,Approval} from '@/api/mes/job'
-  
   import {jcgetTab,workOrderDetail,getOrderProcessCount,PrintDetailList} from '@/api/yunyin/yunying'
   import PrintPage from './components/print.vue'
   import {ElMessage} from "element-plus";
-  defineOptions({name: 'Company'})
-
+import { useUserStore } from '@/pinia/modules/user';
+defineOptions({name: 'Company'})
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+const hours = String(today.getHours()).padStart(2, '0');
+const minutes = String(today.getMinutes()).padStart(2, '0');
+const seconds = String(today.getSeconds()).padStart(2, '0');
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
 //进入页面显示所有数据
 const getUnapprovalList = async () => {
   try {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor