liuhairui 1 жил өмнө
parent
commit
e0bda2096f

+ 119 - 237
src/view/performance/baozhuangbaogong.vue

@@ -7,9 +7,7 @@
 				<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="5"  style="padding: 0px;margin: 0px;"> -->
-					  <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
-					<!-- </el-col> -->
+					&nbsp;<el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
 				
 					<!-- 查询按钮 -->
 					<el-col :span="1.5"  style="padding: 0px;margin: 0px;">
@@ -43,25 +41,25 @@
 				
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
-						<el-text style="font-size: 30px;">尺码</el-text>
+						<el-text style="font-size: 30px;">&nbsp;尺码</el-text>
 					</el-col>
 					<!-- 尺码输入框 -->
 					<!-- &nbsp;&nbsp;&nbsp;
-					<p style="font-size: 24px;color: red;">{{add_formData['尺码']}}</p>
+					<p style="font-size: 24px;color: red;border: 2px black solid;padding: 5px 15px 5px 15px;">{{add_formData['尺码']}}</p>
 					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -->
-					<el-col :span="2"><el-input v-model="add_formData['尺码']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['尺码']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">总数量</el-text>
 					</el-col>
 					<!-- 总数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['总数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['总数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">剩余数量</el-text>
 					</el-col>
 					<!--剩余数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 						
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">上报数量</el-text>
@@ -101,7 +99,7 @@
 						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
-								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+								<el-tab-pane label="报工历史记录"   name="first">
 									<el-table ref="multipleTableRef" style="width: 100%;height: 53vh"
 										:row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 										:cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -127,41 +125,52 @@
 								
 							 <el-tab-pane label="订单资料附件" name="third">
 							   <el-table ref="multipleTable"
-							             :row-style="{ height: '30px' }"
-							             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							             :header-cell-style="{ padding: '0px' }"
-							             :show-overflow-tooltip="true"
-							             :cell-class-name="planUsageCellClass"
-							             highlight-current-row="true"
-							             @row-dblclick="gdbomupdateCompanyFunc"
-							             style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
-							 						   @selection-change="fjSelectionChange">
+							 			:row-style="{ height: '30px' }"
+							 			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+							 			:header-cell-style="{ padding: '0px' }"
+							 			:show-overflow-tooltip="true"
+							 			:cell-class-name="planUsageCellClass"
+							 			highlight-current-row="true"
+							 			@row-dblclick="gdbomupdateCompanyFunc"
+							 			style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+									   @selection-change="fjSelectionChange">
 							    <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
 							    <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
 							    <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
 							    <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
 							    <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								 <el-table-column align="left" label="操作"width="100"fixed="right">
+								   <template #default="scope">
+									 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+								   </template>
+								 </el-table-column>
 							   </el-table>
 							 </el-tab-pane> 
 							 
-							   <el-tab-pane label="技术附件"  name="fourth">
-							   	<el-table ref="multipleTable"
-							 			  :row-style="{ height: '30px' }"
-							 			  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							 			  :header-cell-style="{ padding: '0px' }"
-							 			  :show-overflow-tooltip="true"
-							 			  :cell-class-name="planUsageCellClass"
-							 			  highlight-current-row="true"
-							 			  @row-dblclick="ExcelShow"
-							 			  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-							 	 <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-							 	 <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-							 	 <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-							 	 <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-							 	 <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							       </el-table>
-							     </el-tab-pane>
-							</el-tabs>
+							 
+							 <el-tab-pane label="技术附件" name="fourth">
+							 	<el-table ref="multipleTable"
+									  :row-style="{ height: '30px' }"
+									  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+									  :header-cell-style="{ padding: '0px' }"
+									  :show-overflow-tooltip="true"
+									  :cell-class-name="planUsageCellClass"
+									  highlight-current-row="true"
+									  @row-dblclick="ExcelShow"
+									  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+								  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+								  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+								  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+								  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+								  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								  <el-table-column align="left" label="操作"width="100"fixed="right">
+									<template #default="scope">
+									  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+									</template>
+								  </el-table-column>
+							 	</el-table>
+							   </el-tab-pane>
+							 </el-tabs>
 						</el-row>
 					</el-main>
 				</layout-content>
@@ -174,7 +183,7 @@
 						    color: Selection === '' ? '' : '#fff'
 						  }"
 						  style="width: 110px;height: 60px; font-size: 20px; margin-left: 30px;">删除报工</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: 130px;height: 60px;font-size: 20px;">子订单详情页</el-button>
 						<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>
 					</div>
@@ -182,12 +191,12 @@
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
-	  <!-- 技术附件预览弹窗 -->
-	  <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-	    <div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-	  </el-dialog>
-	  
-	  <PrintPage ref="printPageRef" />
+	
+	  <!-- PDF预览页面 -->
+	  <SubOrderPage ref="SubOrderPageRef" />
+	  <!-- <PrintPage ref="printPageRef" /> -->
+	  <!-- 子订单详情页 -->
+	  <luckyexcelPage ref="luckyexcelPageRef" />
 	</div>
   </template>
 <script>
@@ -251,26 +260,44 @@ import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel } f
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
+import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()
+// const printPageRef = ref()
+
+//子订单详情页
+const gd_yulan = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	console.log(add_searchInfo.value.split(',')[0])
+	SubOrderPageRef.value.open(add_searchInfo.value.split(',')[0],add_formData['工序']) 
+}
+
 //获取登录用户信息
 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 month = String(today.getMonth() + 1).padStart(2, '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()
 
 
 //全局获取code,接口接收code
@@ -295,17 +322,16 @@ const add_formData = reactive({
 	是否订单尾包: '',
 });
 
-
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log(_code,"机台获取物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	if (data.data === null) {
-		ElMessage({
-			type: 'error',
-			message: '未获取到机台编号请确认MAC地址或与管理员联系'
-		})
+		add_formData['机台号'] = '测试机台'
+		add_formData['工序'] = "测试"
+		add_formData['组别'] = "测试"
+		add_formData['人员'] = "测试"
 		return;
 	}
 	add_formData['机台号'] = data.data['机台号']
@@ -351,21 +377,25 @@ const GetAddr =  () => {
   // 5. 发送
   xmlhttp.send();
 }
-// getMachineMacdata();
 GetAddr()
+
+// PDF预览
+const luckyexcelPageRef = ref()
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
+
 //搜索
 const add_searchInfo = ref('')
 //表格
 const add_tableData = reactive([]);
 //尾包选中值
 const activeButtonValue = ref('')
-//代表扫描两次自动保存
-const searcs = ref('')
 const _order = ref('')
+const _list = ref('')
 //技术附件
 const jstableData = reactive([])
 const ddtableData = reactive([])
-const _list = ref('')
 
 // 查询按钮
 const add_onSubmit = async ()=>{
@@ -373,14 +403,14 @@ const add_onSubmit = async ()=>{
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
 	}
-	
-  if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
-    const WorkListdata = [];
-    add_tableData.splice(0,add_tableData.length,...WorkListdata);
-	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-	return false;
-  }
+	if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
+		const WorkListdata = [];
+		add_tableData.splice(0,add_tableData.length,...WorkListdata);
+		ElMessage({type: 'warning',message: '请扫描小票二维码' })
+		return false;
+	}
   
+	//跳转上报数量input框中
 	setTimeout(() => {
 		const inputElement = document.getElementById('s_num');
 		if (inputElement) {
@@ -391,11 +421,12 @@ const add_onSubmit = async ()=>{
 	 _order.value = add_searchInfo.value;
 	 //获取下面报工历史记录
 	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
-	 cconsole.log("getSpotLists.data.result.ci_num::",getSpotLists.data.result.ci_num)
+	 console.log("getSpotLists.data.result.ci_num::",getSpotLists.data.result.ci_num)
 	 if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
 		 ElMessage({type: 'error',message: '已上报,无需再次报工' })
 		 add_searchInfo.value = ''
 	 }
+	 console.log(getSpotLists)
 	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
 		 add_formData['尺码'] = ''
@@ -424,167 +455,6 @@ const add_onSubmit = async ()=>{
 	 ddtableData.splice(0,ddOrderAttachments.data.length,...ddOrderAttachments.data);
 	 
 }
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}	
-
-
 
 const AttendanceVisible=ref(false)
 //清空对象的属性值
@@ -615,7 +485,10 @@ const currentSlValue=ref('')
 
 //报工
 const add_Dialog = async ()=>{
-console.log(UniqId.value)
+	if(add_formData['机台号'] === '测试机台'){
+		ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+		return;
+	}
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -662,23 +535,28 @@ console.log(UniqId.value)
   }
 }
 
-const gd_yulan = () => {
-  if(_order.value === '' || _order.value === null){
-    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
-    return false;
-  }else{
-    const order = _order.value.split('-')[0]
-      printPageRef.value.open(order) 
-  }
+//退出
+const SubWorkOrderClose = () => {
+	SubWorkOrderStatusListlog.value = false
 }
+
 //单击
 const add_tableRowClick = async (row) => {
-	const orderString = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${row['尾包']}`;
+	// 使用 split 方法手动分割字符串
+	const serialParts = row['serial'].split('('); // 按 '(' 分割
+	const serial = serialParts[1] ? serialParts[1].split(')')[0] : ''; // 提取括号内的内容,如果没有则返回空字符串
+
+	// 根据尾包判断是否为 1 或 0
+	const tailPackage = row['尾包'] ? 1 : 0;
+	
+	// 拼接 searchInfo 字符串
+	const searchInfo = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${tailPackage},${serial}`;
+	add_searchInfo.value = searchInfo;
+	
 	add_formData['尺码'] =  row.尺码
 	add_formData['总数量'] =  row.数量
 	add_formData['剩余数量'] =  row.剩余数量
-	_order.value =  orderString
-console.log(row)
+	// _order.value =  orderString
 }
 //双击
 const add_updateCompanyFunc = async (row) => {
@@ -718,6 +596,7 @@ const add_xpSelectionChange = async (selection) => {
   console.log(allPrintData.value)
 }
 
+
 // =========== 删除按钮 ===========
 //记录复选框的值
 const bgSelection = ref(null)
@@ -741,11 +620,11 @@ const table_SelectionChange = (val) => {
 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(',')
+	console.log(Selection.value)
 }
 const del_delclick = async () => {
 	console.log(Selection.value)
@@ -901,6 +780,9 @@ margin-bottom: 5px;
 ::v-deep .el-input__wrapper #searchInput {  
   font-size: 16px; 
 } 
+::v-deep .el-input__wrapper #inputtext {  
+  font-size: 18px; 
+} 
 ::v-deep .el-input__wrapper #jitaihao {  
   font-size: 18px; 
 }  
@@ -917,7 +799,7 @@ margin-bottom: 5px;
   font-size: 18px; 
   color: red;
 } 
