zck 7 luni în urmă
părinte
comite
b8094fdf0f

+ 1 - 0
src/view/DecisionSupport/productioncents/index.vue

@@ -377,6 +377,7 @@ const ExportDetailsToExcel = async () => {
       { key: '机台编号', label: '机台编号', width: 100 },
       { key: '机台编号', label: '机台编号', width: 100 },
       { key: '工单编号', label: '工单编号', width: 100 },
       { key: '工单编号', label: '工单编号', width: 100 },
       { key: '工序号', label: '印件号', width: 100 },
       { key: '工序号', label: '印件号', width: 100 },
+      { key: '印件名称', label: '印件名称', width: 440 },
       { key: '工序', label: '工序号', width: 100 },
       { key: '工序', label: '工序号', width: 100 },
       { key: '工序名称', label: '工序名称', width: 440 },
       { key: '工序名称', label: '工序名称', width: 440 },
       { key: '班组编号', label: '班组编号', width: 100 },
       { key: '班组编号', label: '班组编号', width: 100 },

+ 2 - 3
src/view/job/processSheet/processSheet.vue

@@ -81,11 +81,11 @@
 		                </tr>
 		                </tr>
 		                <tr>
 		                <tr>
 		                <td><span>起始流程号</span></td>
 		                <td><span>起始流程号</span></td>
-		                <td><input name="start_liucheng" type="text" v-model="workData.start_liucheng" value="1" class="required" style="width: 380px;height: 30px;"></td>
+		                <td><input name="start_liucheng" type="number" v-model="workData.start_liucheng" value="1" class="required" style="width: 380px;height: 30px;"></td>
 		                </tr>
 		                </tr>
 		                <tr>
 		                <tr>
 		                <td><span>截止流程号</span></td>
 		                <td><span>截止流程号</span></td>
-		                <td><input name="liucheng_num" type="text" v-model="workData.liucheng_num" value="1" class="required" style="width: 380px;height: 30px;"></td>
+		                <td><input name="liucheng_num" type="number" v-model="workData.liucheng_num" value="1" class="required" style="width: 380px;height: 30px;"></td>
 		                </tr>
 		                </tr>
 		                <tr>
 		                <tr>
 		                <td>
 		                <td>
@@ -5386,7 +5386,6 @@ const selectpYj = (event) => {
 // 获取起始和结束值
 // 获取起始和结束值
 const start = workData.value.start_liucheng;//起始流程单号
 const start = workData.value.start_liucheng;//起始流程单号
 const end = workData.value.liucheng_num;//截止程单号
 const end = workData.value.liucheng_num;//截止程单号
-
 for (let i = start; i <= end; i++) {
 for (let i = start; i <= end; i++) {
   (function(currentIndex, relativeIndex) {  // 新增 relativeIndex 参数
   (function(currentIndex, relativeIndex) {  // 新增 relativeIndex 参数
     console.log("currentIndex:", currentIndex, "relativeIndex:", relativeIndex);
     console.log("currentIndex:", currentIndex, "relativeIndex:", relativeIndex);

+ 81 - 0
src/view/performance/08-timesheet/index.vue

@@ -20,6 +20,7 @@
 								<el-button type="primary" icon="edit" class="bt" @click="handleShowDetail">查改 </el-button>
 								<el-button type="primary" icon="edit" class="bt" @click="handleShowDetail">查改 </el-button>
 								<el-button type="primary" icon="plus" class="bt" @click="handleShowAdd">新增 </el-button>
 								<el-button type="primary" icon="plus" class="bt" @click="handleShowAdd">新增 </el-button>
 								<el-button type="primary" class="bt" icon="delete" @click="onDel">删除</el-button>
 								<el-button type="primary" class="bt" icon="delete" @click="onDel">删除</el-button>
+								<el-button type="primary" class="bt" icon="Download" @click="exportToExcel">导出到Excel</el-button>
 
 
 							</el-form-item>
 							</el-form-item>
 						</el-form>
 						</el-form>
@@ -235,6 +236,9 @@
 
 
 <script setup>
 <script setup>
 	// 全量引入格式化工具 请按需保留
 	// 全量引入格式化工具 请按需保留
+	import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import LuckyExcel from 'luckyexcel';
 	import {
 	import {
 		Layout,
 		Layout,
 		LayoutContent,
 		LayoutContent,
@@ -889,6 +893,83 @@
 			}
 			}
 		})
 		})
 	}
 	}
+
+	//导出按钮(汇总)
+	const exportToExcel = async () => { 
+  try {
+    // 获取数据
+    const response = await getTable({ date: params.date });
+    const originalData = response.data.rows;
+    console.log('原始数据:', originalData);
+
+    // 1. 定义需要转换为数字的列及其小数位数配置
+    const numberColumnsConfig = {
+      4: 1,
+      8: 1,
+      12: 1,  
+      16: 1,
+      20: 1,
+      24: 1 
+    };
+
+    // 2. 准备表头行 - 使用tableColumns中的label
+    const headerRow = tableColumns.map(col => col.label);
+    
+    // 3. 准备数据行 - 按照tableColumns中的prop顺序提取数据
+    const dataRows = originalData.map(item => {
+      return tableColumns.map(col => {
+        const value = item[col.prop] || '';
+        return value;
+      });
+    });
+
+    // 4. 合并表头和数据
+    const excelData = [headerRow, ...dataRows];
+    
+    // 5. 创建工作表
+    const worksheet = XLSX.utils.aoa_to_sheet(excelData);
+    
+    // 6. 设置数字格式 - 根据配置处理指定列
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    
+    // 处理配置的数字列
+    Object.keys(numberColumnsConfig).forEach(colIndex => {
+      const decimalPlaces = numberColumnsConfig[colIndex];
+      const colNum = parseInt(colIndex);
+      
+      for (let row = range.s.r + 1; row <= range.e.r; row++) {
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: colNum });
+        if (worksheet[cellAddress]) {
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 设置为数字类型
+            worksheet[cellAddress].v = numValue; // 更新数值
+            
+            // 设置数字格式 (0=整数, 0.0=1位小数, 0.00=2位小数等)
+            worksheet[cellAddress].z = decimalPlaces > 0 
+              ? `0.${'0'.repeat(decimalPlaces)}` 
+              : '0';
+          }
+        }
+      }
+    });
+    
+    // 7. 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, '工时数据');
+    
+    // 生成带日期的文件名
+    const fileName = `工时数据_${new Date().toISOString().slice(0, 10)}.xlsx`;
+    XLSX.writeFile(workbook, fileName);
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败: ' + (error.message || '请重试'));
+  }
+};
+
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>

