zck 10 months ago
parent
commit
7374d767a6

+ 201 - 5
src/view/equipment/powerconsumption.vue

@@ -1,8 +1,204 @@
 <template>
-</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="190" 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: 33vh" 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"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="设备编号" prop="设备编号"  width="120" />
+               <el-table-column  sortable align="center" label="设备名称" prop="设备名称"  width="120" />
+               <el-table-column   align="center" label="上月末主电表读数" prop="上月末主电表读数"  width="200" />
+               <el-table-column   align="center" label="本月末主电表读数" prop="本月末主电表读数"  width="200" />
+               <el-table-column   align="center" label="主电表耗电量" prop="主电表耗电量"  width="110" />
+               <el-table-column   align="center" label="上月末辅电表读数" prop="上月末辅电表读数"  width="200" />
+               <el-table-column   align="center" label="本月末本电表读数" prop="本月末本电表读数"  width="200" />
+               <el-table-column   align="center" label="辅电表耗电量" prop="辅电表耗电量"  width="110" />
+              </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>
+            </div>
 
-<script>
-</script>
 
-<style>
-</style>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 45vh" 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"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <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="100" />
+              </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>
+            </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";
+  defineOptions({name: 'Company'})
+  // =========== 获取左侧树侧形结构 ===========
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+  
+  
+  
+  
+  </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>
+  

+ 186 - 5
src/view/managements/anodizedaluminum.vue

@@ -1,8 +1,189 @@
 <template>
-</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-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>生产进程查询</h3>
+              <el-tree :data="treeData"  :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: 75vh" 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"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="工单编号" prop="工单编号"  width="120" />
+               <el-table-column  sortable align="center" label="领用日期" prop="领用日期"  width="130" />
+               <el-table-column   align="center" label="卷宽" prop="卷宽"  width="60" />
+               <el-table-column   align="center" label="卷长" prop="卷长"  width="70" />
+               <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="110" />
+               <el-table-column   align="center" label="供方批次" prop="供方批次"  width="110" />
+               <el-table-column   align="center" label="物料代码" prop="物料代码"  width="140" />
+               <el-table-column   align="center" label="物料名称" prop="物料名称"  width="200" />
+               <el-table-column   align="center" label="备注" prop="备注"  width="110" />
+               <el-table-column   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   align="center" label="创建时间" prop="创建时间"  width="200" />
+              </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>
+            </div>
 
-<script>
-</script>
 
-<style>
-</style>
+
+  
+          </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";
+  defineOptions({name: 'Company'})
+  // =========== 获取左侧树侧形结构 ===========
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+  
+  
+  
+  
+  </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>
+  

+ 210 - 5
src/view/managements/hardversionlibrary.vue

@@ -1,8 +1,213 @@
 <template>
-</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="search" @click="on_search">查询</el-button>
+                <el-button type="primary" class="bt" icon="edit" @click="on_add">添加</el-button>
+                <el-button type="primary" class="bt" icon="delete" @click="on_delete">删除</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="ToExcel" >导出到Excel</el-button>
+              </el-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>印版库管理</h3>
+              <el-tree :data="treeData"  :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: 33vh" 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"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="存货编码" prop="存货编码"  width="120" />
+               <el-table-column  sortable align="center" label="物料名称" prop="物料名称"  width="120" />
+               <el-table-column   align="center" label="印版名称" prop="印版名称"  width="200" />
+               <el-table-column   align="center" label="供方批号" prop="供方批号"  width="200" />
+               <el-table-column   align="center" label="制造日期" prop="制造日期"  width="110" />
+               <el-table-column   align="center" label="报废日期" prop="报废日期"  width="200" />
+               <el-table-column   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" />
+               <el-table-column   align="center" label="创建时间" prop="创建时间"  width="110" />
+               <el-table-column   align="center" label="修改时间" prop="修改时间"  width="110" />
+              </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>
+            </div>
 
-<script>
-</script>
 
-<style>
-</style>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 45vh" 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"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <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="100" />
+               <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" />
+              </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>
+            </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";
+  defineOptions({name: 'Company'})
+  // =========== 获取左侧树侧形结构 ===========
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+  
+  
+  
+  
+  </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>
+  

+ 110 - 17
src/view/performance/12-orderAccounting/index.vue

@@ -246,7 +246,7 @@
             <el-table
               style="width: 100%; height: 33vh"
               :data="tableData1"
-              row-key="ID"
+              row-key="ID" id="cjstable"
               highlight-current-row
               border
               :row-class-name="rowClassName"
@@ -729,24 +729,95 @@ const pd_lcd_handleNodeClick = async(node) => {
   console.log(getOrderProcessRight_list)
   processList.value = getOrderProcessRight_list.data
 }