-::v-deep .el-input__wrapper #chima {  
+::v-deep .el-input__wrapper #s_num {  
   font-size: 18px; 
 } 
 ::v-deep .el-input__wrapper #sbsl {  

+ 213 - 367
src/view/performance/caiqiebaogong.vue

@@ -42,158 +42,146 @@
 		      	<el-col :span="2"><el-input v-model="add_formData['人员']" readonly style="width: 100%; height: 40px;"/></el-col>
 		      </el-row>
 			  
-					<el-row :gutter="0">
-						<el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 90px;">尺 码</el-text></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm1" id="cm1" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm2" id="cm2" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm3" id="cm3" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm4" id="cm4" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm5" id="cm5" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm6" id="cm6" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm7" id="cm7" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm8" id="cm8" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm9" id="cm9" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmformdata.cm10" id="cm10" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1"><el-input v-model="cmformdata.cm11" id="cm11" readonly style="width: 80px;height: 40px;" /></el-col>
-						<el-button  type="danger" icon="delete" @click="del_delclick"
-						  v-if="delall === true" :disabled="Selection === ''"
-						  :style="{
-						    backgroundColor: Selection === '' ? '' : 'red',
-						    borderColor: Selection === '' ? '' : 'red',
-						    color: Selection === '' ? '' : '#fff'
-						  }"
-						  style="width:104px;height: 50px; font-size: 20px;margin: 0px 10px 10px 60px">删除报工</el-button>
-					</el-row>
-					
-
-					<el-row :gutter="0">
-						<el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 70px;">制单数</el-text></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl1" id="zdsc1" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl2" id="zdsc2" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl3" id="zdsc3" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl4" id="zdsc4" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl5" id="zdsc5" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl6" id="zdsc6" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl7" id="zdsc7" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl8" id="zdsc8" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl9" id="zdsc9" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="cmslformdata.cmsl10" id="zdsc10" readonly style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1"><el-input v-model="cmslformdata.zdtotal" id="zdtotal" readonly style="width: 80px;height: 40px;" /></el-col>
-						<el-button type="primary" @click="gd_yulan" style="width: 100px;height: 55px;font-size: 20px;margin: 0px 10px 10px 60px">订单表预览</el-button>
-					</el-row>
-					
-					<el-row :gutter="0">
-						<el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 10px;">新增实裁数</el-text></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs1" @input="updateTotal" id="scs1"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs2" @input="updateTotal" id="scs2"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs3" @input="updateTotal" id="scs3"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs4" @input="updateTotal" id="scs4"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs5" @input="updateTotal" id="scs5"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs6" @input="updateTotal" id="scs6"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs7" @input="updateTotal" id="scs7"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs8" @input="updateTotal" id="scs8"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs9" @input="updateTotal" id="scs9"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1" style="padding: 0px;margin: 0px;"><el-input v-model="scsformdata.scs10" @input="updateTotal" id="scs10"  style="width: 70px;height: 40px;" /></el-col>
-						<el-col :span="1"><el-input v-model="scsformdata.sctotal" id="sctotal" readonly style="width: 80px;height: 40px;" /></el-col>
-						<el-button type="primary" @click="add_Dialog"style="width: 100px;height: 50px;font-size: 20px;margin: 0px 0 0 60px">报工</el-button>
-					</el-row>
+			
+			<el-row :gutter="0">
+				<el-col :span="2.5">
+					<el-text style="font-size: 24px; margin-left: 70px;">尺 码&nbsp;</el-text>
+				</el-col>
+				<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					<el-input v-model="cmformdata[`cm${index + 1}`]" :id="`cm${index + 1}`" readonly style="width: 70px; height: 40px;"/>
+				</el-col>
+				<el-col :span="1"><el-input v-model="cmformdata.cmtotal" id="cmtotal" readonly style="width: 80px;height: 40px;" /></el-col>
+			</el-row>
 					
+			<el-row :gutter="0">
+				<el-col :span="2.5">
+					<el-text style="font-size: 24px; margin-left: 53px;">制单数&nbsp;</el-text>
+				</el-col>
+				<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					<el-input v-model="cmslformdata[`cmsl${index + 1}`]" :id="`cmsl${index + 1}`" readonly style="width: 70px; height: 40px;"/>
+				</el-col>
+				<el-col :span="1"><el-input v-model="cmslformdata.zdtotal" id="zdtotal" readonly style="width: 80px;height: 40px;" /></el-col>
+			</el-row>
+			
+			<el-row :gutter="0">
+				<el-col :span="2.5">
+					<el-text style="font-size: 24px; margin-left: 10px;">新增实裁数</el-text>
+				</el-col>
+				<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					<el-input v-model="scsformdata[`scs${index + 1}`]" :id="`scs${index + 1}`" @input="updateTotal"  style="width: 70px; height: 40px;"/>
+				</el-col>
+				<el-col :span="1"><el-input v-model="scsformdata.sctotal" id="sctotal" readonly style="width: 80px;height: 40px;" /></el-col>
+			</el-row>
+			
+			
+		      <el-main>
+				<!-- 表格数据 -->
+				  <el-tabs v-model="activeName">
+					  <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="bgjdhz_tableData"  border row-key="ID"
+								  size="small" 
+								  highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+								  @row-click="tableRowClick" :show-overflow-tooltip="true"
+								  @selection-change="selectionChange">
+								  <el-table-column type="selection" width="60" />
+								  <el-table-column align="left" label="报工时间"	prop="sys_rq"  		width="150"/>
+								  <el-table-column align="left" label="子订单编号" prop="子订单编号"  	width="130"/>
+								  <el-table-column align="left" label="生产款号" 	prop="款号"  	width="120"/>
+								  <el-table-column align="left" label="款式" 		prop="款式"  		width="100"/>
+								  <el-table-column align="left" label="组别" 		prop="sczl_jtbh"  		width="80"/>
+								  <el-table-column align="left" label="尺码" 		prop="尺码"  		width="70"/>
+								  <el-table-column align="left" label="实裁数量" 		prop="数量"  		width="100"/>
+						</el-table>
+					  </el-tab-pane>
+					  
+					  
+					<el-tab-pane label="产量进度汇总记录"   @click="showTable('产量进度汇总记录')" name="two">
+						<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="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  align="left" label="订单子编号" prop="子订单编号"  width="130"/>
+								  <el-table-column  align="left" label="款号" prop="款号" width="140" />
+								  <el-table-column  align="left" label="色系名称" prop="颜色" width="100" />
+								  <el-table-column v-for="item in sizeDatas" :key="item" align="left" :label="item" :prop="item" width="60" :cell-style="cellStyle">
+									<template v-slot="scope">
+										<div style="width: 80px;" @click="handleSizeClick(scope.$index, item, scope.row)">
+											{{ scope.row[item] }}
+										</div>
+									</template>
+								  </el-table-column>
+								  <el-table-column  align="left" label="实裁总数" 	 prop="裁剪数" width="90" />
+								  <!-- <el-table-column  align="left" label="上报时间" prop="上报时间" width="160" /> -->
+						</el-table>
+					</el-tab-pane>
 					
+					<el-tab-pane label="订单资料附件" name="third">
+					  <el-table ref="multipleTable"
+								:row-style="{ height: '30px' }"
+								:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+								:header-cell-style="{ padding: '0px' }"
+								:show-overflow-tooltip="true"
+								:cell-class-name="planUsageCellClass"
+								highlight-current-row="true"
+								@row-dblclick="gdbomupdateCompanyFunc"
+								style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+											   @selection-change="fjSelectionChange">
+					   <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+					   <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+					   <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+					   <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+					   <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+									 <el-table-column align="left" label="操作"width="100"fixed="right">
+									   <template #default="scope">
+										 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+									   </template>
+									 </el-table-column>
+					  </el-table>
+					</el-tab-pane> 
 					
 					
-		      <el-main>
-					<!-- 表格数据 -->
-					  <el-tabs v-model="activeName">
-						  <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="bgjdhz_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="selectionChange">
-						  	          <el-table-column type="selection" width="60" />
-						  	          <el-table-column align="left" label="报工时间"	prop="sys_rq"  		width="150"/>
-						  	          <el-table-column align="left" label="子订单编号" prop="子订单编号"  	width="130"/>
-						  	          <el-table-column align="left" label="生产款号" 	prop="款号"  	width="120"/>
-						  	          <el-table-column align="left" label="款式" 		prop="款式"  		width="100"/>
-						  	          <el-table-column align="left" label="组别" 		prop="sczl_jtbh"  		width="80"/>
-						  	          <el-table-column align="left" label="尺码" 		prop="尺码"  		width="70"/>
-						  	          <el-table-column align="left" label="实裁数量" 		prop="数量"  		width="100"/>
-						  	</el-table>
-						  </el-tab-pane>
-						  
-						  
-						<el-tab-pane label="产量进度汇总记录"   @click="showTable('产量进度汇总记录')" name="two">
-							<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="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   align="left" label="订单子编号" prop="子订单编号"  width="130"/>
-									  <el-table-column    align="left" label="款号" prop="款号" width="140" />
-									  <el-table-column    align="left" label="色系名称" prop="颜色" width="100" />
-									  <el-table-column v-for="item in sizeDatas" :key="item" align="left" :label="item"
-										:prop="item" width="60" :cell-style="cellStyle">
-										<template v-slot="scope">
-											<div 
-												style="width: 80px;"
-												@click="handleSizeClick(scope.$index, item, scope.row)">
-												{{ scope.row[item] }}
-											</div>
+					<el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
+						<el-table ref="multipleTable"
+										  :row-style="{ height: '30px' }"
+										  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+										  :header-cell-style="{ padding: '0px' }"
+										  :show-overflow-tooltip="true"
+										  :cell-class-name="planUsageCellClass"
+										  highlight-current-row="true"
+										  @row-dblclick="ExcelShow"
+										  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+									  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+									  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+									  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+									  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+									  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+									  <el-table-column align="left" label="操作"width="100"fixed="right">
+										<template #default="scope">
+										  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
 										</template>