+ 376 - 3
src/view/v23financial/v23.vue → src/view/v23financial/v23Costmaintenance.vue

@@ -13,7 +13,7 @@
                 <el-button type="primary" class="bt" icon="edit" @click="onout">月度人工维护</el-button>
                 <el-button type="primary" class="bt" icon="edit" @click="onout">月度人工维护</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
-                <el-button type="primary" class="bt" icon="edit" @click="onout">能耗报表</el-button>
+                <el-button type="primary" class="bt" icon="edit" @click="onforms">能耗报表</el-button>
 
 
               </el-form-item>
               </el-form-item>
             </el-form>
             </el-form>
@@ -157,6 +157,7 @@
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   
   
   import {ref, reactive} from 'vue'
   import {ref, reactive} from 'vue'
+  import {hiprint} from "vue-plugin-hiprint";
   import { exportExcelFile } from '@/utils/excel'
   import { exportExcelFile } from '@/utils/excel'
   import {ElMessage} from "element-plus";
   import {ElMessage} from "element-plus";
   defineOptions({name: 'Company'})
   defineOptions({name: 'Company'})
@@ -164,9 +165,381 @@
   
   
 
 
   
   
-  
+  let _table_print = ref([
+  {
+  mergeRowCount: 3, 
+  data: [
+  { 
+        type: "公共课", 
+        id: "A001",
+        name2: "QQ",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      },
+      { 
+        type: "", 
+        id: "A002",
+        name2: "WW",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      }, 
+      { 
+        type: "", 
+        id: "A002",
+        name2: "EE",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      },
+      { 
+        type: "选修课", 
+        id: "B001",
+        name2: "RR",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      }, 
+      { 
+        type: "课外课", 
+        id: "C001",
+        name2: "TT",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      }, 
+      { 
+        type: "", 
+        id: "小计",
+        name2: "0",  // 补全所有字段
+        time: "",
+        score: "",
+        start: "",
+        tName2: ""
+      }, 
+  ]
+}
+]);
 
 
-  
+  //打印小票数据
+  const jsondata ={
+  "panels": [{
+    "index": 0,
+    "name": 1,
+    "height": 296.6,
+    "width": 210,
+    "paperHeader": 76.5,
+    "paperFooter": 832.5,
+    "printElements": [{
+      "options": {
+        "left": 228,
+        "top": 25.5,
+        "height": 33,
+        "width": 169.5,
+        "title": "各月水电气统计报表",
+        "right": 397.4947814941406,
+        "bottom": 57.75,
+        "vCenter": 312.7447814941406,
+        "hCenter": 41.25,
+        "coordinateSync": false,
+        "widthHeightSync": false,
+        "fontSize": 18,
+        "fontWeight": "bolder",
+        "textAlign": "center",
+        "textContentVerticalAlign": "middle",
+        "qrCodeLevel": 0
+      },
+      "printElementType": {
+        "title": "文本",
+        "type": "text"
+      }
+    }, {
+      "options": {
+        "left": 19.5,
+        "top": 9,
+        "height": 30,
+        "width": 177,
+        "right": 197.24478149414062,
+        "bottom": 39,
+        "vCenter": 108.74478149414062,
+        "hCenter": 24
+      },
+      "printElementType": {
+        "title": "图片",
+        "type": "image"
+      }
+    }, {
+      "options": {
+        "left": 253.5,
+        "top": 55.5,
+        "height": 15,
+        "width": 120,
+        "title": "2024年11月",
+        "field": "riqi",
+        "coordinateSync": false,
+        "widthHeightSync": false,
+        "fontSize": 10.5,
+        "textAlign": "center",
+        "textContentVerticalAlign": "middle",
+        "qrCodeLevel": 0,
+        "right": 373.48956298828125,
+        "bottom": 70.48957443237305,
+        "vCenter": 313.48956298828125,
+        "hCenter": 62.98957443237305
+      },
+      "printElementType": {
+        "title": "文本",
+        "type": "text"
+      }
+    }, {
+      "options": {
+        "left": 0,
+        "top": 61.5,
+        "height": 13.5,
+        "width": 67.5,
+        "title": "部门名称:",
+        "right": 79.49217224121094,
+        "bottom": 74.9999885559082,
+        "vCenter": 35.99217224121094,
+        "hCenter": 68.2499885559082,
+        "coordinateSync": false,
+        "widthHeightSync": false,
+        "fontSize": 15,
+        "fontWeight": "bolder",
+        "textAlign": "center",
+        "textContentVerticalAlign": "middle",
+        "qrCodeLevel": 0
+      },
+      "printElementType": {
+        "title": "文本",
+        "type": "text"
+      }
+    }, {
+      "options": {
+        "left": 66,
+        "top": 61.5,
+        "height": 13.5,
+        "width": 78,
+        "title": "凹印车间",
+        "right": 133.49478149414062,
+        "bottom": 74.99740219116211,
+        "vCenter": 99.74478149414062,
+        "hCenter": 68.24740219116211,
+        "field": "bm",
+        "coordinateSync": false,
+        "widthHeightSync": false,
+        "fontSize": 15,
+        "fontWeight": "bolder",
+        "textAlign": "center",
+        "textContentVerticalAlign": "middle",
+        "qrCodeLevel": 0
+      },
+      "printElementType": {
+        "title": "文本",
+        "type": "text"
+      }
+    }, {
+      "options": {
+        "left": 7.5,
+        "top": 111,
+        "height": 64.5,
+        "width": 555,
+        "field": "table",
+        "coordinateSync": false,
+        "widthHeightSync": false,
+        "right": 562.5,
+        "bottom": 176.24218368530273,
+        "vCenter": 285,
+        "hCenter": 143.99218368530273,
+        "tableHeaderRowHeight": 30,
+        "tableBodyRowHeight": 30,
+        "rowsColumnsMerge": "function (data, col, colIndex, rowIndex) {\n  // 1. 获取当前行数据\n  const rowData = (data.table || data)[rowIndex];\n  \n  // 2. 从行数据或顶层获取合并参数\n  const mergeRowCount = rowData?._hiprintMergeInfo?.mergeRowCount || \n                       data?._hiprintOptions?.mergeRowCount || \n                       0;\n  \n  // 3. 合并第一列\n  if (colIndex === 0) {\n    if (rowIndex === 0 && mergeRowCount > 1) {\n      console.log(`合并第${rowIndex}行,合并${mergeRowCount}行`);\n      return [mergeRowCount, 1];\n    }\n    if (rowIndex < mergeRowCount) {\n      console.log(`隐藏第${rowIndex}行`);\n      return [0, 1];\n    }\n  }\n  \n  // 4. 特殊行样式\n  if (mergeRowCount > 0 && \n      (rowIndex === mergeRowCount || rowIndex === mergeRowCount + 2)) {\n    return {\n      rowspan: 1,\n      colspan: 1,\n      style: {\n        'background-color': '#FFD700 !important',\n        'border': 'none !important',\n        'font-weight': 'bold !important'\n      }\n    };\n  }\n  \n  // 5. 默认不合并\n  return [1, 1];\n}",
+        "cellStyle": "function (data, rowIndex, colIndex) {\n  // 1. 获取合并行数\n  const mergeRowCount = data._hiprint_mergeRowCount || \n                       (data.table && data.table._mergeRowCount) || \n                       0;\n  \n  // 2. 特殊行样式\n  if (mergeRowCount > 0 && \n      (rowIndex === mergeRowCount || rowIndex === mergeRowCount + 2)) {\n    return {\n      'background-color': '#FFD700 !important',\n      'border': 'none !important',\n      'font-weight': 'bold !important'\n    };\n  }\n  return null;\n}",
+        "rowsColumnsMergeClean": true,
+        "tableHeaderRepeat": "first",
+        "columns": [
+          [{
+            "width": 69.87094821428565,
+            "title": "费用<br/>类型",
+            "field": "type",
+            "checked": true,
+            "columnId": "type",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 148.38682500000007,
+            "title": "设备或科目名称",
+            "field": "id",
+            "checked": true,
+            "columnId": "id",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 91.0100303571429,
+            "title": "耗电量",
+            "field": "name2",
+            "checked": true,
+            "columnId": "name2",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 43.62438750000005,
+            "title": "电价",
+            "field": "time",
+            "checked": true,
+            "columnId": "time",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 57.384487500000006,
+            "title": "耗气量",
+            "field": "score",
+            "checked": true,
+            "columnId": "score",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 65.43760714285709,
+            "title": "气价",
+            "field": "start",
+            "checked": true,
+            "columnId": "start",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }, {
+            "width": 79.28571428571428,
+            "title": "费用合计",
+            "field": "tName2",
+            "checked": true,
+            "columnId": "tName2",
+            "fixed": false,
+            "rowspan": 1,
+            "colspan": 1,
+            "align": "center",
+            "tableColumnHeight": "30",
+            "tableTextType": "text",
+            "tableBarcodeMode": "CODE128A",
+            "tableQRCodeLevel": 0,
+            "tableSummaryTitle": true,
+            "tableSummary": ""
+          }]
+        ]
+      },
+      "printElementType": {
+        "title": "订单数据",
+        "type": "table",
+        "editable": true,
+        "columnDisplayEditable": true,
+        "columnDisplayIndexEditable": true,
+        "columnTitleEditable": true,
+        "columnResizable": true,
+        "columnAlignEditable": true,
+        "isEnableEditField": true,
+        "isEnableContextMenu": true,
+        "isEnableInsertRow": true,
+        "isEnableDeleteRow": true,
+        "isEnableInsertColumn": true,
+        "isEnableDeleteColumn": true,
+        "isEnableMergeCell": true
+      }
+    }],
+    "paperNumberLeft": 568.5,
+    "paperNumberTop": 339,
+    "paperNumberDisabled": true,
+    "paperNumberContinue": true,
+    "watermarkOptions": {
+      "content": "vue-plugin-hiprint",
+      "rotate": 25,
+      "timestamp": true,
+      "format": "YYYY-MM-DD HH:mm"
+    },
+    "panelLayoutOptions": {}
+  }]
+}
+const onforms = () => {
+  const hiprintTemplate = new hiprint.PrintTemplate({
+    template: jsondata
+  });
+
+  // 准备打印数据(关键修改)
+  const printData = {
+    // 1. 保持table字段结构
+    table: JSON.parse(JSON.stringify(_table_print.value[0].data)),
+    
+    // 2. 合并参数必须附加到每行数据上
+    _hiprintOptions: {
+      mergeRowCount: _table_print.value[0].mergeRowCount
+    },
+    
+    // 3. 其他模板字段
+    riqi: "2024年11月",
+    bm: "凹印车间"
+  };
+
+  // 4. 将合并参数注入到每行数据(关键步骤)
+  printData.table.forEach(row => {
+    row._hiprintMergeInfo = {
+      mergeRowCount: _table_print.value[0].mergeRowCount
+    };
+  });
+
+  console.log("最终打印数据:", JSON.stringify(printData, null, 2));
+  hiprintTemplate.print(printData);
+}
 
 
   
   
 
 

