zck 7 bulan lalu
induk
melakukan
a9b680dc61

+ 27 - 0
src/api/mes/job.js

@@ -476,6 +476,33 @@ export const PARDateExcel = (params) => {
   })
 }
 
+//产品年度投入产出率统计->左侧菜单
+export const Productyearleft = (params) => {
+  return service({
+    url: '/mes_server/Achievementatestatistics/left_Productyear',
+    method: 'get',
+    params
+  })
+}
+
+//产品年度投入产出率统计->数据列表
+export const Productyearlist = (params) => {
+  return service({
+    url: '/mes_server/Achievementatestatistics/list_Productyear',
+    method: 'get',
+    params
+  })
+}
+
+//产品年度投入产出率统计->明细数据列表
+export const Productmonthlist = (params) => {
+  return service({
+    url: '/mes_server/Achievementatestatistics/list_Productmonth',
+    method: 'get',
+    params
+  })
+}
+
 
 /*
 	设备管理

+ 353 - 0
src/view/DecisionSupport/ProductOutputRate.vue

@@ -0,0 +1,353 @@
+<template>
+    <div>
+      <layout>
+        <layout-header>
+          <div class="">
+            <!--          按钮部分-->
+            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
+              <el-form-item>
+                <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
+                <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-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="210" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>产品年度投入产出率统计</h3>
+              <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+              </el-tree>
+            </div>
+          </layout-sider>
+  
+          <!-- 右侧区域 -->
+          <layout-content >
+          <el-main>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 38vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="hztableData"  border row-key="ID"
+                        size="small" id="hztable"
+
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="hztableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column   align="center" label="成品代号" prop="成品编码"  width="120" />
+               <el-table-column   align="center" label="成品名称" prop="成品名称"  width="300" />
+               <el-table-column   align="center" label="投料数量" prop="实际投料"  width="100" />
+               <el-table-column   align="center" label="入仓数量" prop="入仓数量"  width="90" />
+               <el-table-column   align="center" label="综合合格率" prop="综合合格率"  width="120" />
+               <el-table-column   align="center" label="月份01" prop="1月"  width="90" />
+               <el-table-column   align="center" label="月份02" prop="2月"  width="90" />
+               <el-table-column   align="center" label="月份03" prop="3月"  width="90" />
+               <el-table-column   align="center" label="月份04" prop="4月"  width="90" />
+               <el-table-column   align="center" label="月份05" prop="5月"  width="90" />
+               <el-table-column   align="center" label="月份06" prop="6月"  width="90" />
+               <el-table-column   align="center" label="月份07" prop="7月"  width="90" />
+               <el-table-column   align="center" label="月份08" prop="8月"  width="90" />
+               <el-table-column   align="center" label="月份09" prop="9月"  width="90" />
+               <el-table-column   align="center" label="月份10" prop="10月"  width="90" />
+               <el-table-column   align="center" label="月份11" prop="11月"  width="90" />
+               <el-table-column   align="center" label="月份12" prop="12月"  width="90" />
+              </el-table>
+  
+              <!-- 分页 -->
+              <div class="gva-pagination">
+                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+
+              <el-table ref="multipleTable" style="width: 100%;height: 40vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="mxtableData"  border row-key="ID"
+                        size="small" id="mxtable"
+
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="mxtableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column   align="center" label="工单编号" prop="工单编号"  width="120" />
+               <el-table-column   align="center" label="订单数量" prop="订单数量"  width="120" />
+               <el-table-column   align="center" label="实际投料" prop="实际投料"  width="100" />
+               <el-table-column   align="center" label="工单完工日期" prop="sys_rq"  width="110" />
+               <el-table-column   align="center" label="工单入仓数量" prop="入仓数量"  width="120" />
+               <el-table-column   align="center" label="实际合格率" prop="实际合格率"  width="90" />
+               <el-table-column   align="center" label="客户编号" prop="客户代号"  width="90" />
+               <el-table-column   align="center" label="客户名称" prop="客户名称"  width="90" />
+               <el-table-column   align="center" label="成品代号" prop="产品代号"  width="130" />
+               <el-table-column   align="center" label="成品名称" prop="产品名称"  width="330" />
+               <el-table-column   align="center" label="销售订单号" prop="销售订单号"  width="90" />
+              </el-table>
+            </div>
+          </el-main>
+        </layout-content>
+        </layout>
+      </layout>
+    </div>
+  </template>
+  <script setup>
+  // 全量引入格式化工具 请按需保留
+  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+  import {ref, reactive} from 'vue'
+  import { exportExcelFile } from '@/utils/excel'
+  import {ElMessage} from "element-plus";
+  import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import LuckyExcel from 'luckyexcel';
+  import {Productyearleft,Productyearlist,Productmonthlist,} from "@/api/mes/job.js"
+
+  defineOptions({name: 'Company'})
+  // =========== 获取左侧树侧形结构 ===========
+const treeData = ref([]);
+const defaultProps = {
+  children: 'children',
+  label: 'label'
+};
+const getTreeData = async () => {
+  try {
+    const res = await Productyearleft(); // 调用您的API接口
+    
+    if (res.code === 0 && res.data) {
+      // 转换数据结构
+      treeData.value = Object.entries(res.data).map(([workshopType, yearsData]) => {
+        // 创建父节点(工单类型)
+        const parentNode = {
+          label: workshopType,
+          value: workshopType,
+          children: []
+        };
+        
+        // 处理每个年份的数据
+        Object.entries(yearsData).forEach(([year, workshops]) => {
+          // 创建年份节点
+          const yearNode = {
+            label: year,
+            value: `${workshopType}-${year}`,
+            children: workshops.map(workshop => ({
+              label: workshop.trim(),
+              value: `${workshopType}-${year}-${workshop.trim()}`,
+              type: 'workshop'
+            }))
+          };
+          
+          parentNode.children.push(yearNode);
+        });
+        
+        // 对年份节点按年份倒序排序
+        parentNode.children.sort((a, b) => b.label.localeCompare(a.label));
+        
+        return parentNode;
+      });
+      
+      console.log('生成的树形数据:', treeData.value);
+    } else {
+      console.error('获取数据失败:', res.msg);
+    }
+  } catch (error) {
+    console.error('请求出错:', error);
+  }
+};
+getTreeData();
+
+const hztableData = ref([])
+const _noderq = ref('')
+const handleNodeClick = async (nodeData) => {
+  if(!nodeData.children){
+    _noderq.value = nodeData.value.split('-')[1]
+    const res = await Productyearlist({khdh:nodeData.value.split('-')[2].split('【')[0],rq:nodeData.value.split('-')[1]})
+    hztableData.value = res.data
+
+  }
+};
+
+const mxtableData = ref([])
+const hztableRowClick =  async (row, event, column) => {
+  console.log('点击了行:', row,);
+  const res = await Productmonthlist({product_code:row.成品编码,year:_noderq.value})
+  mxtableData.value = res.data
+};
+
+
+  
+//汇总导出按钮
+const hzToExcel = async () => { 
+  try {
+    const el = document.getElementById('hztable');
+    //  使用table_to_sheet获取工作表对象
+    const worksheet = XLSX.utils.table_to_sheet(el, { raw: true });
+    //设置从C列开始为数字格式
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    for (let col = 2; col <= range.e.c; col++) { // 从C列(索引2)开始
+      for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
+        if (worksheet[cellAddress]) {
+          // 尝试转换为数字
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 数字类型
+            worksheet[cellAddress].v = numValue; // 更新值
+            // worksheet[cellAddress].z = '0.000'; // 数字格式
+          }
+        }
+      }
+    }
+    
+    // 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+    XLSX.writeFile(workbook, '年度产出率汇总.xlsx');
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败,请重试');
+  }
+};
+  
+//明细导出按钮
+const mxToExcel = async () => { 
+  try {
+    const el = document.getElementById('mxtable');
+    // 使用table_to_sheet获取工作表对象
+    const worksheet = XLSX.utils.table_to_sheet(el, { raw: true });
+    
+    // 指定需要转换为数字的列索引(0-based索引)
+    const numericColumns = [1, 2, 4]; 
+    
+    // 获取工作表范围
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    
+    // 遍历所有指定的列
+    numericColumns.forEach(colIndex => {
+      for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: colIndex });
+        if (worksheet[cellAddress]) {
+          // 尝试转换为数字
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue) && cellValue !== '') {
+            worksheet[cellAddress].t = 'n'; // 数字类型
+            worksheet[cellAddress].v = numValue; // 更新值
+          }
+        }
+      }
+    });
+    
+    // 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+    XLSX.writeFile(workbook, '年度产出率明细.xlsx');
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败,请重试');
+  }
+};
+  
+
+  
+  
+  
+  
+  
+  </script>
+  
+  <style scoped>
+  .form-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .form-column {
+    /*flex: 1;*/
+    margin-right: 15px; /* 调整列之间的间距 */
+  }
+  
+  /* 左侧输入框宽度调整 */
+  .form-column .el-form-item .el-input {
+    width: 150px; /* 调整左侧输入框的宽度 */
+  }
+  
+  :deep(.hui-plan-usage-lows  div) {
+    color: #8c939d !important;
+  }
+  :deep(.lan-plan-usage-lows  div) {
+    color: blue !important;
+    font-weight: bold;
+  }
+  
+
+  /* 媒体查询,根据需要调整断点 */
+  @media screen and (max-width: 768px) {
+    .form-column {
+      flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+      margin-right: 0;
+    }
+  }
+  /*:deep(.el-table td .cell) {*/
+  /*  line-height: 30px !important;*/
+  /*}*/
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    /*width: 300px;*/
+    background-color: #fff;
+    padding: 10px;
+    margin-right: 20px;
+  }
+  .JKWTree-tree h3 {
+    font-size: 15px;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+  .JKWTree-content {
+    flex: 1;
+  }
+
+  
+  /* 选中某行时的背景色 */
+  :deep(.el-table__body tr.current-row) > td {
+    background: #ff80ff !important;
+  }
+  </style>
+  <style scoped>
+  :deep(.el-table td .cell) {
+    line-height: 20px !important;
+  }
+  :deep(.el-tabs__header){
+    margin-bottom: 0;
+  }
+  .search{
+    margin-left: 0px !important;
+    margin-right: 10px !important;
+  }
+  .bt{
+    margin-left: 2px !important;
+    padding: 3px !important;
+    font-size: 12px;
+  }
+  .el-tabs__header{
+    margin: 0px !important;
+  }
+  .gva-table-box{
+    padding: 0px !important;
+  }
+  .mab{
+    margin-bottom: 5px;
+  }
+  </style>
+  

+ 6 - 1
src/view/managements/hardversionlibrary.vue

@@ -49,7 +49,7 @@
                <el-table-column  sortable align="center" label="存货编码" prop="存货编码"  width="120" />
                <el-table-column  sortable align="center" label="物料名称" prop="物料名称"  width="200" />
                <el-table-column   align="center" label="印版名称" prop="印版名称"  width="200" />
-               <el-table-column   align="center" label="供方批号" prop="供方批号"  width="200" />
+               <el-table-column  sortable align="center" label="供方批号" prop="供方批号"  width="200" />
                <el-table-column   align="center" label="制造日期" prop="制造日期"  width="110" />
                <el-table-column   align="center" label="报废日期" prop="报废日期"  width="110" />
                <el-table-column   align="center" label="原始印数" prop="原始印数"  width="110" />
@@ -1008,6 +1008,11 @@ const validateNumberInput = (field) => {
     flex: 1;
   }
 
+  :deep( .el-checkbox.el-checkbox--small .el-checkbox__inner){
+    width: 20px !important;
+    height: 20px !important;
+  }
+
   
   /* 选中某行时的背景色 */
   :deep(.el-table__body tr.current-row) > td {

+ 13 - 13
src/view/performance/12-orderAccounting/index.vue

@@ -743,19 +743,19 @@ const exportExcel = () => {
 
   // 2. 定义需要转换为数字的列(基于原始列字母)
   const originalNumberColumns = {
-    'C': 0,  // 原C列 → 删除A列后变为B列
-    'D': 2,  // 原D列 → 删除A列后变为C列
-    'G': 4,  // 原G列 → 删除A列后变为F列
-    'N': 2,  // 原N列 → 删除A列后变为M列
-    'O': 0,  // 原O列 → 删除A列后变为N列
-    'P': 0,  // 原P列 → 删除A列后变为O列
-    'Q': 0,  // 原Q列 → 删除A列后变为P列
-    'R': 0,  // 原R列 → 删除A列后变为Q列
-    'S': 0,  // 原S列 → 删除A列后变为R列
-    'T': 0,  // 原T列 → 删除A列后变为S列
-    'U': 0,  // 原U列 → 删除A列后变为T列
-    'V': 0,  // 原V列 → 删除A列后变为U列
-    'W': 0   // 原W列 → 删除A列后变为V列
+    'C': 0,  
+    'D': 2,  
+    'G': 4,
+    'N': 2,
+    'O': 0,  
+    'P': 0,  
+    'Q': 0,  
+    'R': 0,  
+    'S': 0,  
+    'T': 0,  
+    'U': 0,  
+    'V': 0,  
+    'W': 0   
   };
 
   // 3. 创建新工作表(左移后的数据)

+ 118 - 16
src/view/v23financial/v23Costmaintenance.vue

@@ -8,10 +8,12 @@
               <el-form-item>
                 <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
                 <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="edit" @click="onout">创建</el-button> -->
+                <el-button type="primary" class="bt" icon="edit" @click="onout">月度费用处理</el-button>-->
+                <el-button type="primary" class="bt" icon="edit" @click="oncbcreate">成本数据创建</el-button> 
+                <!-- <el-button type="primary" class="bt" icon="edit" @click="onsdqcreate">创建</el-button>  -->
                 <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showrgdownTable === false" @click="onartificial">月度人工维护</el-button>
                 <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdqftupTable === false" @click="onsdqft">水电气分摊批量维护</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="mxToExcel" >导出到Excel(明细)</el-button>
                 <!-- <el-button type="primary" class="bt" icon="edit" @click="onforms">能耗报表</el-button> -->
@@ -171,7 +173,7 @@
                <el-table-column  sortable align="center" label="设备编号" prop="设备编号"  width="120" />
                <el-table-column  sortable align="center" label="设备名称" prop="设备名称"  width="120" />
                <el-table-column  sortable align="center" label="通电工时_全部" prop="通电工时_全部"  width="200" />
-               <el-table-column  sortable align="center" label="通电工时_成本" prop="通电工时_成本"  width="200" />
+               <el-table-column  sortable align="center" label="通电工时_成本" prop="通电工时_成本"   width="200" />
                <el-table-column  sortable align="center" label="年月" prop="年月"  width="100" />
                <el-table-column  sortable align="center" label="科目名称" prop="科目名称"  width="100" />
                <el-table-column  sortable align="center" label="使用部门" prop="使用部门"  width="100" />
@@ -246,6 +248,58 @@
                <el-table-column  sortable align="center" label="创建时间" prop="Sys_Rq"  width="110" /> 
               </el-table>
 
+            <!-- 创建成本数据 -->
+
+            <el-dialog v-model="cbcreate"  title="成本数据创建" destroy-on-close style="height: 20%;width: 20%;">
+              <el-form-item label="创建年月份" label-width="100px">
+                <el-date-picker
+                v-model="cbMonth"
+                type="month"
+                placeholder="选择年月"
+                :default-value="new Date()"
+                style="width: 200px;" 
+                />
+                </el-form-item>
+
+
+              <template #footer>
+                <div class="dialog-footer" style="text-align: right;">
+                  <el-button @click="cbcreatecloseDialog">取消</el-button>
+                  <el-button type="primary" @click="cbcreateonDialog">确定</el-button>
+                </div>
+              </template>
+            </el-dialog>
+
+            <!-- 数据处理 -->
+            <el-dialog v-model="sdqcopy"  title="成本月度水电气基础资料复制" destroy-on-close style="height: 30%;width: 20%;">
+              <el-form-item label="参考年月份" label-width="100px">
+                <el-date-picker
+                v-model="formMonth"
+                type="month"
+                placeholder="选择年月"
+                :default-value="new Date()"
+                style="width: 200px;" 
+                />
+                </el-form-item>
+
+                <el-form-item label="创建年份" label-width="100px">
+                <el-date-picker
+                v-model="toMonth"
+                type="month"
+                placeholder="选择年月"
+                :default-value="new Date()"
+                style="width: 200px;" 
+                />
+                </el-form-item>
+
+
+              <template #footer>
+                <div class="dialog-footer" style="text-align: right;">
+                  <el-button @click="sdqcopycloseDialog">取消</el-button>
+                  <el-button type="primary" @click="sdqcopyonDialog">确定</el-button>
+                </div>
+              </template>
+            </el-dialog>
 
               <el-dialog v-model="rgsjlist" title="月度车间人工维护"  style="width: 100%;height: 100%;margin: 0px;padding: 0px">
                 <el-button type="primary" @click="rgsjConfirm":class="{ 'confirm-btn': true, 'is-new': isNewData }">{{ isNewData ? '新增' : '更新' }}</el-button>
@@ -336,6 +390,7 @@
   import { useUserStore } from '@/pinia/modules/user'
   import { exportExcelFile } from '@/utils/excel'
   import * as XLSX from 'xlsx'
+  import dayjs, { Dayjs } from 'dayjs';
   import {GetZzTab,ArtificialAdd,ArtificialAddList,ArtificialEdit,ArtificialList,ArtificialDetailList,shuidianqiList,shuidianqiDetailList,
     shuidianqifentanList,ChromaticityAdd,ChromaticityDetailAdd,ChromaticityDetailList,MonochromaticDetailList,UtilitiesList,UtilitiesAdd,shuidianqiMachineDetailList
   } from '@/api/jixiaoguanli/caiwubaobiao'
@@ -363,7 +418,7 @@ const getDepartmentData = async () => {
           label: `${year}${month}`,
           value: yearMonth,
           children: Object.entries(yearData).map(([category, value]) => ({
-            label: category, // 移除"1、"前缀
+            label: category,
             value: `${yearMonth}-${category}`,
             children: Array.isArray(value) 
               ? value.map(item => ({
@@ -551,6 +606,33 @@ const sdsuptableRowClick = async (row) => {
   }
 }
 
+const cbcreate = ref(false)
+const cbMonth = ref('')
+
+const oncbcreate = () => {
+  cbcreate.value = true
+}
+
+ const cbcreateonDialog =  async () => {
+  cbMonth.value = dayjs(cbMonth.value).format('YYYYMM');
+  console.log(cbMonth.value)
+  const res = await ChromaticityAdd({month:cbMonth.value,sys_id:userStore.userInfo.nickName});
+  if(res.code === 0){
+    ElMessage({type: 'success',message: '创建成功'});
+  }else{
+    ElMessage({type: 'error',message: '创建失败'});
+  }
+
+  cbcreatecloseDialog()
+}
+
+const cbcreatecloseDialog = () => {
+  cbcreate.value = false
+  cbMonth.value = ''
+}
+
+
+
 const isNewData = ref(false);//新增or修改
 const rgsjlist = ref(false)
 const rgsjtableData = ref([]);
@@ -635,7 +717,7 @@ const handleUpdateData = async () => {
   const formattedData = rawValueArray.map(item => {
     return {
       UniqID: item.UniqID,
-      number: item.一线工资总额 !== null ? item.一线工资总额 : "",
+      number: item.一线工资总额 !== undefined ? item.一线工资总额 : "",
     }
   });
   console.log(formattedData)
@@ -652,12 +734,16 @@ const handleUpdateData = async () => {
 //月度人工数据【退出】
 const rgsjCancel = () => {
   rgsjlist.value = false;
+  rgsjtableData.value = [];
 };
 
 
 //水电气分摊
 
 const sdqftlist = ref(false)
+const sdqcopy = ref(false)
+const formMonth = ref('')
+const toMonth = ref('')
 const sdqfttableData = ref([]);
 const sdqft_tableColumns = ref(
     [
@@ -673,10 +759,22 @@ const sdqft_tableColumns = ref(
 const SDQFT_WORKSHOPS = ['胶印车间', '凹丝印车间', '印后车间', '检验车间','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心','制造中心'];
 const SDQFT_kmmc = ['待分摊总额','待分摊总额','待分摊总额','待分摊总额','废气处理(RTO)','锅炉','空压机A','空压机B','热水锅炉','真空鼓风机A','真空鼓风机B','中央空调A(6号楼)','中央空调B(5号楼)'];
 
+
+const onsdqcreate = () => {
+  sdqcopy.value = true
+}
+
 const onsdqft = () => {
   sdqftlist.value = true
 }
 
+const sdqcopyonDialog = () => {
+  formMonth.value = dayjs(formMonth.value).format('YYYYMM');
+  toMonth.value = dayjs(toMonth.value).format('YYYYMM');
+
+}
+
+
 const sdqftgetProductValue = () => {
   if(_noderq.value === ''){
     sdqfttableData.value = [];
@@ -685,12 +783,13 @@ const sdqftgetProductValue = () => {
   }
   UtilitiesListdata();
 };
-//月度人工数据->数据获取
+//水电气分摊->数据获取
 const UtilitiesListdata = async ()=>{
   let Sys_ny = _noderq.value;
   try {
     const UtilitiesListdata = await UtilitiesList({month:Sys_ny});
-    if(UtilitiesListdata.data.length === 0){
+    console.log(UtilitiesListdata.data[0])
+    if(UtilitiesListdata.data.耗电量 === undefined){
       sdqfttableData.value = SDQFT_WORKSHOPS.map(workshop => ({
       年月: _noderq.value,
       部门名称: workshop,
@@ -698,7 +797,7 @@ const UtilitiesListdata = async ()=>{
       耗电量: '',
       单位电价: 0.690,
       耗气量: '',
-      单位气价: ''
+      单位气价: 3.037
 }));
     }else{
       sdqfttableData.value = UtilitiesListdata.data;
@@ -709,7 +808,8 @@ const UtilitiesListdata = async ()=>{
   }
 } 
 
-//月度人工数据【更新】
+//水电气分摊【更新】
+
 const sdqftConfirm = async () => {
     await sdqft_handleUpdateData(); // 新增数据逻辑
 };
@@ -720,12 +820,12 @@ const sdqft_handleUpdateData = async () => {
     return {
       sys_ny: _noderq.value,
       sys_id: userStore.userInfo.nickName,
-      sist: item.部门名称 !== null ? item.部门名称 : "",
-      耗电量: item.耗电量 !== null ? item.耗电量 : "",
-      科目名称: item.科目名称 !== null ? item.科目名称 : "",
-      单位电价: item.单位电价 !== null ? item.单位电价 : "",
-      耗气量: item.耗气量 !== null ? item.耗气量 : "",
-      单位气价: item.单位气价 !== null ? item.单位气价 : "",
+      sist: item.部门名称 !== undefined ? item.部门名称 : "",
+      耗电量: item.耗电量 !== undefined ? item.耗电量 : "",
+      科目名称: item.科目名称 !== undefined ? item.科目名称 : "",
+      单位电价: item.单位电价 !== undefined ? item.单位电价 : "",
+      耗气量: item.耗气量 !== undefined ? item.耗气量 : "",
+      单位气价: item.单位气价 !== undefined ? item.单位气价 : "",
 
     }
   });
@@ -785,9 +885,11 @@ const sdqft_handleUpdateData = async () => {
 
 
 
-//水电气分【退出】
+//水电气分【退出】
 const sdqftCancel = () => {
   sdqftlist.value = false;
+  sdqfttableData.value = [];
+
 };
 
 

+ 7 - 2
src/view/yunyin/shengchanguanli/PrintingPlateRequisition.vue

@@ -271,7 +271,7 @@ import { placeholderSign } from 'element-plus/es/components/table-v2/src/private
   // 分页
 const page = ref(1)
 const total = ref(0)
-const pageSize = ref(50)
+const pageSize = ref(20)
 const handleCurrentChange = (val) => {
   page.value = val;
   _WorkList_page();
@@ -361,13 +361,17 @@ const transformData = (data) => {
 
   const searchInfo = ref('')
   const on_search = async () => {
-    const res = await getPPList({code:'',search:searchInfo.value,page:page.value,limit:pageSize.value,key:'1'})
+    if (searchInfo.value != ''){
+      const res = await getPPList({code:'',search:searchInfo.value,page:page.value,limit:pageSize.value,key:'1'})
     if (res.code === 0) {
       total.value = res.data.total
       wltableData.value = res.data.data 
     }else{
       ElMessage.error('未搜索到数据') 
     }
+    }
+
+    
   }
 
   const wlmxtableData = ref([])
@@ -487,6 +491,7 @@ const rawenterDialog = async () => {
       ElMessage.success('收回成功')
       data_refresh()
       rawcloseDialog()
+      on_search()
       // 清空选中
       selectedIds.value = []
     } else {