-										</el-table-column>
-									  <el-table-column    align="left" label="裁剪数" prop="裁剪数" width="90" />
-									  <el-table-column    align="left" label="上报时间" prop="上报时间" width="160" />
-							</el-table>
-						</el-tab-pane>
-						
-						<el-tab-pane label="订单资料附件" name="third">
-						  <el-table ref="multipleTable"
-						            :row-style="{ height: '30px' }"
-						            :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-						            :header-cell-style="{ padding: '0px' }"
-						            :show-overflow-tooltip="true"
-						            :cell-class-name="planUsageCellClass"
-						            highlight-current-row="true"
-						            @row-dblclick="gdbomupdateCompanyFunc"
-						            style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
-												   @selection-change="fjSelectionChange">
-							  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-							  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-							  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-							  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-							  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							  
-							  
-						  </el-table>
-						</el-tab-pane> 
-					
-					  <el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
-					  	<el-table ref="multipleTable"
-								 :row-style="{ height: '30px' }"
-								 :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-								 :header-cell-style="{ padding: '0px' }"
-								  :show-overflow-tooltip="true"
-								  :cell-class-name="planUsageCellClass"
-								  highlight-current-row="true"
-								  @row-dblclick="ExcelShow"
-								  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-						  <!-- <el-table-column type="selection" width="55" /> -->
-					      <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-					      <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-					      <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-					      <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-					      <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-					      </el-table>
-					    </el-tab-pane>
+									  </el-table-column>
+						</el-table>
+					  </el-tab-pane>
 					</el-tabs>
+					
+					<el-button  type="danger" icon="delete" @click="del_delclick"
+					  v-if="delall === true" :disabled="Selection === ''"
+					  :style="{
+					    backgroundColor: Selection === '' ? '' : 'red',
+					    borderColor: Selection === '' ? '' : 'red',
+					    color: Selection === '' ? '' : '#fff'
+					  }"
+					  style="width: 150px; height: 40px; font-size: 20px; margin-left: 10px;">删除报工</el-button>
+					  <el-button type="primary" @click="cp_gdprintonClick" style="width: 150px; height: 40px; font-size: 20px; margin-left: 10px;" >  子订单详情页 </el-button>
+					  <el-button type="primary" @click="add_Dialog" style="width: 100px; height: 40px; font-size: 20px; margin-left: 10px;" >报工</el-button>
 				</el-main>
 			</div>
 			
@@ -206,16 +194,13 @@
 					</div>
 				</el-dialog>
 				
-				<!-- 查看技术附件弹窗 -->
-				<el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-					<div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-				</el-dialog>
 				
         </layout-content>
       </layout>
-
-    <PrintPage ref="printPageRef" />
-		  <!-- </el-main> -->
+    <SubOrderPage ref="SubOrderPageRef" />
+	<PrintPage ref="printPageRef" />
+	<!-- 子订单详情页 -->
+	<luckyexcelPage ref="luckyexcelPageRef" />
 	</div>
   </template>
 <script>
@@ -268,7 +253,6 @@ export default {
           break;
       }
     },
-
   },
 };
 </script>
@@ -279,13 +263,21 @@ 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,search,spotcheckdel} from '@/api/mes/job';
+import {getSpotList,getInfo,OrderAttachments,getTabByGdbh,search,spotcheckdel,SubWorkOrderStatusList,Mabaolist} 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 luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()//子订单详情页
+const printPageRef = ref()//打印预览
+const luckyexcelPageRef = ref()//pdf预览
 //获取登录用户信息
 const userStore = useUserStore()
 const _username = ref('')
@@ -301,7 +293,6 @@ 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
@@ -316,13 +307,16 @@ const getMachineMacdata = async () => {
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	if (data.data === null) {
-		ElMessage({
-			type: 'error',
-			message: '未获取到机台编号请确认MAC地址或与管理员联系'
-		})
+		// ElMessage({
+		// 	type: 'error',
+		// 	message: '未获取到机台编号请确认MAC地址或与管理员联系'
+		// })
+		add_formData['机台号'] = '测试机台'
+		add_formData['工序'] = _code
+		add_formData['组别'] = "测试"
+		add_formData['人员'] = "测试"
 		return;
 	}
-	// console.log(data)
 	add_formData['机台号'] = data.data['机台号']
 	add_formData['工序'] = data.data['生产工序']
 	add_formData['组别'] = data.data['组别']
@@ -368,11 +362,10 @@ const GetAddr =  () => {
 }
 // getMachineMacdata();
 GetAddr()
-
-
-
-//技术附件
-
+// PDF预览
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
 
 const add_formData = reactive({
   机台号: '',	
@@ -401,7 +394,9 @@ const cmformdata = reactive({
   cm8:'',
   cm9:'',
   cm10:'',
-  cm11:'合计',
+  cm11:'',
+  cm12:'',
+  cmtotal:'合计',
 });
 
 // 制单数
@@ -437,7 +432,7 @@ const scsformdata = reactive({
 function updateTotal() {  
   // 直接指定要累加的属性名  
   const relevantKeys = ['scs1', 'scs2', 'scs3', 'scs4', 'scs5', 'scs6', 'scs7', 'scs8', 'scs9', 'scs10'];  
-  const values = relevantKeys.map(key => parseInt(scsformdata[key], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  const values = relevantKeys.map(key => parseInt(scsformdata[key], 10) || 0); 
   scsformdata.sctotal = values.reduce((sum, value) => sum + value, 0);  
 }  
 
@@ -456,7 +451,6 @@ const _list = ref('');
 
 //查询
 const add_onSubmit = async ()=>{
-	
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
 	const WorkListdata = [];
 	// add_tableData.splice(0,add_tableData.length,...WorkListdata);
@@ -468,16 +462,11 @@ const add_onSubmit = async ()=>{
   if (!add_searchInfo.value.startsWith('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
-	 }
 	 if(add_searchInfo.value === ''){
 		 //光标跳转搜索框
 		 _searchInput()
@@ -488,7 +477,6 @@ const add_onSubmit = async ()=>{
 		 		  inputElement.focus();		
 		 	  }
 		 }, 100);//100毫秒
-		 
 	 }
 	
 	 sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers);
@@ -516,7 +504,6 @@ const add_onSubmit = async ()=>{
 				cmslformdata[key] = getSpotLists.data.list[key];  
 			}  
 		} 
-
 	}else{
 		for (let key of keys1) {  
 			cmformdata[key] = '';  
@@ -526,12 +513,9 @@ const add_onSubmit = async ()=>{
 		}   
 	}
 
-  
-  // getSummaries();
 };
 
-
-//合计
+  //总数量合计
   const getSummaries = (param) => {  
     const { columns, data } = param;  
     const sums = {};  
@@ -541,10 +525,8 @@ const add_onSubmit = async ()=>{
             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) => {  
@@ -561,169 +543,9 @@ const add_onSubmit = async ()=>{
             }  
         }  
     });  
-  
     return sums;  
 };  
 
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}
-
 
 //表格行点击
 const tableRowClick = async (row)=>{
@@ -749,8 +571,23 @@ const _searchInput = async ()=>{
 			}
 	}, 100);
 }
+
+//子订单详情页
+const cp_gdprintonClick = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	SubOrderPageRef.value.open(add_searchInfo.value,add_formData['工序']) 
+}
+	
+	
 //报工
 const add_Dialog = async ()=>{
+	if(add_formData['机台号'] === '测试机台'){
+		ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+		return;
+	}
 	if (!add_formData['机台号']) {
 	    ElMessage({ type: 'warning', message: '未获取到机台' });
 	    return false;
@@ -801,20 +638,17 @@ const add_Dialog = async ()=>{
 			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; // 如果某个报工失败,则中断循环  
+			break; 
 		}
 	}
 	  
@@ -1067,6 +901,12 @@ const handleSizeChange = (val) => {
 ::v-deep .el-input__wrapper  #cm11{
 	font-size: 20px; 
 }
+::v-deep .el-input__wrapper  #cm12{
+	font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cmtotal{
+	font-size: 20px; 
+}
 /* 本次实裁新增样式 */
 ::v-deep .el-input__wrapper  #cmsl1{
 	font-size: 20px; 
@@ -1108,29 +948,35 @@ const handleSizeChange = (val) => {
 	font-size: 20px; 
 	color: red !important;
 }
+::v-deep .el-input__wrapper  #cmsl11{
+	font-size: 20px; 
+	color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl12{
+	font-size: 20px; 
+	color: red !important;
+}
 ::v-deep .el-input__wrapper  #zdtotal{
 	font-size: 20px; 
   color: red !important;
 }
 /* 表格复选框大小调整 */
-	:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
-		width: 30px;
-		/* 复选框宽度 */
-		height: 20px;
-		/* 复选框高度 */
-	}
-
-	:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
-		transform: scale(1.2) rotate(45deg);
-		/* 调整选中后的对勾大小 */
-		top: 5%;
-		/* 调整对勾位置 */
-		left: 40%;
-		/* 调整对勾位置 */
-		width: 5px;
-		/* 调整对勾宽度 */
-		height: 9px;
-		/* 调整对勾高度 */
-	}
-
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+	width: 30px;
+	/* 复选框宽度 */
+	height: 20px;
+	/* 复选框高度 */
+}
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+	transform: scale(1.2) rotate(45deg);
+	/* 调整选中后的对勾大小 */
+	top: 5%;
+	/* 调整对勾位置 */
+	left: 40%;
+	/* 调整对勾位置 */
+	width: 5px;
+	/* 调整对勾宽度 */
+	height: 9px;
+	/* 调整对勾高度 */
+}
 </style>

+ 190 - 300
src/view/performance/chafengbaogong.vue

@@ -72,81 +72,65 @@
 					  
 					  
 					  <el-row :gutter="0">