+ 34 - 35
src/view/yunyin/shengchanguanli/PrintingPlateRequisition.vue

@@ -9,8 +9,8 @@
                 <el-input v-model="searchInfo" placeholder="搜索物料名称" clearable style="width: 200px;margin: 5px"></el-input>
                 <el-input v-model="searchInfo" placeholder="搜索物料名称" clearable style="width: 200px;margin: 5px"></el-input>
                 <el-button type="primary" class="bt" icon="search" @click="on_search">查询</el-button>
                 <el-button type="primary" class="bt" icon="search" @click="on_search">查询</el-button>
                 <el-button type="primary" class="bt" icon="edit" :disabled="!yblyselectedvalue" @click="onout">领出</el-button>
                 <el-button type="primary" class="bt" icon="edit" :disabled="!yblyselectedvalue" @click="onout">领出</el-button>
-                <el-button type="primary" class="bt" icon="document" :disabled="!selectedIds" @click="onwithdraw">收回</el-button>
-                <el-button type="primary" class="bt" icon="delete" :disabled="!selectedIds" @click="on_delete">删除</el-button>
+                <el-button type="primary" class="bt" icon="document" :disabled="!yblyselectedvalue" @click="onwithdraw">收回</el-button>
+                <!-- <el-button type="primary" class="bt" icon="delete" :disabled="!selectedIds" @click="on_delete">删除</el-button> -->
                 <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogGxclhc = true;}">工序产量核查</el-button>
                 <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogGxclhc = true;}">工序产量核查</el-button>
                 <el-button type="primary" class="bt" icon="download"  @click="ToExcel" >导出到Excel</el-button>
                 <el-button type="primary" class="bt" icon="download"  @click="ToExcel" >导出到Excel</el-button>
               </el-form-item>
               </el-form-item>
