zck 4 miesięcy temu
rodzic
commit
fb4da08eeb

+ 205 - 0
src/view/DecisionSupport/Modelchange.vue

@@ -0,0 +1,205 @@
+<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="换型or换版" prop="计划投料"  width="200" />
+               <el-table-column   align="center" label="数量" prop="工序1"  width="200" />
+               <el-table-column   align="center" label="是否签样" prop="工序2"  width="110" />
+               <el-table-column   align="center" label="装换版系数" prop="工序2"  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>
+
+
+            <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>
+  

+ 262 - 0
src/view/DecisionSupport/Monthlyplatescrap.vue

@@ -0,0 +1,262 @@
+<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: 78vh" 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="230" />
+               <el-table-column   align="center" label="印版名称" prop="印版名称"  width="260" />
+               <el-table-column   align="center" label="印版分类" prop="印版分类"  width="130" />
+               <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="Sys_id"  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>
+
+
+            <!-- <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";
+  import { getPrintDateList, getPrintdata } from '@/api/mes/job'
+  defineOptions({name: 'Company'})
+// =========== 获取左侧树形结构 ===========
+const treeData = ref([]);
+const defaultProps = {
+    children: 'children',
+    label: 'label'
+  };
+const GetTreeData = async () => {
+  const res = await getPrintDateList({})
+  if (res.code === 0) {
+    const { data } = res
+    const transformedData = []
+
+    // 遍历年份
+    for (const [year, months] of Object.entries(data)) {
+      const yearNode = {
+        label: `${year}年`,
+        value: year,
+        children: []
+      }
+
+      // 遍历月份
+      for (const [month, dates] of Object.entries(months)) {
+        const monthNode = {
+          label: `${month.split('-')[1]}月`,
+          value: month,
+          children: []
+        }
+
+        // 遍历日期
+        dates.forEach(date => {
+          const dateNode = {
+            label: date,
+            value: date
+          }
+          monthNode.children.push(dateNode)
+        })
+
+        yearNode.children.push(monthNode)
+      }
+
+      transformedData.push(yearNode)
+    }
+    
+    treeData.value = transformedData
+  }
+}
+
+GetTreeData();
+console.log(treeData.value)
+
+// =========== 点击树形节点 ===========
+const hztableData = ref([]);
+const handleNodeClick = async (node) => {
+  if(!node.children){
+    console.log('点击的叶子节点:', node.value)
+    // 调用接口获取数据
+    const res = await getPrintdata({
+      date: node.value
+    })
+    if (res.code === 0) {
+      const { data } = res
+      console.log('点击的日期节点数据:', data)
+      // 处理数据,更新表格
+      hztableData.value = data
+    }
+  }
+}
+  
+
+  
+
+  
+
+  
+  
+  </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>
+  

+ 12 - 1
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -1690,12 +1690,21 @@
 					</el-col>
 					<el-col :span="10">
 					  <el-form-item label="换型类型:" prop="flatFeed" class="mab">
-					  <el-input v-model="formdata3.value.换型类型" id="换型类型" disabled   style="width: 200px;" />
+						<el-radio v-model="formdata3.value.换型类型" label="装新版" @keydown="ent1($event)">装新版</el-radio>
+						<el-radio v-model="formdata3.value.换型类型" label="装旧版" @keydown="ent1($event)">装旧版</el-radio>
+						<el-radio v-model="formdata3.value.换型类型" label="换版" @keydown="ent1($event)">换版</el-radio>
+						<el-form-item label="换型数量:" prop="flatFeed" class="mab">
+							<el-input v-model="formdata3.value.换型数量" id="换型数量" @keydown="ent1($event)"  style="width: 150px;" />
+					</el-form-item>
 					  </el-form-item>
+
 					</el-col>
+
+
 			  </el-row>
 
 
+
 			  <el-row :gutter="30" style="height: 40px;">
 			    <el-col :span="5">
 			      <el-form-item label="装版总工时:" prop="flatFeed" class="mab">
@@ -7795,6 +7804,8 @@ const handleFplbClickedit = (nodeData, node, component) => {
  }
  //日报表修改弹窗确定
  const chanliangenterDialog = async () => {
+	console.log(formdata3.value.换型类型)
+	return;
 	updateTotal()
   const jt = formdata3.value.sczl_jtbh
  // 定义一个变量来决定是否应该检查 fpsum2.value < 1