-					    <el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 52px;">尺&nbsp;码</el-text></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm1" id="cm1" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm2" id="cm2" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm3" id="cm3" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm4" id="cm4" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm5" id="cm5" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm6" id="cm6" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm7" id="cm7" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm8" id="cm8" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm9" id="cm9" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="cmformdata.cm10" id="cm10" readonly style="width: 65px;height: 40px;" /></el-col>
-					    <el-col :span="1"><el-input v-model="cmformdata.cm11" id="cm11" readonly style="width: 80px;height: 40px;" /></el-col>
-					    <!-- 删除报工按钮 -->
-					    <el-col :span="2">
-					      <el-button  type="danger" icon="delete" @click="del_delclick"
-					        v-if="delall === true" :disabled="Selection === ''"
-					        :style="{
-					          backgroundColor: Selection === '' ? '' : 'red',
-					          borderColor: Selection === '' ? '' : 'red',
-					          color: Selection === '' ? '' : '#fff'
-					        }"
-					        style="width: 150px; height: 40px; font-size: 20px; margin-left: 30px;">删除报工</el-button>
-					    </el-col>
+					  	<el-col :span="2.5">
+					  		<el-text style="font-size: 24px; margin-left: 45px;">尺 码&nbsp;</el-text>
+					  	</el-col>
+					  	<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					  		<el-input v-model="cmformdata[`cm${index + 1}`]" :id="`cm${index + 1}`" readonly style="width: 70px; height: 40px;"/>
+					  	</el-col>
+					  	<el-col :span="1"><el-input v-model="cmformdata.cmtotal" id="cmtotal" readonly style="width: 80px;height: 40px;" /></el-col>
+						<!-- 删除报工按钮 -->
+						<el-col :span="2">
+						  <el-button  type="danger" icon="delete" @click="del_delclick"
+							v-if="delall === true" :disabled="Selection === ''"
+							:style="{
+							  backgroundColor: Selection === '' ? '' : 'red',
+							  borderColor: Selection === '' ? '' : 'red',
+							  color: Selection === '' ? '' : '#fff'
+							}"
+							style="width: 150px; height: 40px; font-size: 20px; margin-left: 30px;">删除报工</el-button>
+						</el-col>
 					  </el-row>
 					  
 					  <el-row :gutter="0">
-					   <el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 30px;">制单数</el-text></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl1" id="zdsc1" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl2" id="zdsc2" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl3" id="zdsc3" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl4" id="zdsc4" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl5" id="zdsc5" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl6" id="zdsc6" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl7" id="zdsc7" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl8" id="zdsc8" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl9" id="zdsc9" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="zdslformdata.cmsl10" id="zdsc10" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1"><el-input v-model="zdslformdata.zdtotal" id="zdtotal" readonly style="width: 80px;height: 40px;" /></el-col>
-					   <el-col :span="2">
-					     <el-button type="primary" @click="cp_gdprintonClick" style="width: 150px; height: 40px; font-size: 20px; margin-left: 30px;" >  订单表预览 </el-button>
-					   </el-col>
+					  	<el-col :span="2.5">
+					  		<el-text style="font-size: 24px; margin-left: 35px;">制单数</el-text>
+					  	</el-col>
+					  	<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					  		<el-input v-model="zdslformdata[`cmsl${index + 1}`]" :id="`cm${index + 1}`" readonly style="width: 70px; height: 40px;"/>
+					  	</el-col>
+					  	<el-col :span="1"><el-input v-model="zdslformdata.zdtotal" id="zdtotal" readonly style="width: 80px;height: 40px;" /></el-col>
+						<el-button type="primary" @click="cp_gdprintonClick" style="width: 150px; height: 40px; font-size: 20px; margin-left: 30px;" >  子订单详情页 </el-button>
 					  </el-row>
 					  
 					  <el-row :gutter="0">
-					   <el-col :span="2.5"><el-text style="font-size: 30px;margin-left: 30px;">实裁数</el-text></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl1" id="scsl1" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl2" id="scsl2" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl3" id="scsl3" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl4" id="scsl4" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl5" id="scsl5" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl6" id="scsl6" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl7" id="scsl7" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl8" id="scsl8" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl9" id="scsl9" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="scslformdata.scsl10" id="scsl10" readonly style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1"><el-input v-model="scslformdata.sctotal" id="cm11" readonly style="width: 80px;height: 40px;" /></el-col>
+					  	<el-col :span="2.5">
+					  		<el-text style="font-size: 24px; margin-left: 35px;">实裁数</el-text>
+					  	</el-col>
+					  	<el-col v-for="(item, index) in 10" :key="index" :span="1" style="padding: 0; margin: 0;">
+					  		<el-input v-model="scslformdata[`scsl${index + 1}`]" :id="`scsl${index + 1}`" readonly style="width: 70px; height: 40px;"/>
+					  	</el-col>
+					  	<el-col :span="1"><el-input v-model="scslformdata.sctotal" id="sctotal" readonly style="width: 80px;height: 40px;" /></el-col>
 					  </el-row>
 					  
 					  <el-row :gutter="0">
-					   <el-col :span="2.5"><el-text style="font-size: 30px;">上报数量</el-text></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl1" id="sl1"  :readonly="!scslformdata.scsl1" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl2" id="sl2"  :readonly="!scslformdata.scsl2" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl3" id="sl3"  :readonly="!scslformdata.scsl3" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl4" id="sl4"  :readonly="!scslformdata.scsl4" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl5" id="sl5"  :readonly="!scslformdata.scsl5" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl6" id="sl6"  :readonly="!scslformdata.scsl6" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl7" id="sl7"  :readonly="!scslformdata.scsl7" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl8" id="sl8"  :readonly="!scslformdata.scsl8" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl9" id="sl9"  :readonly="!scslformdata.scsl9" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
-					   <el-col :span="1" style="padding-right: 5px;margin-right: 11px;"><el-input v-model="slformdata.sl10" id="sl10"  :readonly="!scslformdata.scsl10" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="2.5"><el-text style="font-size: 24px;margin-left: 10px;">上报数量</el-text></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl1" id="sl1"  :readonly="!scslformdata.scsl1" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl2" id="sl2"  :readonly="!scslformdata.scsl2" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl3" id="sl3"  :readonly="!scslformdata.scsl3" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl4" id="sl4"  :readonly="!scslformdata.scsl4" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl5" id="sl5"  :readonly="!scslformdata.scsl5" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl6" id="sl6"  :readonly="!scslformdata.scsl6" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl7" id="sl7"  :readonly="!scslformdata.scsl7" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl8" id="sl8"  :readonly="!scslformdata.scsl8" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl9" id="sl9"  :readonly="!scslformdata.scsl9" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
+					   <el-col :span="1" style="padding-right: 0px;margin-right: 0px;"><el-input v-model="slformdata.sl10" id="sl10"  :readonly="!scslformdata.scsl10" @input="updateTotal" style="width: 65px;height: 40px;" /></el-col>
 					   <el-col :span="1"><el-input v-model="slformdata.sctotal" id="cm11" readonly style="width: 80px;height: 40px;" /></el-col>
 					    <el-col :span="2">
 					      <el-button type="primary" @click="add_Dialog" style="width: 150px; height: 40px; font-size: 20px; margin-left: 30px;" >报工</el-button>
 					    </el-col>
 					  </el-row>
+					
 
 					
 							<!-- 表格数据 -->
@@ -233,42 +217,52 @@
 							
 							<el-tab-pane label="订单资料附件" name="third">
 							  <el-table ref="multipleTable"
-							            :row-style="{ height: '30px' }"
-							            :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							            :header-cell-style="{ padding: '0px' }"
-							            :show-overflow-tooltip="true"
-							            :cell-class-name="planUsageCellClass"
-							            highlight-current-row="true"
-							            @row-dblclick="gdbomupdateCompanyFunc"
-							            style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+										:row-style="{ height: '30px' }"
+										:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+										:header-cell-style="{ padding: '0px' }"
+										:show-overflow-tooltip="true"
+										:cell-class-name="planUsageCellClass"
+										highlight-current-row="true"
+										@row-dblclick="gdbomupdateCompanyFunc"
+										style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
 													   @selection-change="fjSelectionChange">
 							   <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
 							   <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
 							   <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
 							   <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
 							   <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+											 <el-table-column align="left" label="操作"width="100"fixed="right">
+											   <template #default="scope">
+												 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+											   </template>
+											 </el-table-column>
 							  </el-table>
 							</el-tab-pane> 
 							
-							  <el-tab-pane label="技术附件"  name="fourth">
-							  	<el-table ref="multipleTable"
-										  :row-style="{ height: '30px' }"
-										  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-										  :header-cell-style="{ padding: '0px' }"
-										  :show-overflow-tooltip="true"
-										  :cell-class-name="planUsageCellClass"
-										  highlight-current-row="true"
-										  @row-dblclick="ExcelShow"
-										  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-								 <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-								 <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-								 <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-								 <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-								 <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							      </el-table>
-							    </el-tab-pane>
+							
+							<el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
+								<el-table ref="multipleTable"
+												  :row-style="{ height: '30px' }"
+												  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+												  :header-cell-style="{ padding: '0px' }"
+												  :show-overflow-tooltip="true"
+												  :cell-class-name="planUsageCellClass"
+												  highlight-current-row="true"
+												  @row-dblclick="ExcelShow"
+												  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+											  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+											  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+											  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+											  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+											  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+											  <el-table-column align="left" label="操作"width="100"fixed="right">
+												<template #default="scope">
+												  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+												</template>
+											  </el-table-column>
+								</el-table>
+							  </el-tab-pane>
 							</el-tabs>
-					
 
 				</div>
 
@@ -281,14 +275,10 @@
 				 </div>
 			   </el-dialog>
 			   
-			   <!-- 技术附件预览弹窗 -->
-			   <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-			     <div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-			   </el-dialog>
-			   
+			   <SubOrderPage ref="SubOrderPageRef" />
 			   <PrintPage ref="printPageRef" />
-				<link rel="stylesheet" type="text/css" media="print" href="https://jsd.onmicrosoft.cn/npm/vue-plugin-hiprint@latest/dist/print-lock.css">
-				<link rel="stylesheet" type="text/css" media="print" href="https://unpkg.com/vue-plugin-hiprint@latest/dist/print-lock.css">
+			   <!-- 子订单详情页 -->
+			   <luckyexcelPage ref="luckyexcelPageRef" />
 			</layout-content>
 		</layout>
 	</div>
@@ -350,25 +340,30 @@ 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,getTabByGdbh,processAdd,spotcheckdel} from '@/api/mes/job'
+import {getSpotList,search,SubWorkOrderStatusList,getTab,OrderAttachments,getTabByGdbh,processAdd,spotcheckdel,Mabaolist} from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import {ElMessage} from "element-plus";
 import {get} from 'scriptjs';
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue'
+import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import { useUserStore } from '@/pinia/modules/user';
-
-// 动态加载外部的 CSS 文件
-const link = document.createElement("link");
-link.rel = "stylesheet";
-link.type = "text/css";
-link.media = "print";
-link.href = "https://jsd.onmicrosoft.cn/npm/vue-plugin-hiprint@latest/dist/print-lock.css"; // 使用你需要的地址
-document.head.appendChild(link);
-
 defineOptions({name: 'Company'})