@@ -288,12 +288,12 @@ const _WorkList_page =  async () =>{
   console.log(searchInfo.value)
   console.log(searchInfo.value)
   if (searchInfo.value === ''){
   if (searchInfo.value === ''){
     // showKH.value = node.code === '客户产品印版库'?true:false;
     // showKH.value = node.code === '客户产品印版库'?true:false;
-      const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value})
+      const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value,key:'1'})
       total.value = res.data.total
       total.value = res.data.total
       wltableData.value = res.data.data
       wltableData.value = res.data.data
   }else{
   }else{
     // showKH.value = node.code === '客户产品印版库'?true:false; 
     // showKH.value = node.code === '客户产品印版库'?true:false; 
-    const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
+    const res = await getPPList({code:'',search:searchInfo.value,page:page.value,limit:pageSize.value,key:'1'})
     total.value = res.data.total
     total.value = res.data.total
     wltableData.value = res.data.data
     wltableData.value = res.data.data
   }
   }
@@ -347,7 +347,7 @@ const transformData = (data) => {
     if(!node.children){
     if(!node.children){
       nodecode.value = node.label.split(' ')[0]
       nodecode.value = node.label.split(' ')[0]
       showKH.value = node.code === '客户产品印版库'?true:false;
       showKH.value = node.code === '客户产品印版库'?true:false;
-      const res = await getPPList({code:node.label.split(' ')[0],page:page.value,limit:pageSize.value})
+      const res = await getPPList({code:node.label.split(' ')[0],page:page.value,limit:pageSize.value,key:'1'})
       if (res.code === 0){
       if (res.code === 0){
         total.value = res.data.total
         total.value = res.data.total
         wltableData.value = res.data.data
         wltableData.value = res.data.data
@@ -361,7 +361,7 @@ const transformData = (data) => {
 
 
   const searchInfo = ref('')
   const searchInfo = ref('')
   const on_search = async () => {
   const on_search = async () => {
-    const res = await getPPList({code:nodecode.value,search:searchInfo.value,page:page.value,limit:pageSize.value})
+    const res = await getPPList({code:'',search:searchInfo.value,page:page.value,limit:pageSize.value,key:'1'})
     if (res.code === 0) {
     if (res.code === 0) {
       total.value = res.data.total
       total.value = res.data.total
       wltableData.value = res.data.data 
       wltableData.value = res.data.data 
@@ -377,12 +377,12 @@ const transformData = (data) => {
     console.log(row)
     console.log(row)
     clickedRow.value = row;
     clickedRow.value = row;
     console.log(clickedRow.value)
     console.log(clickedRow.value)
-    const res = await getPPReceive({ code: row.存货编码,batch:row.供方批号})
-    if (res.code === 0) {
-      wlmxtableData.value = res.data 
-    }else{
-      wlmxtableData.value = []
-    }
+    // const res = await getPPReceive({ code: row.存货编码,batch:row.供方批号})
+    // if (res.code === 0) {
+    //   wlmxtableData.value = res.data 
+    // }else{
+    //   wlmxtableData.value = []
+    // }
   } catch (error) {
   } catch (error) {
   }
   }
 }
 }
@@ -391,7 +391,7 @@ const transformData = (data) => {
   const data_refresh = async () =>{
   const data_refresh = async () =>{
     try {
     try {
     console.log(clickedRow.value)
     console.log(clickedRow.value)
-    const res1 = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value})
+    const res1 = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value,key:'1'})
       if (res1.code === 0){
       if (res1.code === 0){
         total.value = res1.data.total
         total.value = res1.data.total
         wltableData.value = res1.data.data
         wltableData.value = res1.data.data
@@ -401,12 +401,12 @@ const transformData = (data) => {
         wlmxtableData.value = []
         wlmxtableData.value = []
       }
       }
 
 
-    const res = await getPPReceive({ code: clickedRow.value.存货编码,batch:clickedRow.value.供方批号})
-    if (res.code === 0) {
-      wlmxtableData.value = res.data 
-    }else{
-      wlmxtableData.value = []
-    }
+    // const res = await getPPReceive({ code: clickedRow.value.存货编码,batch:clickedRow.value.供方批号})
+    // if (res.code === 0) {
+    //   wlmxtableData.value = res.data 
+    // }else{
+    //   wlmxtableData.value = []
+    // }
   } catch (error) {
   } catch (error) {
     ElMessage.error('获取数据失败')
     ElMessage.error('获取数据失败')
   }
   }
@@ -453,7 +453,8 @@ const yblySelectionChange = (selection) => {
   } else {
   } else {
     yblyselectedvalue.value = {
     yblyselectedvalue.value = {
       inventoryCodes: selection.map(item => item.存货编码),
       inventoryCodes: selection.map(item => item.存货编码),
-      batchNumbers: selection.map(item => item.供方批号)
+      batchNumbers: selection.map(item => item.供方批号),
+      GDUID:selection.map(item => item.GDUID)
     }
     }
   }
   }
   
   
@@ -476,9 +477,11 @@ const rawenterDialog = async () => {
       cancelButtonText: '取消',
       cancelButtonText: '取消',
       type: 'warning'
       type: 'warning'
     })
     })
-    
+    console.log(yblyselectedvalue.value)
+    const gduidArray = yblyselectedvalue.value.GDUID || [];
+    const selectedIds = gduidArray.join(',');
     // 调用收回API,假设是批量删除接口
     // 调用收回API,假设是批量删除接口
-    const res = await PrintDetailEdit({ id: selectedIds.value,number:Plate.印数})
+    const res = await PrintDetailEdit({ id: selectedIds,number:Plate.印数})
     
     
     if (res.code === 0) {
     if (res.code === 0) {
       ElMessage.success('收回成功')
       ElMessage.success('收回成功')
@@ -490,24 +493,20 @@ const rawenterDialog = async () => {
       ElMessage.error(res.msg || '收回失败')
       ElMessage.error(res.msg || '收回失败')
     }
     }
   } catch (error) {
   } catch (error) {
-    if (error !== 'cancel') {
-      console.error('收回失败:', error)
-      ElMessage.error('收回操作已取消')
-    }
   }
   }
 }
 }
 
 
 const rawcloseDialog = async () => {
 const rawcloseDialog = async () => {
 
 
-  const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value})
-      if (res.code === 0){
-        total.value = res.data.total
-        wltableData.value = res.data.data
-      }else{
-        total.value = 0
-        wltableData.value = []
-        wlmxtableData.value = []
-      }
+  // const res = await getPPList({code:nodecode.value,page:page.value,limit:pageSize.value,key:'1'})
+  //     if (res.code === 0){
+  //       total.value = res.data.total
+  //       wltableData.value = res.data.data
+  //     }else{
+  //       total.value = 0
+  //       wltableData.value = []
+  //       wlmxtableData.value = []
+  //     }
   Plate.印数 = ''
   Plate.印数 = ''
   dialogwithdrawVisible.value = false
   dialogwithdrawVisible.value = false
 }
 }