-// 导出excel
+
 const exportExcel = () => {
-  const labels = tableCols1.map((item) => item.label)
-  const props = tableCols1.map((item) => item.prop)
-
-  const data = tableData1.value.map((item) => {
-    const row = {}
-    props.forEach((prop, index) => {
-      row[labels[index]] = item?.[prop]
-    })
-    return row
-  })
-  if (data[0]?.[labels[0]] === undefined) {
-    return
-  }
-  exportExcelFile(data)
-}
+  const el = document.getElementById('cjstable');
+  const filename = '超节损导出.xlsx';
+  
+  // 1. 获取原始表格数据
+  const wb = XLSX.utils.table_to_book(el, { raw: true });
+  const ws = wb.Sheets[wb.SheetNames[0]];
+
+  // 2. 定义需要转换为数字的列(基于原始列字母)
+  const originalNumberColumns = {
+    'C': 0,  // 原C列 → 删除A列后变为B列
+    'D': 2,  // 原D列 → 删除A列后变为C列
+    'G': 4,  // 原G列 → 删除A列后变为F列
+    'J': 0,  // 原J列 → 删除A列后变为I列
+    'M': 0,  // 原M列 → 删除A列后变为L列
+    '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列
+  };
+
+  // 3. 创建新工作表(左移后的数据)
+  const newWs = {};
+  const range = XLSX.utils.decode_range(ws['!ref']);
+
+  // 调整列范围(删除A列)
+  range.s.c = 0;  // 从A列开始(原B列)
+  range.e.c -= 1; // 结束列减1
+  newWs['!ref'] = XLSX.utils.encode_range(range);
+
+  // 复制其他工作表属性(排除A列)
+  if (ws['!cols']) newWs['!cols'] = ws['!cols'].slice(1);
+  if (ws['!rows']) newWs['!rows'] = ws['!rows'];
+  if (ws['!merges']) newWs['!merges'] = ws['!merges'];
+
+  // 4. 左移所有列数据(A列→删除,B列→A列,C列→B列...)
+  Object.keys(ws).forEach(address => {
+    if (!address.startsWith('!')) {
+      const col = address.charAt(0);
+      const row = address.slice(1);
+
+      if (col !== 'A') { // 跳过A列
+        // 计算新列字母(左移一列)
+        const newCol = String.fromCharCode(col.charCodeAt(0) - 1);
+        const newAddress = newCol + row;
+        
+        // 复制单元格数据
+        newWs[newAddress] = { ...ws[address] };
+      }
+    }
+  });
+
+  // 5. 转换数字格式(基于左移后的列字母)
+  Object.keys(newWs).forEach(address => {
+    const col = address.charAt(0);
+    const originalCol = String.fromCharCode(col.charCodeAt(0));
+
+    if (originalNumberColumns[originalCol] !== undefined) {
+      const cell = newWs[address];
+      const num = parseFloat(cell.v);
+      
+      if (!isNaN(num)) {
+        cell.t = 'n';
+        cell.v = num;
+        cell.z = originalNumberColumns[originalCol] === 0 
+          ? '0' 
+          : `0.${'0'.repeat(originalNumberColumns[originalCol])}`;
+      }
+    }
+  });
 
+  // 6. 更新工作簿并导出
+  wb.Sheets[wb.SheetNames[0]] = newWs;
+  const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
+
+  try {
+    FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
+  } catch (e) {
+    console.error('导出失败:', e);
+  }
+  return wbout;
+};
 
 //选择月份后显示表格数据
 const cjsjetableData = reactive([]);
@@ -798,6 +869,28 @@ const exportToExcel = ()=>{
   // 文件名
   const filename = `员工超节损金额_${formattedDate}.xlsx`;
   const wb = XLSX.utils.table_to_book(el, { raw: true });
+
+
+  // 获取第一个工作表
+  const ws = wb.Sheets[wb.SheetNames[0]];
+  
+  // 遍历单元格,设置数字格式(设置从Excel列转化数字格式)
+  Object.keys(ws).forEach(address => {
+    if(!address.startsWith('!')) { // 跳过非单元格数据
+      if(address.startsWith('D')) {
+        const cell = ws[address];
+        // 尝试转换为数字
+        const num = parseFloat(cell.v);
+        if(!isNaN(num)) {
+          cell.t = 'n'; // 设置为数字类型
+          cell.v = num; // 更新值
+          cell.z = '0.00'; // 设置数字格式(可选)
+        }
+      }
+    }
+  });
+
+
   const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
   try {
     FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);

+ 5 - 3
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -4448,9 +4448,9 @@ const delgdzl_onclick = async () => {
     try {
       console.log(_Gd_gdbh.value)
       console.log(gdSelection.value)
-      const res1 = await WorkOrderDel({UniqId: gdSelection.value,sys_id: userInfo.nickName})
+      const res1 = await WorkOrderDel({UniqId: gdSelection.value,sys_id: userStore.userInfo.nickName})
       if(res1.code === 0){
-        ElMessage.success('印件资料删除成功')
+        ElMessage.success('工单删除成功')
 
         console.log(_Gd_khdh.value)
         const WorkListdata = await WorkList({Gd_khdh:_Gd_khdh.value,limit:pageSize.value,page:page.value});
@@ -4471,6 +4471,8 @@ const delgdzl_onclick = async () => {
 
 // ===========删除印件资料、工艺资料 ===========
 const delgd_delclick = async () => {
+  console.log(yjSelection.value)
+  console.log(gySelection.value)
   if (yjSelection.value !== '') {
     try {
       const res1 = await PrintDetailDel({UniqId: yjSelection.value})
@@ -4481,7 +4483,7 @@ const delgd_delclick = async () => {
   }
   if (gySelection.value !== ''){
     try {
-      const res2 = await ProcessDetailDel({UniqId: gySelection.value,sys_id: userInfo.nickName})
+      const res2 = await ProcessDetailDel({UniqId: gySelection.value,sys_id: userStore.userInfo.nickName})
       res2.code === 0 && ElMessage.success('工艺资料删除成功')
     } catch(err) {
       ElMessage.error(err)