-//定义打印跳转页面
-const printPageRef = ref()
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()//子订单详情页
+const printPageRef = ref()//打印预览
+const luckyexcelPageRef = ref()//pdf预览
+//子订单详情页
+const cp_gdprintonClick = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	SubOrderPageRef.value.open(add_searchInfo.value,add_formData['工序']) 
+}
 //获取登录用户信息
 const userStore = useUserStore()
 const _username = ref('')
@@ -386,31 +381,32 @@ const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
 
 
-	//全局获取code,接口接收code
-	const _code = '车缝'
-	//全局接口接受的物理地址
-	const Machine = ref('')
-	//全局获取UniqId
-	const UniqId = ref('')
+//全局获取code,接口接收code
+const _code = '车缝'
+//全局接口接受的物理地址
+const Machine = ref('')
+//全局获取UniqId
+const UniqId = ref('')
 
 	//物理地址获取机台编号
 	const getMachineMacdata = async () => {
 		console.log("车缝机台获取物理地址", Machine.value)
 		try {
-			const data = await getMachineMac({
-				sys_sbID: Machine.value
-			});
-			console.log('车缝机台数据')
-			console.log(data)
-
+			const data = await getMachineMac({sys_sbID: Machine.value});
 			if (data.data === null) {
-				ElMessage({
-					type: 'error',
-					message: '未获取到机台编号请确认MAC地址或与管理员联系'
-				})
+				// ElMessage({
+				// 	type: 'error',
+				// 	message: '未获取到机台编号请确认MAC地址或与管理员联系'
+				// })
+				add_formData['机台号'] = '测试机台'
+				add_formData['工序'] = _code
+				add_formData['组别'] = "测试"
+				add_formData['人员'] = "测试"
+				return;
 			} else {
 				add_formData['机台号'] = data.data['机台号']
 				add_formData['工序'] = data.data['生产工序']
+				add_formData['工序名称'] = data.data['生产工序']
 				add_formData['组别'] = data.data['组别']
 				add_formData['人员'] = data.data['组长']
 				setTimeout(() => {
@@ -455,6 +451,11 @@ const currentDates = `${year}-${month}-${day}`;
 	}
 	// getMachineMacdata();
 	GetAddr()
+	
+// PDF预览
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
 
 	// 尺码
 	const cmformdata = reactive({
@@ -468,7 +469,7 @@ const currentDates = `${year}-${month}-${day}`;
 		cm8: '',
 		cm9: '',
 		cm10: '',
-		cm11: '合计',
+		cmtotal: '合计',
 	});
 	// 制单数
 	const zdslformdata = reactive({
@@ -657,168 +658,7 @@ function updateTotal() {
 			// }
 		}
 	}
-
-
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
 	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}	
 
 	const AttendanceVisible = ref(false)
 
@@ -843,6 +683,10 @@ const luckyexcelCloseDialog = () => {
 	
 	//车缝报工
 	const add_Dialog = async () => {
+		if(add_formData['机台号'] === '测试机台'){
+			ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+			return;
+		}
 		sizeDatas.length = 0;
 		add_tableData.length = 0;
 		// console.log(_serial.value)
@@ -965,18 +809,6 @@ const luckyexcelCloseDialog = () => {
 		}
 	}
 	
-	// =========== 打印预览 ===========
-	const cp_gdprintonClick = () => {
-		const result = add_searchInfo.value.split('-')[0];
-		console.log(result); // 输出 241155
-
-	  if(result === '' || result === null){
-	    ElMessage({type: 'warning',message: '请输入预览的订单编号'})
-	    return false;
-	  }else{
-		printPageRef.value.open(result)
-	  }
-	}
 	
 	// 新增取消
 	const add_closeDialog = () => {
@@ -1241,6 +1073,12 @@ const handleSizeChange = (val) => {
 };
 </script>
 <style scoped>
+	:deep(.el-table__body .status-plan-usage-low) {
+	  background: #ff80ff !important;
+	}
+	:deep(.el-table__body .status-plan-usage-lows) {
+	  background: white !important;
+	}
 	.form-container {
 		display: flex;
 		flex-wrap: wrap;
@@ -1475,6 +1313,9 @@ const handleSizeChange = (val) => {
 	::v-deep .el-input__wrapper #cm11 {
 		font-size: 20px;
 	}
+	::v-deep .el-input__wrapper #cmtotal {
+		font-size: 20px;
+	}
 
 	/* 制单数 */
 	::v-deep .el-input__wrapper #zdsc1 {
@@ -1639,11 +1480,60 @@ const handleSizeChange = (val) => {
 		box-sizing: border-box;
 	}
 
-	/* :deep(.el-table__body tr.current-row) > td {
-	background: #ff80ff !important;
-  }  */
 	.custom-button-text {
 		font-size: 25px;
 		/* 或者你想要的任何大小 */
 	}
-</style>
+	
+	/* 自定义表格样式 */
+	.custom-table >>> .el-table {
+	  border: 2px solid #333; /* 表格整体边框加深 */
+	}
+	
+	.custom-table >>> .el-table__header-wrapper th {
+	  border-bottom: 2px solid #333; /* 表头底部边框加深 */
+	}
+	
+	.custom-table >>> .el-table__body-wrapper td {
+	  border: 1px solid #666; /* 表格单元格边框加深 */
+	}
+	
+	.custom-table >>> .el-table__cell {
+	  font-size: 20px; /* 单元格字体大小 */
+	  font-weight: 600; /* 单元格字体加粗 */
+	}
+	.number-container {
+	  display: flex;
+	  flex-wrap: wrap;
+	  gap: 4px;
+	  margin-top: 3px;
+	}
+	
+	.number-box {
+	  display: flex;
+	  justify-content: center;
+	  align-items: center;
+	  width: 40px;
+	  height: 40px;
+	  background-color: #f2f2f2;
+	  border: 1px solid #ddd;
+	  border-radius: 8px;
+	  font-size: 18px;
+	  color: #333;
+	  font-weight: bold;
+	  transition: background-color 0.3s;
+	}
+	
+	.number-box.green {
+		 /* 完成包数(绿色) */
+	  background-color: palegreen;
+	  color: #155724;
+	  border-color: #c3e6cb;
+	}
+	
+	.number-box.red {
+	  background-color: red; /* 废弃包数(红色) */
+	  color: #721c24;
+	  border-color: #f5c6cb;
+	}
+</style>

+ 118 - 237
src/view/performance/datangbaogong.vue

@@ -7,9 +7,7 @@
 				<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="5"  style="padding: 0px;margin: 0px;"> -->
-					  <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
-					<!-- </el-col> -->
+					&nbsp;<el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
 				
 					<!-- 查询按钮 -->
 					<el-col :span="1.5"  style="padding: 0px;margin: 0px;">
@@ -43,25 +41,25 @@
 				
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
-						<el-text style="font-size: 30px;">尺码</el-text>
+						<el-text style="font-size: 30px;">&nbsp;尺码</el-text>
 					</el-col>
 					<!-- 尺码输入框 -->
 					<!-- &nbsp;&nbsp;&nbsp;
-					<p style="font-size: 24px;color: red;">{{add_formData['尺码']}}</p>
+					<p style="font-size: 24px;color: red;border: 2px black solid;padding: 5px 15px 5px 15px;">{{add_formData['尺码']}}</p>
 					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -->
-					<el-col :span="2"><el-input v-model="add_formData['尺码']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['尺码']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">总数量</el-text>
 					</el-col>
 					<!-- 总数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['总数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['总数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">剩余数量</el-text>
 					</el-col>
 					<!--剩余数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 						
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">上报数量</el-text>
@@ -101,7 +99,7 @@
 						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
-								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+								<el-tab-pane label="报工历史记录"   name="first">
 									<el-table ref="multipleTableRef" style="width: 100%;height: 53vh"
 										:row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 										:cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -127,41 +125,52 @@
 								
 							 <el-tab-pane label="订单资料附件" name="third">
 							   <el-table ref="multipleTable"
-							             :row-style="{ height: '30px' }"
-							             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							             :header-cell-style="{ padding: '0px' }"
-							             :show-overflow-tooltip="true"
-							             :cell-class-name="planUsageCellClass"
-							             highlight-current-row="true"
-							             @row-dblclick="gdbomupdateCompanyFunc"
-							             style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
-							 						   @selection-change="fjSelectionChange">
+							 			:row-style="{ height: '30px' }"
+							 			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+							 			:header-cell-style="{ padding: '0px' }"
+							 			:show-overflow-tooltip="true"
+							 			:cell-class-name="planUsageCellClass"
+							 			highlight-current-row="true"
+							 			@row-dblclick="gdbomupdateCompanyFunc"
+							 			style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+									   @selection-change="fjSelectionChange">
 							    <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
 							    <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
 							    <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
 							    <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
 							    <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								 <el-table-column align="left" label="操作"width="100"fixed="right">
+								   <template #default="scope">
+									 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+								   </template>
+								 </el-table-column>
 							   </el-table>
 							 </el-tab-pane> 
 							 
-							   <el-tab-pane label="技术附件"  name="fourth">
-							   	<el-table ref="multipleTable"
-							 			  :row-style="{ height: '30px' }"
-							 			  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							 			  :header-cell-style="{ padding: '0px' }"
-							 			  :show-overflow-tooltip="true"
-							 			  :cell-class-name="planUsageCellClass"
-							 			  highlight-current-row="true"
-							 			  @row-dblclick="ExcelShow"
-							 			  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-							 	 <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-							 	 <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-							 	 <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-							 	 <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-							 	 <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							       </el-table>
-							     </el-tab-pane>
-							</el-tabs>
+							 
+							 <el-tab-pane label="技术附件" name="fourth">
+							 	<el-table ref="multipleTable"
+									  :row-style="{ height: '30px' }"
+									  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+									  :header-cell-style="{ padding: '0px' }"
+									  :show-overflow-tooltip="true"
+									  :cell-class-name="planUsageCellClass"
+									  highlight-current-row="true"
+									  @row-dblclick="ExcelShow"
+									  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+								  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+								  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+								  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+								  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+								  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								  <el-table-column align="left" label="操作"width="100"fixed="right">
+									<template #default="scope">
+									  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+									</template>
+								  </el-table-column>
+							 	</el-table>
+							   </el-tab-pane>
+							 </el-tabs>
 						</el-row>
 					</el-main>
 				</layout-content>
@@ -174,7 +183,7 @@
 						    color: Selection === '' ? '' : '#fff'
 						  }"
 						  style="width: 110px;height: 60px; font-size: 20px; margin-left: 30px;">删除报工</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: 130px;height: 60px;font-size: 20px;">子订单详情页</el-button>
 						<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>
 					</div>
@@ -182,12 +191,12 @@
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
-	  <!-- 技术附件预览弹窗 -->
-	  <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-	    <div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-	  </el-dialog>
-	  
-	  <PrintPage ref="printPageRef" />
+	
+	  <!-- PDF预览页面 -->
+	  <SubOrderPage ref="SubOrderPageRef" />
+	  <!-- <PrintPage ref="printPageRef" /> -->
+	  <!-- 子订单详情页 -->
+	  <luckyexcelPage ref="luckyexcelPageRef" />
 	</div>
   </template>
 <script>
@@ -251,26 +260,44 @@ import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel } f
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
+import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()
+// const printPageRef = ref()
+
+//子订单详情页
+const gd_yulan = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	console.log(add_searchInfo.value.split(',')[0])
+	SubOrderPageRef.value.open(add_searchInfo.value.split(',')[0],add_formData['工序']) 
+}
+
 //获取登录用户信息
 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 month = String(today.getMonth() + 1).padStart(2, '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()
 
 
 //全局获取code,接口接收code
@@ -295,17 +322,16 @@ const add_formData = reactive({
 	是否订单尾包: '',
 });
 
-
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log(_code,"机台获取物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	if (data.data === null) {
-		ElMessage({
-			type: 'error',
-			message: '未获取到机台编号请确认MAC地址或与管理员联系'
-		})
+		add_formData['机台号'] = '测试机台'
+		add_formData['工序'] = "测试"
+		add_formData['组别'] = "测试"
+		add_formData['人员'] = "测试"
 		return;
 	}
 	add_formData['机台号'] = data.data['机台号']
@@ -351,21 +377,25 @@ const GetAddr =  () => {
   // 5. 发送
   xmlhttp.send();
 }
-// getMachineMacdata();
 GetAddr()
+
+// PDF预览
+const luckyexcelPageRef = ref()
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
+
 //搜索
 const add_searchInfo = ref('')
 //表格
 const add_tableData = reactive([]);
 //尾包选中值
 const activeButtonValue = ref('')
-//代表扫描两次自动保存
-const searcs = ref('')
 const _order = ref('')
+const _list = ref('')
 //技术附件
 const jstableData = reactive([])
 const ddtableData = reactive([])
-const _list = ref('')
 
 // 查询按钮
 const add_onSubmit = async ()=>{
@@ -373,14 +403,14 @@ const add_onSubmit = async ()=>{
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
 	}
-	
-  if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
-    const WorkListdata = [];
-    add_tableData.splice(0,add_tableData.length,...WorkListdata);
-	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-	return false;
-  }
+	if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
+		const WorkListdata = [];
+		add_tableData.splice(0,add_tableData.length,...WorkListdata);
+		ElMessage({type: 'warning',message: '请扫描小票二维码' })
+		return false;
+	}
   
+	//跳转上报数量input框中
 	setTimeout(() => {
 		const inputElement = document.getElementById('s_num');
 		if (inputElement) {
@@ -393,8 +423,8 @@ const add_onSubmit = async ()=>{
 	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
 	 console.log("getSpotLists.data.result.ci_num::",getSpotLists.data.result.ci_num)
 	 if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
-	 		 ElMessage({type: 'error',message: '已上报,无需再次报工' })
-	 		 add_searchInfo.value = ''
+		 ElMessage({type: 'error',message: '已上报,无需再次报工' })
+		 add_searchInfo.value = ''
 	 }
 	 console.log(getSpotLists)
 	 if(getSpotLists.data === null){
@@ -425,167 +455,6 @@ const add_onSubmit = async ()=>{
 	 ddtableData.splice(0,ddOrderAttachments.data.length,...ddOrderAttachments.data);
 	 
 }
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}	
-
-
 
 const AttendanceVisible=ref(false)
 //清空对象的属性值
@@ -616,7 +485,10 @@ const currentSlValue=ref('')
 
 //报工
 const add_Dialog = async ()=>{
-console.log(UniqId.value)
+	if(add_formData['机台号'] === '测试机台'){
+		ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+		return;
+	}
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -663,23 +535,28 @@ console.log(UniqId.value)
   }
 }
 
-const gd_yulan = () => {
-  if(_order.value === '' || _order.value === null){
-    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
-    return false;
-  }else{
-    const order = _order.value.split('-')[0]
-      printPageRef.value.open(order) 
-  }
+//退出
+const SubWorkOrderClose = () => {
+	SubWorkOrderStatusListlog.value = false
 }
+
 //单击
 const add_tableRowClick = async (row) => {
-	const orderString = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${row['尾包']}`;
+	// 使用 split 方法手动分割字符串
+	const serialParts = row['serial'].split('('); // 按 '(' 分割
+	const serial = serialParts[1] ? serialParts[1].split(')')[0] : ''; // 提取括号内的内容,如果没有则返回空字符串
+
+	// 根据尾包判断是否为 1 或 0
+	const tailPackage = row['尾包'] ? 1 : 0;
+	
+	// 拼接 searchInfo 字符串
+	const searchInfo = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${tailPackage},${serial}`;
+	add_searchInfo.value = searchInfo;
+	
 	add_formData['尺码'] =  row.尺码
 	add_formData['总数量'] =  row.数量
 	add_formData['剩余数量'] =  row.剩余数量
-	_order.value =  orderString
-console.log(row)
+	// _order.value =  orderString
 }
 //双击
 const add_updateCompanyFunc = async (row) => {
@@ -719,6 +596,7 @@ const add_xpSelectionChange = async (selection) => {
   console.log(allPrintData.value)
 }
 
+
 // =========== 删除按钮 ===========
 //记录复选框的值
 const bgSelection = ref(null)
@@ -902,6 +780,9 @@ margin-bottom: 5px;
 ::v-deep .el-input__wrapper #searchInput {  
   font-size: 16px; 
 } 
+::v-deep .el-input__wrapper #inputtext {  
+  font-size: 18px; 
+} 
 ::v-deep .el-input__wrapper #jitaihao {  
   font-size: 18px; 
 }  
@@ -918,7 +799,7 @@ margin-bottom: 5px;
   font-size: 18px; 
   color: red;
 } 
-::v-deep .el-input__wrapper #chima {  
+::v-deep .el-input__wrapper #s_num {  
   font-size: 18px; 
 } 
 ::v-deep .el-input__wrapper #sbsl {  

+ 116 - 235
src/view/performance/houdaoshougong.vue

@@ -7,9 +7,7 @@
 				<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="5"  style="padding: 0px;margin: 0px;"> -->
-					  <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
-					<!-- </el-col> -->
+					&nbsp;<el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
 				
 					<!-- 查询按钮 -->
 					<el-col :span="1.5"  style="padding: 0px;margin: 0px;">
@@ -43,25 +41,25 @@
 				
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
-						<el-text style="font-size: 30px;">尺码</el-text>
+						<el-text style="font-size: 30px;">&nbsp;尺码</el-text>
 					</el-col>
 					<!-- 尺码输入框 -->
 					<!-- &nbsp;&nbsp;&nbsp;
-					<p style="font-size: 24px;color: red;">{{add_formData['尺码']}}</p>
+					<p style="font-size: 24px;color: red;border: 2px black solid;padding: 5px 15px 5px 15px;">{{add_formData['尺码']}}</p>
 					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -->
-					<el-col :span="2"><el-input v-model="add_formData['尺码']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['尺码']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">总数量</el-text>
 					</el-col>
 					<!-- 总数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['总数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['总数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">剩余数量</el-text>
 					</el-col>
 					<!--剩余数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 						
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">上报数量</el-text>
@@ -101,7 +99,7 @@
 						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
-								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+								<el-tab-pane label="报工历史记录"   name="first">
 									<el-table ref="multipleTableRef" style="width: 100%;height: 53vh"
 										:row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 										:cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -127,41 +125,52 @@
 								
 							 <el-tab-pane label="订单资料附件" name="third">
 							   <el-table ref="multipleTable"
-							             :row-style="{ height: '30px' }"
-							             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							             :header-cell-style="{ padding: '0px' }"
-							             :show-overflow-tooltip="true"
-							             :cell-class-name="planUsageCellClass"
-							             highlight-current-row="true"
-							             @row-dblclick="gdbomupdateCompanyFunc"
-							             style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
-							 						   @selection-change="fjSelectionChange">
+							 			:row-style="{ height: '30px' }"
+							 			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+							 			:header-cell-style="{ padding: '0px' }"
+							 			:show-overflow-tooltip="true"
+							 			:cell-class-name="planUsageCellClass"
+							 			highlight-current-row="true"
+							 			@row-dblclick="gdbomupdateCompanyFunc"
+							 			style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+									   @selection-change="fjSelectionChange">
 							    <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
 							    <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
 							    <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
 							    <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
 							    <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								 <el-table-column align="left" label="操作"width="100"fixed="right">
+								   <template #default="scope">
+									 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+								   </template>
+								 </el-table-column>
 							   </el-table>
 							 </el-tab-pane> 
 							 
-							   <el-tab-pane label="技术附件"  name="fourth">
-							   	<el-table ref="multipleTable"
-							 			  :row-style="{ height: '30px' }"
-							 			  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							 			  :header-cell-style="{ padding: '0px' }"
-							 			  :show-overflow-tooltip="true"
-							 			  :cell-class-name="planUsageCellClass"
-							 			  highlight-current-row="true"
-							 			  @row-dblclick="ExcelShow"
-							 			  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-							 	 <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-							 	 <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-							 	 <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-							 	 <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-							 	 <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							       </el-table>
-							     </el-tab-pane>
-							</el-tabs>
+							 
+							 <el-tab-pane label="技术附件" name="fourth">
+							 	<el-table ref="multipleTable"
+									  :row-style="{ height: '30px' }"
+									  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+									  :header-cell-style="{ padding: '0px' }"
+									  :show-overflow-tooltip="true"
+									  :cell-class-name="planUsageCellClass"
+									  highlight-current-row="true"
+									  @row-dblclick="ExcelShow"
+									  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+								  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+								  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+								  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+								  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+								  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								  <el-table-column align="left" label="操作"width="100"fixed="right">
+									<template #default="scope">
+									  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+									</template>
+								  </el-table-column>
+							 	</el-table>
+							   </el-tab-pane>
+							 </el-tabs>
 						</el-row>
 					</el-main>
 				</layout-content>
@@ -174,7 +183,7 @@
 						    color: Selection === '' ? '' : '#fff'
 						  }"
 						  style="width: 110px;height: 60px; font-size: 20px; margin-left: 30px;">删除报工</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: 130px;height: 60px;font-size: 20px;">子订单详情页</el-button>
 						<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>
 					</div>
@@ -182,12 +191,12 @@
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
-	  <!-- 技术附件预览弹窗 -->
-	  <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-	    <div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-	  </el-dialog>
-	  
-	  <PrintPage ref="printPageRef" />
+	
+	  <!-- PDF预览页面 -->
+	  <SubOrderPage ref="SubOrderPageRef" />
+	  <!-- <PrintPage ref="printPageRef" /> -->
+	  <!-- 子订单详情页 -->
+	  <luckyexcelPage ref="luckyexcelPageRef" />
 	</div>
   </template>
 <script>
@@ -251,26 +260,44 @@ import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel } f
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
+import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()
+// const printPageRef = ref()
+
+//子订单详情页
+const gd_yulan = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	console.log(add_searchInfo.value.split(',')[0])
+	SubOrderPageRef.value.open(add_searchInfo.value.split(',')[0],add_formData['工序']) 
+}
+
 //获取登录用户信息
 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 month = String(today.getMonth() + 1).padStart(2, '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()
 
 
 //全局获取code,接口接收code
@@ -295,17 +322,16 @@ const add_formData = reactive({
 	是否订单尾包: '',
 });
 
-
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log(_code,"机台获取物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	if (data.data === null) {
-		ElMessage({
-			type: 'error',
-			message: '未获取到机台编号请确认MAC地址或与管理员联系'
-		})
+		add_formData['机台号'] = '测试机台'
+		add_formData['工序'] = "测试"
+		add_formData['组别'] = "测试"
+		add_formData['人员'] = "测试"
 		return;
 	}
 	add_formData['机台号'] = data.data['机台号']
@@ -351,21 +377,25 @@ const GetAddr =  () => {
   // 5. 发送
   xmlhttp.send();
 }
-// getMachineMacdata();
 GetAddr()
+
+// PDF预览
+const luckyexcelPageRef = ref()
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
+
 //搜索
 const add_searchInfo = ref('')
 //表格
 const add_tableData = reactive([]);
 //尾包选中值
 const activeButtonValue = ref('')
-//代表扫描两次自动保存
-const searcs = ref('')
 const _order = ref('')
+const _list = ref('')
 //技术附件
 const jstableData = reactive([])
 const ddtableData = reactive([])
-const _list = ref('')
 
 // 查询按钮
 const add_onSubmit = async ()=>{
@@ -373,14 +403,14 @@ const add_onSubmit = async ()=>{
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
 	}
-	
-  if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
-    const WorkListdata = [];
-    add_tableData.splice(0,add_tableData.length,...WorkListdata);
-	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-	return false;
-  }
+	if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
+		const WorkListdata = [];
+		add_tableData.splice(0,add_tableData.length,...WorkListdata);
+		ElMessage({type: 'warning',message: '请扫描小票二维码' })
+		return false;
+	}
   
+	//跳转上报数量input框中
 	setTimeout(() => {
 		const inputElement = document.getElementById('s_num');
 		if (inputElement) {
@@ -425,167 +455,6 @@ const add_onSubmit = async ()=>{
 	 ddtableData.splice(0,ddOrderAttachments.data.length,...ddOrderAttachments.data);
 	 
 }
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}	
-
-
 
 const AttendanceVisible=ref(false)
 //清空对象的属性值
@@ -616,7 +485,10 @@ const currentSlValue=ref('')
 
 //报工
 const add_Dialog = async ()=>{
-console.log(UniqId.value)
+	if(add_formData['机台号'] === '测试机台'){
+		ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+		return;
+	}
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -663,23 +535,28 @@ console.log(UniqId.value)
   }
 }
 
-const gd_yulan = () => {
-  if(_order.value === '' || _order.value === null){
-    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
-    return false;
-  }else{
-    const order = _order.value.split('-')[0]
-      printPageRef.value.open(order) 
-  }
+//退出
+const SubWorkOrderClose = () => {
+	SubWorkOrderStatusListlog.value = false
 }
+
 //单击
 const add_tableRowClick = async (row) => {
-	const orderString = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${row['尾包']}`;
+	// 使用 split 方法手动分割字符串
+	const serialParts = row['serial'].split('('); // 按 '(' 分割
+	const serial = serialParts[1] ? serialParts[1].split(')')[0] : ''; // 提取括号内的内容,如果没有则返回空字符串
+
+	// 根据尾包判断是否为 1 或 0
+	const tailPackage = row['尾包'] ? 1 : 0;
+	
+	// 拼接 searchInfo 字符串
+	const searchInfo = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${tailPackage},${serial}`;
+	add_searchInfo.value = searchInfo;
+	
 	add_formData['尺码'] =  row.尺码
 	add_formData['总数量'] =  row.数量
 	add_formData['剩余数量'] =  row.剩余数量
-	_order.value =  orderString
-console.log(row)
+	// _order.value =  orderString
 }
 //双击
 const add_updateCompanyFunc = async (row) => {
@@ -719,6 +596,7 @@ const add_xpSelectionChange = async (selection) => {
   console.log(allPrintData.value)
 }
 
+
 // =========== 删除按钮 ===========
 //记录复选框的值
 const bgSelection = ref(null)
@@ -902,6 +780,9 @@ margin-bottom: 5px;
 ::v-deep .el-input__wrapper #searchInput {  
   font-size: 16px; 
 } 
+::v-deep .el-input__wrapper #inputtext {  
+  font-size: 18px; 
+} 
 ::v-deep .el-input__wrapper #jitaihao {  
   font-size: 18px; 
 }  
@@ -918,7 +799,7 @@ margin-bottom: 5px;
   font-size: 18px; 
   color: red;
 } 
