Browse Source

超节损

tty 1 year ago
parent
commit
7747025e49

+ 2 - 1
index.html

@@ -7,6 +7,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <meta content="vue-admin首页" name="keywords" />
     <link rel="icon" href="favicon.ico">
+    <link rel="stylesheet" type="text/css" media="print" href="https://cdn.jsdelivr.net/npm/vue-plugin-hiprint@latest/dist/print-lock.css">
     <title></title>
 </head>
 
@@ -15,4 +16,4 @@
     <script type="module" src="./src/main.js"></script>
 </body>
 
-</html>
+</html>

+ 1 - 0
package.json

@@ -34,6 +34,7 @@
         "vue": "^3.3.4",
         "vue-contextmenu": "^1.5.11",
         "vue-echarts": "^6.6.8",
+        "vue-plugin-hiprint": "^0.0.56",
         "vue-router": "^4.2.4"
     },
     "devDependencies": {

+ 9 - 0
src/api/mes_api_gty/otherDocuments.js

@@ -46,3 +46,12 @@ export const updateData = (data) => {
     data
   })
 }
+
+// 新增
+export const addData = (data) => {
+  return service({
+    url: '/mes_serve/other_count_document/add',
+    method: 'post',
+    data
+  })
+}

+ 1 - 0
src/view/performance/09-workOrderVerification/index.vue

@@ -411,6 +411,7 @@
           <!-- 测试图表 -->
           <el-dialog
             title="【01.24 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】"
+            destroy-on-close
             fullscreen
           >
             <Shebeizhuangtai />

+ 16 - 0
src/view/performance/09-workOrderVerification/shebeizhuangtai.vue

@@ -104,6 +104,22 @@
   </div>
 
 </template>
+<script>
+export default {
+  name: 'Shebeizhuangtai',
+}
+
+// 机台数据详情
+import service from '@/utils/request'
+export const getMachineDetail = (params) => {
+  return service({
+    url: '/mes_server/facility/MachineDetail',
+    method: 'get',
+    params
+  })
+}
+
+</script>
 
 <script setup>
 import { use } from 'echarts/core'

+ 91 - 40
src/view/performance/12-orderAccounting/index.bak.vue → src/view/performance/12-orderAccounting/bak.vue

@@ -1,56 +1,108 @@
 <template>
   <div>
-    <layout>
-      <layout-header>
-        <div class="">
-          <!--按钮部分-->
-          <el-form
-            ref="elSearchFormRef"
-            :inline="true"
-            class="demo-form-inline"
-            :rules="searchRule"
-            @keyup.enter="onSubmit"
-          >
-            <el-form-item>
-              <el-input
-                v-model="searchInfo"
-                placeholder="搜索产品编号或产品名称"
-                clearable
-                style="width: 180px;"
-              />
+    <el-container>
+      <!-- 左侧树形结构 -->
+      <el-scrollbar max-height="80vh">
+        <el-aside width="280px">
+          <div class="JKWTree-tree">
+            <h3>工单超节损核算</h3>
+            <el-tree
+              :data="treeData"
+              highlight-current
+              @node-click="handleNodeClick"
+            />
+          </div>
+        </el-aside>
+      </el-scrollbar>
+
+      <el-container>
+        <el-main>
+          <div class="gva-table-box">
+            <!-- 按钮区域 -->
+            <div class="gva-btn-list">
+              <el-row :span="6">
+                <el-input
+                  v-model="searchInfo"
+                  placeholder="输入工单编号或产品名称"
+                />
+              </el-row>
               <el-button
                 type="primary"
                 :icon="Search"
-                class="bt"
                 @click="onSearch"
               >定位</el-button>
 
               <el-button
                 type="primary"
                 :icon="Download"
-                class="bt"
                 style="margin-left: auto;"
                 @click="exportExcel"
               >导出到Excel</el-button>
-            </el-form-item>
-          </el-form>
-        </div>
+            </div>
+            <!-- 数据展示 -->
+            <el-table
+              style="width: 100%;height:30vh;"
+              :data="tableData"
+              row-key="ID"
+              highlight-current-row
+              border
+              :row-style="{ height: '20px' }"
+              :cell-style="{ padding: '0px' }"
+              :header-row-style="{ height: '20px' }"
+              :header-cell-style="{ padding: '0px' }"
+              @selection-change="handleSelectionChange"
+              @row-dblclick="doubleClick"
+            >
+              <el-table-column
+                type="selection"
+                width="55"
+              />
+              <!-- 使用 v-for 循环渲染每一列 -->
+              <el-table-column
+                v-for="column in tableCols"
+                :key="column.prop"
+                :prop="column.prop"
+                :label="column.label"
+                :width="column.width"
+                show-overflow-tooltip="true"
+              />
 