-::v-deep .el-input__wrapper #chima {  
+::v-deep .el-input__wrapper #s_num {  
   font-size: 18px; 
 } 
 ::v-deep .el-input__wrapper #sbsl {  

+ 120 - 238
src/view/performance/zongjianbaogong.vue

@@ -7,9 +7,7 @@
 				<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="5"  style="padding: 0px;margin: 0px;"> -->
-					  <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
-					<!-- </el-col> -->
+					&nbsp;<el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"@keyup.enter="add_onSubmit" id="searchInput" style="width: 295px; height: 50px;"/>
 				
 					<!-- 查询按钮 -->
 					<el-col :span="1.5"  style="padding: 0px;margin: 0px;">
@@ -43,25 +41,25 @@
 				
 				<el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
-						<el-text style="font-size: 30px;">尺码</el-text>
+						<el-text style="font-size: 30px;">&nbsp;尺码</el-text>
 					</el-col>
 					<!-- 尺码输入框 -->
 					<!-- &nbsp;&nbsp;&nbsp;
-					<p style="font-size: 24px;color: red;">{{add_formData['尺码']}}</p>
+					<p style="font-size: 24px;color: red;border: 2px black solid;padding: 5px 15px 5px 15px;">{{add_formData['尺码']}}</p>
 					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -->
-					<el-col :span="2"><el-input v-model="add_formData['尺码']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['尺码']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">总数量</el-text>
 					</el-col>
 					<!-- 总数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['总数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['总数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 					
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">剩余数量</el-text>
 					</el-col>
 					<!--剩余数量输入框 -->
-					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" readonly style="width: 80%; height: 40px;"/></el-col>
+					<el-col :span="2"><el-input v-model="add_formData['剩余数量']" id="inputtext" readonly style="width: 80%; height: 40px;"/></el-col>
 						
 					<el-col :span="1.5" style="padding: 0px;margin: 0px;">
 						<el-text style="font-size: 30px;">上报数量</el-text>
@@ -101,7 +99,7 @@
 						<el-row :gutter="24" style="margin-bottom: 15px;">
 							<!-- 表格数据 -->
 							  <el-tabs v-model="activeName">
-								<el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+								<el-tab-pane label="报工历史记录"   name="first">
 									<el-table ref="multipleTableRef" style="width: 100%;height: 53vh"
 										:row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 										:cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -127,41 +125,52 @@
 								
 							 <el-tab-pane label="订单资料附件" name="third">
 							   <el-table ref="multipleTable"
-							             :row-style="{ height: '30px' }"
-							             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							             :header-cell-style="{ padding: '0px' }"
-							             :show-overflow-tooltip="true"
-							             :cell-class-name="planUsageCellClass"
-							             highlight-current-row="true"
-							             @row-dblclick="gdbomupdateCompanyFunc"
-							             style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
-							 						   @selection-change="fjSelectionChange">
+							 			:row-style="{ height: '30px' }"
+							 			:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+							 			:header-cell-style="{ padding: '0px' }"
+							 			:show-overflow-tooltip="true"
+							 			:cell-class-name="planUsageCellClass"
+							 			highlight-current-row="true"
+							 			@row-dblclick="gdbomupdateCompanyFunc"
+							 			style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
+									   @selection-change="fjSelectionChange">
 							    <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
 							    <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
 							    <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
 							    <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
 							    <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								 <el-table-column align="left" label="操作"width="100"fixed="right">
+								   <template #default="scope">
+									 <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+								   </template>
+								 </el-table-column>
 							   </el-table>
 							 </el-tab-pane> 
 							 
-							   <el-tab-pane label="技术附件"  name="fourth">
-							   	<el-table ref="multipleTable"
-							 			  :row-style="{ height: '30px' }"
-							 			  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
-							 			  :header-cell-style="{ padding: '0px' }"
-							 			  :show-overflow-tooltip="true"
-							 			  :cell-class-name="planUsageCellClass"
-							 			  highlight-current-row="true"
-							 			  @row-dblclick="ExcelShow"
-							 			  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
-							 	 <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
-							 	 <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
-							 	 <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
-							 	 <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
-							 	 <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
-							       </el-table>
-							     </el-tab-pane>
-							</el-tabs>
+							 
+							 <el-tab-pane label="技术附件" name="fourth">
+							 	<el-table ref="multipleTable"
+									  :row-style="{ height: '30px' }"
+									  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+									  :header-cell-style="{ padding: '0px' }"
+									  :show-overflow-tooltip="true"
+									  :cell-class-name="planUsageCellClass"
+									  highlight-current-row="true"
+									  @row-dblclick="ExcelShow"
+									  style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="fjSelectionChange">
+								  <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+								  <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+								  <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+								  <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+								  <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+								  <el-table-column align="left" label="操作"width="100"fixed="right">
+									<template #default="scope">
+									  <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+									</template>
+								  </el-table-column>
+							 	</el-table>
+							   </el-tab-pane>
+							 </el-tabs>
 						</el-row>
 					</el-main>
 				</layout-content>
@@ -174,7 +183,7 @@
 						    color: Selection === '' ? '' : '#fff'
 						  }"
 						  style="width: 110px;height: 60px; font-size: 20px; margin-left: 30px;">删除报工</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: 130px;height: 60px;font-size: 20px;">子订单详情页</el-button>
 						<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>
 					</div>