-      </layout-header>
+            </el-table>
+            <br>
+            <el-table
+              style="width: 100%;height: 40vh;"
+              row-key="ID"
+              highlight-current-row
+              border
+              :row-style="{ height: '20px' }"
+              :cell-style="{ padding: '0px' }"
+              :header-row-style="{ height: '20px' }"
+              :header-cell-style="{ padding: '0px' }"
+              @selection-change="handleSelectionChange"
+              @row-dblclick="doubleClick"
+            >
+              <el-table-column
+                type="selection"
+                width="55"
+              />
+              <!-- 使用 v-for 循环渲染每一列 -->
+              <el-table-column
+                v-for="column in tableCols"
+                :key="column.prop"
+                :prop="column.prop"
+                :label="column.label"
+                :width="column.width"
+                show-overflow-tooltip="true"
+              />
 
-      <layout>
-        <!--    左侧树侧形结构-->
-        <layout-sider
-          :resize-directions="['right']"
-          :width="190"
-          style="margin-right: 10px;"
-        />
+            </el-table>
+          </div>
+          <!-- 弹出框 -->
 
-        <!--  右侧内容区域 -->
-        <layout-content />
+        </el-main>
+      </el-container>
+    </el-container>
 
-      </layout>
-    </layout>
   </div>
 </template>
 
@@ -61,10 +113,9 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted } from 'vue'
 import { getSide, getTable } from '@/api/mes_api_gty/orderAccounting'
-import { Layout, LayoutSider, LayoutContent, LayoutHeader } from '@arco-design/web-vue'
 
 defineOptions({
-  name: '12orDerAccounting'
+  name: '12orderAccounting'
 })
 
 // 侧边栏数据
@@ -224,9 +275,9 @@ const onDelete = async() => {
     return
   }
   multipleSelection.value &&