@@ -182,12 +191,12 @@
 		  <!-- </el-main> -->
 		</layout-content>
 	  </layout>
-	  <!-- 技术附件预览弹窗 -->
-	  <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
-	    <div id="luckyexcel" style="width: 100%;height: 100vh;"></div>
-	  </el-dialog>
-	  
-	  <PrintPage ref="printPageRef" />
+	
+	  <!-- PDF预览页面 -->
+	  <SubOrderPage ref="SubOrderPageRef" />
+	  <!-- <PrintPage ref="printPageRef" /> -->
+	  <!-- 子订单详情页 -->
+	  <luckyexcelPage ref="luckyexcelPageRef" />
 	</div>
   </template>
 <script>
@@ -251,26 +260,44 @@ import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel } f
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
+import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 import { useUserStore } from '@/pinia/modules/user';
 defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()
+// const printPageRef = ref()
+
+//子订单详情页
+const gd_yulan = async () => {
+	if(add_searchInfo.value === '' || add_searchInfo.value === null){
+		ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
+		return false;
+	}
+	console.log(add_searchInfo.value.split(',')[0])
+	SubOrderPageRef.value.open(add_searchInfo.value.split(',')[0],add_formData['工序']) 
+}
+
 //获取登录用户信息
 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 month = String(today.getMonth() + 1).padStart(2, '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()
 
 
 //全局获取code,接口接收code
@@ -295,17 +322,16 @@ const add_formData = reactive({
 	是否订单尾包: '',
 });
 
-
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log(_code,"机台获取物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:Machine.value});
 	if (data.data === null) {
-		ElMessage({
-			type: 'error',
-			message: '未获取到机台编号请确认MAC地址或与管理员联系'
-		})
+		add_formData['机台号'] = '测试机台'
+		add_formData['工序'] = "测试"
+		add_formData['组别'] = "测试"
+		add_formData['人员'] = "测试"
 		return;
 	}
 	add_formData['机台号'] = data.data['机台号']
@@ -351,21 +377,25 @@ const GetAddr =  () => {
   // 5. 发送
   xmlhttp.send();
 }
-// getMachineMacdata();
 GetAddr()
+
+// PDF预览
+const luckyexcelPageRef = ref()
+const showPdf = async (row) => {
+	luckyexcelPageRef.value.open(row)
+}
+
 //搜索
 const add_searchInfo = ref('')
 //表格
 const add_tableData = reactive([]);
 //尾包选中值
 const activeButtonValue = ref('')
-//代表扫描两次自动保存
-const searcs = ref('')
 const _order = ref('')
+const _list = ref('')
 //技术附件
 const jstableData = reactive([])
 const ddtableData = reactive([])
-const _list = ref('')
 
 // 查询按钮
 const add_onSubmit = async ()=>{
@@ -373,14 +403,14 @@ const add_onSubmit = async ()=>{
 		ElMessage({type: 'warning',message: '未获取到机台'})
 		return false;
 	}
-	
-  if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
-    const WorkListdata = [];
-    add_tableData.splice(0,add_tableData.length,...WorkListdata);
-	ElMessage({type: 'warning',message: '请扫描小票二维码' })
-	return false;
-  }
+	if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
+		const WorkListdata = [];
+		add_tableData.splice(0,add_tableData.length,...WorkListdata);
+		ElMessage({type: 'warning',message: '请扫描小票二维码' })
+		return false;
+	}
   
+	//跳转上报数量input框中
 	setTimeout(() => {
 		const inputElement = document.getElementById('s_num');
 		if (inputElement) {
@@ -393,9 +423,10 @@ const add_onSubmit = async ()=>{
 	 const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
 	 console.log("getSpotLists.data.result.ci_num::",getSpotLists.data.result.ci_num)
 	 if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
-	 		 ElMessage({type: 'error',message: '已上报,无需再次报工' })
-	 		 add_searchInfo.value = ''
+		 ElMessage({type: 'error',message: '已上报,无需再次报工' })
+		 add_searchInfo.value = ''
 	 }
+	 console.log(getSpotLists)
 	 if(getSpotLists.data === null){
 		 add_searchInfo.value = ''
 		 add_formData['尺码'] = ''
@@ -424,167 +455,6 @@ const add_onSubmit = async ()=>{
 	 ddtableData.splice(0,ddOrderAttachments.data.length,...ddOrderAttachments.data);
 	 
 }
-//订单资料excel展示
-const gdbomupdateCompanyFunc = (row) =>{
-// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	// 加载插件和样式
-	const loadScriptsAndStyles = () => {
-	    $.getScript('/luckysheet/plugins/js/plugin.js', () => {
-	        $script('/luckysheet/luckysheet.umd.js', () => {
-	            initializeLuckysheet();
-	        });
-	    });
-	
-	    const styles = [
-	        '/luckysheet/plugins/css/pluginsCss.css',
-	        '/luckysheet/plugins/plugins.css',
-	        '/luckysheet/css/luckysheet.css',
-	        '/luckysheet/assets/iconfont/iconfont.css'
-	    ];
-	
-	    styles.forEach(style => {
-	        $('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', style));
-	    });
-	};
-	
-	// 初始化 Luckysheet
-	const initializeLuckysheet = () => {
-	    const callback = (exportJson, luckysheetfile) => {
-	        if (!exportJson.sheets || exportJson.sheets.length === 0) {
-	            alert("Failed to read the content of the excel file, currently does not support xls files!");
-	            return;
-	        }
-	        if (luckyExcel) luckyExcel.destroy();
-	        luckysheet.create({
-	            container: 'luckyexcel',
-	            data: exportJson.sheets,
-	            title: exportJson.info.name,
-	            lang: "zh",
-	            showtoolbar: false,
-	            showinfobar: false,
-	            allowEdit: false,
-	            enableAddRow: false,
-	            enableAddCol: false,
-	            userInfo: false,
-	            showRowBar: false,
-	            showColumnBar: false,
-	            sheetFormulaBar: false,
-	            enableAddBackTop: false,
-	        });
-	        luckyExcel = luckysheet;
-	    };
-	
-	    if (row['url'] === null || row['url'] === '') {
-	        const blob = dataURLtoBlob(row.附件内容);
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLucky(blob, callback);
-	    } else {
-	        const excelPath = `/${row.url.replace(/\\/g, "/")}`;
-	        const excelName = excelPath.split('/').pop();
-	        luckyexcelVisible.value = true;
-	        LuckyExcel.transformExcelToLuckyByUrl(excelPath, excelName, callback);
-	    }
-	};
-	
-	// Data URL 转 Blob
-	const dataURLtoBlob = (dataUrl) => {
-	    const byteString = atob(dataUrl.split(',')[1]);
-	    const ab = new ArrayBuffer(byteString.length);
-	    const ia = new Uint8Array(ab);
-	
-	    for (let i = 0; i < byteString.length; i++) {
-	        ia[i] = byteString.charCodeAt(i);
-	    }
-	
-	    return new Blob([ab], { type: 'application/octet-stream' });
-	};
-	
-	loadScriptsAndStyles();
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
-const luckyexcelCloseDialog = () => {
-  luckyexcelVisible.value = false
-}	
-
-
 
 const AttendanceVisible=ref(false)
 //清空对象的属性值
@@ -615,7 +485,10 @@ const currentSlValue=ref('')
 
 //报工
 const add_Dialog = async ()=>{
-console.log(UniqId.value)
+	if(add_formData['机台号'] === '测试机台'){
+		ElMessage({ type: 'warning', message: '测试机台禁止报工' });
+		return;
+	}
  if(add_formData['上报数量'] === ''){
     ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
 	return;
@@ -662,23 +535,28 @@ console.log(UniqId.value)
   }
 }
 
-const gd_yulan = () => {
-  if(_order.value === '' || _order.value === null){
-    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
-    return false;
-  }else{
-    const order = _order.value.split('-')[0]
-      printPageRef.value.open(order) 
-  }
+//退出
+const SubWorkOrderClose = () => {
+	SubWorkOrderStatusListlog.value = false
 }
+
 //单击
 const add_tableRowClick = async (row) => {
-	const orderString = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${row['尾包']}`;
+	// 使用 split 方法手动分割字符串
+	const serialParts = row['serial'].split('('); // 按 '(' 分割
+	const serial = serialParts[1] ? serialParts[1].split(')')[0] : ''; // 提取括号内的内容,如果没有则返回空字符串
+
+	// 根据尾包判断是否为 1 或 0
+	const tailPackage = row['尾包'] ? 1 : 0;
+	
+	// 拼接 searchInfo 字符串
+	const searchInfo = `${row['子订单编号']},${row['组别']},3,${row['尺码']},${row['数量']},${tailPackage},${serial}`;
+	add_searchInfo.value = searchInfo;
+	
 	add_formData['尺码'] =  row.尺码
 	add_formData['总数量'] =  row.数量
 	add_formData['剩余数量'] =  row.剩余数量
-	_order.value =  orderString
-console.log(row)
+	// _order.value =  orderString
 }
 //双击
 const add_updateCompanyFunc = async (row) => {
@@ -718,6 +596,7 @@ const add_xpSelectionChange = async (selection) => {
   console.log(allPrintData.value)
 }
 
+
 // =========== 删除按钮 ===========
 //记录复选框的值
 const bgSelection = ref(null)
@@ -741,11 +620,11 @@ const table_SelectionChange = (val) => {
 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(',')
+	console.log(Selection.value)
 }
 const del_delclick = async () => {
 	console.log(Selection.value)
@@ -901,6 +780,9 @@ margin-bottom: 5px;
 ::v-deep .el-input__wrapper #searchInput {  
   font-size: 16px; 
 } 
+::v-deep .el-input__wrapper #inputtext {  
+  font-size: 18px; 
+} 
 ::v-deep .el-input__wrapper #jitaihao {  
   font-size: 18px; 
 }  
@@ -917,7 +799,7 @@ margin-bottom: 5px;
   font-size: 18px; 
   color: red;
 } 
-::v-deep .el-input__wrapper #chima {  
+::v-deep .el-input__wrapper #s_num {  
   font-size: 18px; 
 } 
 ::v-deep .el-input__wrapper #sbsl {