-  multipleSelection.value.map(item => {
-    ids.push(item.ID)
-  })
+    multipleSelection.value.map(item => {
+      ids.push(item.ID)
+    })
   const res = await deleteCompanyByIds({ ids })
   if (res.code === 0) {
     ElMessage({

+ 810 - 0
src/view/performance/12-orderAccounting/gdcjstj.vue

@@ -0,0 +1,810 @@
+<template>
+  <div>
+    <el-button
+      @click="handlePrint"
+    >打印测试
+    </el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'Gdcjstj',
+}
+// 2工单超节损统计(按工序)
+import service from '@/utils/request'
+const getOrderSuperLossCount = (params) => {
+  return service({
+    url: '/mes_server/order_super_loss/getOrderSuperLossCount',
+    method: 'get',
+    params
+  })
+}
+
+</script>
+
+<script setup>
+import { watch, ref, reactive, defineProps, defineEmits } from 'vue'
+
+import { hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
+
+const jsonData = {
+  'panels': [{
+    'index': 0,
+    'name': 1,
+    'paperType': 'A4',
+    'height': 210,
+    'width': 297,
+    'paperHeader': 108,
+    'paperFooter': 551.5151515151515,
+    'printElements': [{
+      'options': {
+        'left': 267.5,
+        'top': 17.5,
+        'height': 22,
+        'width': 294,
+        'title': '工单工序各班组超节损统计表',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textAlign': 'center',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'right': 560.5625381469727,
+        'bottom': 39.8125,
+        'vCenter': 413.56253814697266,
+        'hCenter': 28.8125,
+        'fontWeight': 600,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 157.5,
+        'top': 50,
+        'height': 14,
+        'width': 129,
+        'title': '成品代号',
+        'field': 'cpdh',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'gdbh_1',
+        'right': 285.562557220459,
+        'bottom': 63.99998092651367,
+        'vCenter': 221.06255722045898,
+        'hCenter': 56.99998092651367,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 17.5,
+        'top': 50,
+        'height': 14,
+        'width': 129,
+        'title': '工单编号',
+        'field': 'gdbh',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 305,
+        'top': 50,
+        'height': 14,
+        'width': 507,
+        'title': '成品名称',
+        'field': 'cpmc',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'cpdh_1',
+        'right': 442.125057220459,
+        'bottom': 63.99998092651367,
+        'vCenter': 377.625057220459,
+        'hCenter': 56.99998092651367,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 15,
+        'top': 67.5,
+        'height': 42,
+        'width': 811.5,
+        'right': 824,
+        'bottom': 106.16669209798177,
+        'vCenter': 418.25,
+        'hCenter': 85.16669209798177,
+        'coordinateSync': false,
+        'widthHeightSync': false,
+      }, 'printElementType': { 'title': '矩形', 'type': 'rect' },
+    }, {
+      'options': {
+        'left': 207.5,
+        'top': 70,
+        'height': 14,
+        'width': 150,
+        'title': '订单数量',
+        'field': 'ddsl',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'xsddh_1',
+        'right': 365.8750190734863,
+        'bottom': 88.68750476837158,
+        'vCenter': 286.3750190734863,
+        'hCenter': 81.68750476837158,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 357.5,
+        'top': 70,
+        'height': 14,
+        'width': 160,
+        'title': '实际投料',
+        'field': 'sjtl',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'ddsl_1',
+        'right': 493.3333079020182,
+        'bottom': 88.16669209798177,
+        'vCenter': 425.8333079020182,
+        'hCenter': 81.16669209798177,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 520,
+        'top': 70,
+        'height': 14,
+        'width': 135,
+        'title': '入仓日期',
+        'field': 'rcrq',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'sstl_1',
+        'right': 654.1666412353516,
+        'bottom': 89.0000254313151,
+        'vCenter': 586.6666412353516,
+        'hCenter': 82.0000254313151,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 22.5,
+        'top': 70,
+        'height': 14,
+        'width': 172.5,
+        'title': '销售订单号',
+        'field': 'xsddh',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'gdbh_1',
+        'right': 195.0000254313151,
+        'bottom': 89.0000254313151,
+        'vCenter': 108.75002543131511,
+        'hCenter': 82.0000254313151,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 657.5,
+        'top': 70,
+        'height': 14,
+        'width': 135,
+        'title': '入仓合计',
+        'field': 'rchj',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'rcrq_1',
+        'right': 797.4999745686848,
+        'bottom': 87.33335876464844,
+        'vCenter': 729.9999745686848,
+        'hCenter': 80.33335876464844,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 15,
+        'top': 87.5,
+        'height': 9,
+        'width': 810,
+        'right': 106.66666666666667,
+        'bottom': 95.66669209798178,
+        'vCenter': 61.66666666666667,
+        'hCenter': 91.16669209798178,
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'borderWidth': 0.75,
+      }, 'printElementType': { 'title': '横线', 'type': 'hline' },
+    }, {
+      'options': {
+        'left': 300,
+        'top': 90,
+        'height': 14,
+        'width': 100,
+        'title': '制程废',
+        'field': 'zcf',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'ltcl_1',
+        'right': 439.5454476096413,
+        'bottom': 101.5000069358132,
+        'vCenter': 387.0454476096413,
+        'hCenter': 94.5000069358132,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 400,
+        'top': 90,
+        'height': 14,
+        'width': 100,
+        'title': '质检废',
+        'field': 'zjf',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'zcf_1',
+        'right': 504.5454614812677,
+        'bottom': 98.54545454545455,
+        'vCenter': 454.5454614812677,
+        'hCenter': 91.54545454545455,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 202.5,
+        'top': 90,
+        'height': 14,
+        'width': 100,
+        'title': '零头处理',
+        'field': 'ltcl',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'wff_1',
+        'right': 341.81818875399495,
+        'bottom': 101.5000069358132,
+        'vCenter': 289.31818875399495,
+        'hCenter': 94.5000069358132,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 500,
+        'top': 90,
+        'height': 14,
+        'width': 100,
+        'title': '无形损',
+        'field': 'wxs',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'zjf_1',
+        'right': 602.500021457672,
+        'bottom': 100.87499999999999,
+        'vCenter': 552.500021457672,
+        'hCenter': 93.87499999999999,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 117.5,
+        'top': 90,
+        'height': 14,
+        'width': 90,
+        'title': '外发废',
+        'field': 'wff',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'clf_1',
+        'right': 224.99999306418678,
+        'bottom': 100.81818875399503,
+        'vCenter': 177.49999306418678,
+        'hCenter': 93.81818875399503,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 597.5,
+        'top': 90,
+        'height': 14,
+        'width': 114,
+        'title': '目标合格率',
+        'field': 'mbhgl',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'wxs_1',
+        'right': 728.375021457672,
+        'bottom': 102.12499999999997,
+        'vCenter': 671.375021457672,
+        'hCenter': 95.12499999999997,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 22.5,
+        'top': 90,
+        'height': 14,
+        'width': 95,
+        'title': '材料废',
+        'field': 'clf',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'xsddh_1',
+        'right': 150.25001907348633,
+        'bottom': 85.25001430511475,
+        'vCenter': 85.75001907348633,
+        'hCenter': 78.25001430511475,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 712.5,
+        'top': 90,
+        'height': 14,
+        'width': 114,
+        'title': '实际合格率',
+        'field': 'sjhgl',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'color': '#000000',
+        'textContentVerticalAlign': 'middle',
+        'textContentWrap': 'ellipsis',
+        'qrCodeLevel': 0,
+        'qid': 'mbhgl_1',
+        'right': 820.875021457672,
+        'bottom': 128.37499999999994,
+        'vCenter': 763.875021457672,
+        'hCenter': 121.37499999999996,
+      }, 'printElementType': { 'title': '这是更新后的元素', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 15,
+        'top': 108.5,
+        'height': 442.5,
+        'width': 811.5,
+        'right': 813.6666666666666,
+        'bottom': 153.5000254313151,
+        'vCenter': 413.9166666666667,
+        'hCenter': 135.5000254313151,
+        'field': 'table',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 10.5,
+        'tableHeaderRowHeight': 30,
+        'tableFooterRepeat': 'last',
+        'tableHeaderRepeat': 'page',
+        'columns': [[{
+          'width': 109.58270193697071,
+          'title': '印件及工序名称\n',
+          'titleSync': false,
+          'field': 'gxmc',
+          'checked': true,
+          'columnId': 'gxmc',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummaryText': '合计',
+          'tableSummary': '',
+          'tableSummaryAlign': 'right',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序计划产量',
+          'titleSync': false,
+          'field': 'jhcl',
+          'checked': true,
+          'columnId': 'jhcl',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummary': '',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序计划损耗',
+          'titleSync': false,
+          'field': 'jhsh',
+          'checked': true,
+          'columnId': 'jhsh',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummaryColspan': '0',
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '制程废',
+          'titleSync': false,
+          'field': 'zcf',
+          'checked': true,
+          'columnId': 'zcf',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '质检废',
+          'titleSync': false,
+          'field': 'zjf',
+          'checked': true,
+          'columnId': 'zjf',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '无形损',
+          'titleSync': false,
+          'field': 'wxs',
+          'checked': true,
+          'columnId': 'wxs',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '报废合计',
+          'titleSync': false,
+          'field': 'bfhj',
+          'checked': true,
+          'columnId': 'bfhj',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序节损数',
+          'titleSync': false,
+          'field': 'jss',
+          'checked': true,
+          'columnId': 'jss',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '0',
+        }, {
+          'width': 53.99363831254071,
+          'title': '占投料报废率',
+          'titleSync': false,
+          'field': 'tlbfl',
+          'checked': true,
+          'columnId': 'tlbfl',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummary': '',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序目标报废率',
+          'titleSync': false,
+          'field': 'mbbfl',
+          'checked': true,
+          'columnId': 'mbbfl',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummary': '',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序实际报废率',
+          'titleSync': false,
+          'field': 'sjbfl',
+          'checked': true,
+          'columnId': 'sjbfl',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummary': '',
+        }, {
+          'width': 53.99363831254071,
+          'title': '超节损承担比例',
+          'titleSync': false,
+          'field': 'cdbl',
+          'checked': true,
+          'columnId': 'cdbl',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': true,
+          'tableSummary': '',
+        }, {
+          'width': 53.99363831254071,
+          'title': '工序超节损金额',
+          'titleSync': false,
+          'field': 'cjsje',
+          'checked': true,
+          'columnId': 'cjsje',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          'tableQRCodeLevel': 0,
+          'tableSummaryTitle': false,
+          'tableSummary': 'sum',
+          'tableSummaryAlign': 'right',
+          'tableSummaryNumFormat': '1',
+        }, {
+          'width': 53.99363831254071,
+          'title': '主管确认',
+          'titleSync': false,
+          'field': 'zgqr',
+          'checked': true,
+          'columnId': 'zgqr',
+          'fixed': false,
+          'rowspan': 1,
+          'colspan': 1,
+          'align': 'right',
+          'halign': 'center',
+          '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,
+      },
+    }, {
+      'options': {
+        'left': 301.5,
+        'top': 562.5,
+        'height': 19.5,
+        'width': 120,
+        'title': '复核:',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'qrCodeLevel': 0,
+        'right': 292.5,
+        'bottom': 583.5000171661377,
+        'vCenter': 232.5,
+        'hCenter': 573.7500171661377,
+      }, 'printElementType': { 'title': '文本', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 18,
+        'top': 562.5,
+        'height': 19.5,
+        'width': 120,
+        'title': '会签:',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'qrCodeLevel': 0,
+        'right': 132,
+        'bottom': 582.0000171661377,
+        'vCenter': 72,
+        'hCenter': 572.2500171661377,
+      }, 'printElementType': { 'title': '文本', 'type': 'text' },
+    }, {
+      'options': {
+        'left': 643.5,
+        'top': 564,
+        'height': 19.5,
+        'width': 120,
+        'title': '审批:',
+        'coordinateSync': false,
+        'widthHeightSync': false,
+        'fontSize': 12,
+        'qrCodeLevel': 0,
+        'right': 190.5,
+        'bottom': 504.0000171661377,
+        'vCenter': 130.5,
+        'hCenter': 494.2500171661377,
+      }, 'printElementType': { 'title': '文本', 'type': 'text' },
+    }],
+    'paperNumberLeft': 816,
+    'paperNumberTop': 555,
+    'paperNumberContinue': true,
+    'backgroundColor': '#ffffff',
+    'orient': 2,
+    'overPrintOptions': { 'content': '', 'opacity': 0.7, 'type': 1 },
+    'watermarkOptions': {
+      'content': '',
+      'rotate': 25,
+      'timestamp': true,
+      'format': 'YYYY-MM-DD HH:mm',
+      'fillStyle': 'rgba(184, 184, 184, 0.3)',
+      'fontSize': '14px',
+      'width': 200,
+      'height': 200,
+    },
+  }],
+}
+const props = defineProps(['gdbh'])
+console.log(props)
+watch(props, (value, oldValue, onCleanup) => {
+  console.log(value)
+})
+
+// 引入后使用示例
+hiprint.init()
+// 下列方法都是没有拖拽设计页面的, 相当于代码模式, 使用代码设计页面
+// 想要实现拖拽设计页面,请往下看 '自定义设计'
+const hiprintTemplate = new hiprint.PrintTemplate({ template: jsonData })
+
+const handlePrint = async() => {
+  const params = {
+    order: '2310720',
+    type: '1',
+  }
+  const res = await getOrderSuperLossCount(params)
+  if (res['code'] === 0) {
+    console.log(res['data'])
+    const { data } = res
+    const tableData = {
+      'gdbh': data['Gd_gdbh'],
+      'cpdh': data['成品代号'],
+      'cpmc': data['成品名称'],
+      'xsddh': data['销售订单号'],
+      'ddsl': data['订单数量'],
+      'sjtl': data['实际投料'],
+      'rcrq': data['warehousing_date'],
+      'rchj': data['warehousing_num'],
+      'clf': data['material_waste'],
+      'wff': data['waste_out'],
+      'ltcl': data['minor_processing'],
+      'zcf': data['zcfp'],
+      'zjf': data['waste_quality'],
+      'wxs': data['intangible_loss'],
+      'mbhgl': data['target_rate'],
+      'sjhgl': data['real_rate'],
+      'table': data['gy_data'].map(item => ({
+        'gxmc': `${item.Gy0_yjno}-${item.Gy0_gxh}-${item.Gy0_gxmc}-${item.Add_gxmc}`,
+        'jhcl': item['Gy0_计划接货数'],
+        'jhsh': item['Gy0_计划损耗'],
+        'zcf': item['total_fp'],
+        'zjf': item['waste_quality'],
+        'wxs': item['intangible_loss'],
+        'bfhj': item['total_waste'],
+        'jss': item['loss'],
+        'tlbfl': item['loss_rate'],
+        'mbbfl': item['target_loss_rate'],
+        'sjbfl': item['actual_loss_rate'],
+        'cdbl': item['超节损承担比例'],
+        'cjsje': item[''],
+        'zgqr': item[''],
+      })),
+    }
+    hiprintTemplate.print(tableData)
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 196 - 297
src/view/performance/12-orderAccounting/index.vue

@@ -1,57 +1,95 @@
 <template>
   <div>
-    <el-container>
-      <!-- 左侧树形结构 -->
-      <el-scrollbar max-height="80vh">
-        <el-aside width="280px">
-          <div class="JKWTree-tree">
-            <h3>工单超节损核算</h3>
+    <layout>
+      <layout-header>
+        <div class="">
+          <!--按钮部分-->
+          <el-form
+            ref="elSearchFormRef"
+            inline
+            class="demo-form-inline"
+          >
+            <el-form-item>
+              <el-input
+                v-model="searchInfo"
+                placeholder="搜索产品编号或产品名称"
+                clearable
+                style="width: 180px;"
+              />
+              <el-button
+                type="primary"
+                icon="search"
+                class="search"
+              />
+              <el-button
+                type="primary"
+                icon="edit"
+                class="bt"
+                @click="onStatusClick"
+              ><i class="el-icon-edit" />查改</el-button>
+              <!--                <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">工艺方案复制</el-button>-->
+              <el-button
+                type="primary"
+                icon="edit"
+                class="bt"
+                @click="()=>{dialogGdcjstj = true}"
+              >工单超节损统计
+              </el-button>
+
+            </el-form-item>
+          </el-form>
+
+          <!--按钮弹窗部分-->
+          <el-dialog
+            v-model="dialogGdcjstj"
+            title="工单超节损统计"
+            style="width: 20vw;height: 30vh"
+          >
+            <Gdcjstj :gdbh="currentRow" />
+          </el-dialog>
+
+        </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"
-              highlight-current
+              style="width: 100vw;"
               @node-click="handleNodeClick"
             />
           </div>
-        </el-aside>
-      </el-scrollbar>
+        </layout-sider>
 
-      <el-container>
-        <el-main>
-          <div class="gva-table-box">
-            <!-- 按钮区域 -->
-            <div class="gva-btn-list">
-              <el-row :span="6">
-                <el-input
-                  v-model="searchInfo"
-                  placeholder="输入工单编号或产品名称"
-                />
-              </el-row>
-              <el-button
-                type="primary"
-                :icon="Search"
-                @click="onSearch"
-              >定位</el-button>
+        <!--  右侧内容区域 -->
+        <layout-content>
 
-              <el-button
-                type="primary"
-                :icon="Download"
-                style="margin-left: auto;"
-                @click="exportExcel"
-              >导出到Excel</el-button>
-            </div>
-            <!-- 数据展示 -->
+          <!-- 上方列表 -->
+          <div class="gva-table-box">
             <el-table
               style="width: 100%;height:30vh;"
-              :data="tableData"
+              :data="tableData1"
               row-key="ID"
               highlight-current-row
               border
+              :row-class-name="rowClassName"
               :row-style="{ height: '20px' }"
               :cell-style="{ padding: '0px' }"
               :header-row-style="{ height: '20px' }"
               :header-cell-style="{ padding: '0px' }"
-              @selection-change="handleSelectionChange"
-              @row-dblclick="doubleClick"
+              @row-click="showOrderSuperLossGy"
+              @row-dblclick=""
+              @current-change="(row, oldRow) => { currentRow = row}"
             >
               <el-table-column
                 type="selection"
@@ -59,35 +97,7 @@
               />
               <!-- 使用 v-for 循环渲染每一列 -->
               <el-table-column
-                v-for="column in tableCols"
-                :key="column.prop"
-                :prop="column.prop"
-                :label="column.label"
-                :width="column.width"
-                show-overflow-tooltip="true"
-              />
-
-            </el-table>
-            <br>
-            <el-table
-              style="width: 100%;height: 40vh;"
-              row-key="ID"
-              highlight-current-row
-              border
-              :row-style="{ height: '20px' }"
-              :cell-style="{ padding: '0px' }"
-              :header-row-style="{ height: '20px' }"
-              :header-cell-style="{ padding: '0px' }"
-              @selection-change="handleSelectionChange"
-              @row-dblclick="doubleClick"
-            >
-              <el-table-column
-                type="selection"
-                width="55"
-              />
-              <!-- 使用 v-for 循环渲染每一列 -->
-              <el-table-column
-                v-for="column in tableCols"
+                v-for="column in tableCols1"
                 :key="column.prop"
                 :prop="column.prop"
                 :label="column.label"
@@ -97,27 +107,55 @@
 
             </el-table>
           </div>
-          <!-- 弹出框 -->
 
-        </el-main>
-      </el-container>
-    </el-container>
+          <!-- 下方表格 -->
+          <el-table
+            style="width: 100%;height: 40vh;"
+            row-key="ID"
+            highlight-current-row
+            border
+            :data="tableData2"
+            :row-style="{ height: '20px' }"
+            :cell-style="{ padding: '0px' }"
+            :header-row-style="{ height: '20px' }"
+            :header-cell-style="{ padding: '0px' }"
+            @row-dblclick="doubleClick"
+          >
+            <el-table-column
+              type="selection"
+              width="55"
+            />
+            <!-- 使用 v-for 循环渲染每一列 -->
+            <el-table-column
+              v-for="column in tableCols2"
+              :key="column.prop"
+              :prop="column.prop"
+              :label="column.label"
+              :width="column.width"
+              show-overflow-tooltip="true"
+            />
+
+          </el-table>
+
+        </layout-content>
 
+      </layout>
+    </layout>
   </div>
 </template>
-
 <script setup>
-
 // 全量引入格式化工具 请按需保留
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { Search, Refresh, Download } from '@element-plus/icons-vue'
-import { ref, reactive, onMounted } from 'vue'
-import { getSide, getTable } from '@/api/mes_api_gty/orderAccounting'
+import { Layout, LayoutSider, LayoutContent, LayoutHeader } from '@arco-design/web-vue'
+import { ref, reactive } from 'vue'
+import { getSide, getTable, getOrderSuperLossGy } from '@/api/mes_api_gty/orderAccounting'
+import Gdcjstj from '@/view/performance/12-orderAccounting/gdcjstj.vue'
+
+defineOptions({ name: 'Company' })
 
-defineOptions({
-  name: '12orDerAccounting'
-})
+const dialogGdcjstj = ref(false)
 
+// =========== 左侧树侧形结构 ===========
 // 侧边栏数据
 const treeData = ref([])
 const getSideData = async() => {
@@ -128,14 +166,15 @@ const getSideData = async() => {
 
     for (const [key, value] of Object.entries(data)) {
       const [date, total] = key.split('-') // 提取日期和数量
-
       const transformedItem = {
         label: `${date}(工单数:${total})`,
+        date: date,
         children: value.map(item => ({
-          label: `${item['客户编号']}【${item['客户名称']}】(工单数:${item.total})`
+          label: `${item['客户编号']}【${item['客户名称']}】(工单数:${item.total})`,
+          date: date,
+          code: item?.['客户编号']
         })),
       }
-
       transformedData.push(transformedItem)
     }
     treeData.value = transformedData
@@ -144,256 +183,116 @@ const getSideData = async() => {
 
 getSideData()
 
-// 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-  id: '',
-  name: '',
-  date: '',
-  group: '',
-  packingOutput: '',
-  reworkOutput: '',
-  pieceOutput: '',
-  order: '',
-  user: '',
-  createTime: '',
-  updateTime: '',
-  uniqid: '',
-})
-
-// 验证规则
-const rule = reactive({
-})
-
-const elFormRef = ref()
-const elSearchFormRef = ref()
-
-// =========== 表格控制部分 ===========
-const tableCols = [
-  { label: '工单编号', prop: 'qczl_gdbh', width: '100' },
-  { label: '印件号', prop: 'qczl_yjno', width: '100' },
-  { label: '印件名称', prop: 'Gd_cpmc', width: '400' },
-  { label: '日期', prop: 'qczl_rq', width: '100' },
-  { label: '流程单号', prop: 'qczl_num', width: '100' },
-  { label: '流程单备注', prop: 'qczl_NumDesc', width: '100' },
-  { label: '总废品', prop: 'qczl_fp', width: '100' },
-  { label: '废品1', prop: 'sl_lb1', width: '250' },
-  { label: '废品2', prop: 'sl_lb2', width: '250' },
-  { label: '废品3', prop: 'sl_lb3', width: '250' },
-  { label: '废品4', prop: 'sl_lb4', width: '250' },
-  { label: '废品5', prop: 'sl_lb5', width: '250' },
-  { label: '废品6', prop: 'sl_lb6', width: '250' },
-  { label: '废品7', prop: 'sl_lb7', width: '250' },
-  { label: '废品8', prop: 'sl_lb8', width: '250' },
-  { label: '废品9', prop: 'sl_lb9', width: '250' },
-  { label: '废品10', prop: 'sl_lb10', width: '250' },
-  { label: '废品11', prop: 'sl_lb11', width: '250' },
-  { label: '废品12', prop: 'sl_lb12', width: '250' },
-  { label: '废品13', prop: 'sl_lb13', width: '250' },
-  { label: '废品14', prop: 'sl_lb14', width: '250' },
-  { label: '废品15', prop: 'sl_lb15', width: '250' },
-  { label: '废品16', prop: 'sl_lb16', width: '250' },
-  { label: '废品17', prop: 'sl_lb17', width: '250' },
-  { label: '创建用户', prop: 'sys_id', width: '200' },
+// =========== 表格数据部分 ===========
+const tableCols1 = [
+  { label: '超损工单', prop: '', width: '90' },
+  { label: '工单编号', prop: 'Gd_gdbh', width: '100' },
+  { label: '印件号', prop: 'yj_Yjno', width: '100' },
+  { label: '联数', prop: 'yj_ls', width: '80' },
+  { label: '产品代号', prop: 'Gd_cpdh', width: '150' },
+  { label: '产品名称', prop: 'Gd_cpmc', width: '250' },
+  { label: '实际投料', prop: '实际投料', width: '100' },
+  { label: '计量单位', prop: '计量单位', width: '100' },
+  { label: '入仓日期', prop: 'warehousing_date', width: '120' },
+  { label: '入仓数量', prop: '', width: '100' },
+  { label: '目标合格率', prop: 'target_rate', width: '100' },
+  { label: '实际合格率', prop: 'real_rate', width: '100' },
+  { label: '奖惩系数', prop: '', width: '100' },
+  { label: '奖罚金额合计', prop: '', width: '120' },
+  { label: '废品合计', prop: '废品合计', width: '100' },
+  { label: '工单无形损', prop: 'intangible_loss', width: '100' },
+  { label: '材料废', prop: 'material_waste', width: '100' },
+  { label: '零头处理', prop: '', width: '100' },
+  { label: '处发废', prop: 'waste_out', width: '100' },
+  { label: '外摊废', prop: '', width: '100' },
+  { label: '工单计划损耗', prop: 'plan_loss', width: '120' },
+  { label: '工单制程废', prop: 'zcfp', width: '100' },
+  { label: '工单检验废', prop: 'waste_quality', width: '100' },
+  { label: '年月', prop: '年月', width: '100' },
 ]
-const tableData = reactive([])
-const detailData = reactive([
-  {
-    gdbh: '2311736',
-    yjgx: '01-15',
-    gxmc: '包装(圆切)',
-    yjmc: '利群(新)小《降焦改版)',
-    bzcl: '13.00',
-    fgcl: '0.00',
-    mxsl: '2500',
-    jcxs: '1.000',
-    ly: '',
-    dedh: '030002002',
-  },
-])
-const total = ref(0)
-const page = ref(1)
-const limit = ref(10)
-const searchInfo = ref('')
-const params = {
-  date: '',
-  sys_id: '',
-  page: page.value.toString(),
-  limit: limit.value.toString(),
-}
-
-const getTableData = async() => {
-  try {
-    const response = await getOrderVerificationTable(params)
-    if (response.code === 0) {
-      tableData.splice(0, tableData.length, ...response.data.rows)
-    }
-  } catch (error) {
-    console.log(error)
-  }
-}
-
-const handleNodeClick = (node, check) => {
-  if (node.params) {
-    params.date = node.params.date
-    params.sys_id = node.params.sys_id
-    total.value = node.params.total
-    getTableData()
+const tableCols2 = [
+  { label: '工单编号', prop: 'Gy0_gdbh', width: '100' },
+  { label: '印件及工序', prop: 'Gy0_yjno', width: '100' },
+  { label: '工序名称', prop: 'Gy0_gxmc', width: '200' },
+  { label: '联数', prop: 'Gy0_ls', width: '80' },
+  { label: '基础损耗', prop: 'Gy0_Rate0', width: '100' },
+  { label: '损耗率', prop: 'Gy0_Rate1', width: '100' },
+  { label: '损耗系数', prop: '损耗系数', width: '100' },
+  { label: '计损色数', prop: 'Gy0_ms', width: '100' },
+  { label: '计划产量', prop: 'Gy0_计划接货数', width: '100' },
+  { label: '计划损耗', prop: 'Gy0_计划损耗', width: '100' },
+  { label: '上报产量', prop: 'total_cl', width: '100' },
+  { label: '制程废', prop: 'total_fp', width: '100' },
+]
+const tableData1 = ref([])
+const tableData2 = ref([])
+const currentRow = ref({})
+
+// 显示上方表格
+const handleNodeClick = async(node) => {
+  if (node.children) {
+    console.log(node.date)
+    const { date } = node
+    const res = await getTable({ date, limit: 9999, page: 1 })
+    tableData1.value = res.data.data
+    console.log(res.data)
+  } else {
+    console.log(node.date, node.code)
   }
 }
 
-// 搜索
-function onSearch() {
-
-}
-// ============== 表格控制部分结束 ===============
-
-// 获取需要的字典 可能为空 按需保留
-const setOptions = async() => {
-}
-
-// 获取需要的字典 可能为空 按需保留
-setOptions()
-
-// 多选数据
-const multipleSelection = ref([])
-// 多选
-const handleSelectionChange = (val) => {
-  multipleSelection.value = val
-}
-
-// 批量删除控制标记
-const deleteVisible = ref(false)
-
-// 多选删除
-const onDelete = async() => {
-  const ids = []
-  if (multipleSelection.value.length === 0) {
-    ElMessage({
-      type: 'warning',
-      message: '请选择要删除的数据'
-    })
-    return
-  }
-  multipleSelection.value &&
-    multipleSelection.value.map(item => {
-      ids.push(item.ID)
-    })
-  const res = await deleteCompanyByIds({ ids })
+// 显示下方表格
+const showOrderSuperLossGy = async() => {
+  const { Gd_gdbh: order } = currentRow.value
+  const res = await getOrderSuperLossGy({ order })
   if (res.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '删除成功'
-    })
-    if (tableData.value.length === ids.length && page.value > 1) {
-      page.value--
-    }
-    deleteVisible.value = false
-    getTableData()
-  }
-}
-
-// 行为控制标记(弹窗内部需要增还是改)
-const type = ref('')
-
-// 更新行
-const updateCompanyFunc = async(row) => {
-  const res = await findCompany({ ID: row.ID })
-  type.value = 'update'
-  if (res.code === 0) {
-    formData.value = res.data.recompany
-    dialogFormVisible.value = true
-  }
-}
-
-// 弹窗控制标记
-const dialogFormVisible = ref(false)
-
-// 打开弹窗
-const openDialog = () => {
-  type.value = 'create'
-  dialogFormVisible.value = true
-}
-
-// 关闭弹窗
-const closeDialog = () => {
-  dialogFormVisible.value = false
-  formData.value = {
-    address: '',
-    image: '',
-    name: '',
+    const { data } = res
+    tableData2.value = data.map(item => ({
+      ...item,
+      Gy0_yjno: `${item.Gy0_yjno}-${item.Gy0_gxh}`,
+      Gy0_gxmc: item.Add_gxmc === '' ? item.Gy0_gxmc : `${item.Gy0_gxmc}〖${item.Add_gxmc}〗`,
+    }))
   }
 }
-// 弹窗确定
-const enterDialog = async() => {
-  elFormRef.value?.validate(async(valid) => {
-    if (!valid) return
-    let res
-    switch (type.value) {
-      case 'create':
-        res = await createCompany(formData.value)
-        break
-      case 'update':
-        res = await updateCompany(formData.value)
-        break
-      default:
-        res = await createCompany(formData.value)
-        break
-    }
-    if (res.code === 0) {
-      ElMessage({
-        type: 'success',
-        message: '创建/更改成功'
-      })
-      closeDialog()
-      getTableData()
-    }
-  })
-}
 
-// 双击表格操作
-function doubleClick(row, column, event) {
-  console.log(row, column, event)
-  // updateCompanyFunc(row);
-  type.value = 'update'
-  dialogFormVisible.value = true
-}
+const rowClassName = ({ row, rowIndex }) => {
 
-// 导出excel
-function exportExcel() {
-  console.log('导出到excel')
 }
-
-// 生命周期钩子
-onMounted(async() => {
-})
 </script>
-
 <style scoped>
+:deep(.plan-usage-low div) {
+  color: red !important;
+}
 .JKWTree-container {
   display: flex;
 }
-
 .JKWTree-tree {
   width: 300px;
   background-color: #fff;
+  /*background-color: rgba(241, 224, 224, 0.99);*/
   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 .warning-row) {
+  background: #FFFF80 !important;
+}
 /* 选中某行时的背景色 */
 :deep(.el-table__body tr.current-row) > td {
   background: #ff80ff !important;
 }
+
+:deep(.el-table .bg-yellow){
+  background: yellow;
+}
+
 </style>
 <style scoped>
 :deep(.el-table td .cell) {