Browse Source

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

tty 1 year ago
parent
commit
9c3bf588b2

+ 16 - 7
src/api/yunyin/yunying.js

@@ -184,11 +184,11 @@ export const DataCorrection = (params) => {
 }
 
 //工单差改->修改工单信息
-export const WorkOrderEdit = (params) => {
+export const WorkOrderEdit = (data) => {
     return service({
         url: '/mes_server/work_order/WorkOrderEdit',
-        method: 'get',
-        params
+        method: 'post',
+        data
     })
 }
 
@@ -267,11 +267,11 @@ export const AccountingParameter = (params) => {
     })
 }
 //修正工单核算参数->参数修改
-export const AccountingParameterEdit = (params) => {
+export const AccountingParameterEdit = (data) => {
     return service({
         url: '/mes_server/work_order/AccountingParameterEdit',
         method: 'post',
-        params
+        data
     })
 }
 //U8投料试算
@@ -282,6 +282,15 @@ export const U8Trial = (params) => {
         params
     })
 }
+//查改U8工单->工单列表
+export const U8workOrder = (params) => {
+    return service({
+        url: '/mes_server/work_order/U8workOrder',
+        method: 'get',
+        params
+    })
+}
+
 
 
 /**工单生产排单(排产管理)*/
@@ -358,11 +367,11 @@ export const ProductionSchedulingPause = (data) => {
     })
 }
 //工序状态更正
-export const ProcessStatusCorrection = (data) => {
+export const ProcessStatusCorrection = (params) => {
     return service({
         url: '/mes_server/manufacture/ProcessStatusCorrection',
         method: 'get',
-        data
+        params
     })
 }
 //班次选择列表

File diff suppressed because it is too large
+ 493 - 502
src/view/yunyin/chanpinziliao/chanpinziliao.vue


+ 7 - 3
src/view/yunyin/renliziyuan/renyuanjibenziliao.vue

@@ -33,6 +33,7 @@
                       :row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                       :data="tableData"  border row-key="ID"
+                      size="small"
                       highlight-current-row="true" @row-dblclick="updateCompanyFunc"
                       @row-click="tableRowClick" :show-overflow-tooltip="true"
                       @selection-change="handleSelectionChange">
@@ -354,7 +355,10 @@ const _ygjbzledit = async ()=>{
 
 </script>
 
-<style>
+<style scoped>
+:deep(.el-table td .cell) {
+  line-height: 30px !important;
+}
 .JKWTree-container {
   display: flex;
 }
@@ -399,8 +403,8 @@ const _ygjbzledit = async ()=>{
   background: oldlace;
 }
 
-/* 选中某行时的背景色*/
-.el-table__body tr.current-row>td {
+/* 选中某行时的背景色 */
+:deep(.el-table__body tr.current-row) > td {
   background: #ff80ff !important;
 }
 </style>

+ 404 - 202
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -2,14 +2,11 @@
   <div style="margin: 0 auto">
     <el-container>
       <el-aside width="200px">
-<!--        <div class="JKWTree-tree" style="width: 480px;height: 746px;">-->
         <div class="JKWTree-tree" style="height: 746px;">
-<!--          <h3> 组织列表</h3>-->
+<!--          排产进程及参数设置-->
           <el-tree :data="sctreeData" :props="defaultProps" @node-click="schandleNodeClick"></el-tree>
-          <el-tree
-              :data="treeData"
-              :props="defaultProps"
-              @node-click="handleNodeClick"></el-tree>
+<!--          车间-->
+          <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
         </div>
       </el-aside>
       <el-container>
@@ -17,18 +14,71 @@
 
           <!-- 搜索框 -->
           <div class="gva-search-box">
-            <el-form ref="elSearchFormRef" :inline="true" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
+            <!--            状态设置-->
+            <el-dialog v-model="onstatuslist" title="工单状态设置" width="30%" style="top: 15%">
+              <div style="width: 100%;height: 100%;">
+                <div style="width: 100%; display: flex; align-items: center;">
+                  <el-form-item label="工单编号 :" prop="currentProcess">
+                    <el-input v-model="statusformData['gdbh']" placeholder="" />
+                  </el-form-item>
+                </div>
+                <div style="width: 100%; display: flex; align-items: center; margin-top: 30px;">
+                  <span>状态设置:</span>
+                  <el-radio-group v-model="status" style="margin-left: 10px;">
+                    <el-radio label="计划中">计划中</el-radio>
+                    <el-radio label="生产中">生产中</el-radio>
+                    <el-radio label="已完工">已完工</el-radio>
+                  </el-radio-group>
+                </div>
+                <div class="dialog-footer" style="text-align: right; margin-top: 40px;">
+                  <el-button @click="handleCancel">取消</el-button>
+                  <el-button type="primary"  @click="handleConfirm">确认</el-button>
+                </div>
+              </div>
+            </el-dialog>
+            <!--            工序状态更正-->
+            <el-dialog v-model="gxztgzzlist" title="工序状态更正" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
+
+              <el-button type="primary" @click="gxztgzzCancel">退出</el-button>
+
+              <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+                <el-form-item label="关键字 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
+                  <el-input v-model="gxztgzzformData['gdbh']"
+                            @keyup.enter="gxztgzzgetProductValue" placeholder="" style="width: 500px;"/>
+                </el-form-item>
+              </div>
+              <el-table ref="multipleTable"
+                        :show-overflow-tooltip="true"
+                        :row-style="{ height: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
+                        :header-cell-style="{ padding: '0px' }"
+                        style="width: 100%;height: 710px" border tooltip-effect="dark"
+                        :data="gxztgzztableData" row-key="ID" @selection-change="handleSelectionChange">
+                <el-table-column v-slot="scope" align="left" label=印件及工序 width="600" >
+                  <el-input disabled  v-model="scope.row.印件及工序" :clearable="false"/>
+                </el-table-column>
+                <el-table-column v-slot="scope" align="left" label=计划产量/已完成 width="590" >
+                  <el-input disabled  v-model="scope.row['计划产量/已完成']" :clearable="false"/>
+                </el-table-column>
+                <el-table-column v-slot="scope" align="left" label=完成率 width="240" >
+                  <el-input disabled  v-model="scope.row.完成率" :clearable="false"/>
+                </el-table-column>
+                <el-table-column v-slot="scope" align="left" label=完工时间 width="210" >
+                  <el-input disabled  v-model="scope.row.完工时间" :clearable="false"/>
+                </el-table-column>
+                <el-table-column v-slot="scope" align="left" label=设备代号 width="240" >
+                  <el-input disabled  v-model="scope.row.设备代号" :clearable="false"/>
+                </el-table-column>
+              </el-table>
+            </el-dialog>
 
-              <!-- 左侧查询输入框 -->
-              <el-form-item>
-                <el-input v-model="searchInfo.keyword" placeholder="搜索" clearable style="width: 200px;"></el-input>
-              </el-form-item>
 
-              <!-- 查询和重置按钮 -->
+            <el-form ref="elSearchFormRef" :inline="true" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
               <el-form-item>
-                <el-button type="primary" icon="search" @click="onSubmit">查询</el-button>
-<!--                <el-button icon="refresh" @click="onReset">重置</el-button>-->
-<!--                <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>-->
+                <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 200px;"></el-input>
+                <el-button type="primary" icon="search" @click="onSubmit" style="margin: 5px">查询</el-button>
+                <el-button type="primary" icon="edit" @click="onStatusClick" style="margin: 5px">状态设置</el-button>
+                <el-button type="primary" icon="edit" @click="onStatusgzClick" style="margin: 5px">工序状态更正</el-button>
               </el-form-item>
             </el-form>
           </div>
@@ -43,38 +93,18 @@
                       tooltip-effect="dark"
                       :data="tableData"
                       row-key="ID"
-                      highlight-current-row="true"
-                      @row-click="tableRowClick"
+                      :highlight-current-row="true"
+                      size="small"
+                      @row-click="gdtableRowClick"
                       @selection-change="handleSelectionChange"
                       :show-overflow-tooltip="true">
-              <el-table-column type="selection" width="55"/>
-              <el-table-column align="left" label="生产分类" prop="生产分类" width="120" />
-              <el-table-column align="left" label="工单编号" prop="工单编号" width="120" />
-              <el-table-column align="left" label="产品代号" prop="产品代号" width="120" />
-              <el-table-column align="left" label="产品名称" prop="产品名称" width="340" />
-              <el-table-column align="left" label="接单日期" prop="接单日期" width="160" />
-              <el-table-column align="left" label="交货日期" prop="交货日期" width="160" />
-              <el-table-column align="left" label="订单数量" prop="订单数量" width="120" />
-              <el-table-column align="left" label="计量单位" prop="计量单位" width="120" />
-              <el-table-column align="left" label="客户名称" prop="客户名称" width="200" />
-              <el-table-column align="left" label="客户编号" prop="客户编号" width="120" />
-              <el-table-column align="left" label="备注" prop="备注" width="400" />
-              <el-table-column align="left" label="客户料号" prop="客户料号" width="120" />
-              <el-table-column align="left" label="创建用户" prop="创建用户" width="160" />
-              <el-table-column align="left" label="创建时间" prop="创建时间" width="160" />
-              <el-table-column align="left" label="修改时间" prop="修改时间" width="160" />
-              <el-table-column align="left" label="UNIQID" prop="UNIQID" width="120" />
-              <el-table-column align="left" label="投料率" prop="投料率" width="120" />
-              <el-table-column align="left" label="销售订单号" prop="销售订单号" width="120" />
+              <template v-for="item in tableFields[currentNode]">
+                  <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
+              </template>
             </el-table>
-<!--            <div class="gva-pagination">-->
-<!--              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange"/>-->
-<!--            </div>-->
           </div>
 
-
-            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-
+            <el-tabs v-model="activeName" type="card" @tab-click="handleClick" v-if="currentNode == 1 || currentNode == 4">
               <el-tab-pane label="工艺资料"  @click="showTable('工艺资料')"  name="first">
                 <el-table ref="multipleTable"
                           :show-overflow-tooltip="true"
@@ -83,7 +113,6 @@
                           :header-cell-style="{ padding: '0px' }"
                           highlight-current-row="true"
                           style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
-                  <el-table-column type="selection" width="55" />
                   <el-table-column align="left" label="工单编号" prop="工单编号"  width="100"/>
                   <el-table-column align="left" label="重点工序" prop="重点工序"  width="100"/>
                   <el-table-column align="left" label="工序备注" prop="工序备注"  width="240"/>
@@ -107,9 +136,8 @@
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :header-cell-style="{ padding: '0px' }"
                           :show-overflow-tooltip="true"
-                          highlight-current-row="true"
+                          :highlight-current-row="true"
                           style="width: 100%;height: 400px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
-                  <el-table-column type="selection" width="55" />
                   <el-table-column align="left" label="工单编号" prop="工单编号"  width="100"/>
                   <el-table-column align="left" label="印件号" prop="印件号"  width="100"/>
                   <el-table-column align="left" label="印件代号" prop="印件代号"  width="100"/>
@@ -128,9 +156,22 @@
                   <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="100"/>
                 </el-table>
               </el-tab-pane>
-
             </el-tabs>
 
+            <el-table ref="multipleTable2"
+                      v-if="[2, 3].includes(currentNode)"
+                      :show-overflow-tooltip="true"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
+                      :highlight-current-row="true"
+                      style="width: 100%;height: 400px" border tooltip-effect="dark" :data="bottomData" row-key="ID" @selection-change="handleSelectionChange">
+              <template v-for="item in bottomTableF[currentNode]">
+                <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
+              </template>
+            </el-table>
+
+
         </el-main>
       </el-container>
     </el-container>
@@ -148,7 +189,7 @@ export default {
   },
   methods: {
     showTable(tableName) {
-      // console.log(tableName)
+      console.log("点击了".tableName)
       // 根据点击的按钮设置当前展示的表格
       this.currentTable = tableName;
     },
@@ -170,9 +211,9 @@ import {
   DataList,
   getProduct,
   getProductData,
-  Project,
-  projectCraft,
-  projectPrint,
+  Project,StatusEdit,
+  projectCraft,ProcessStatusCorrection,
+  projectPrint, setProductStatus,
   workbench
 } from "@/api/yunyin/yunying";
 defineOptions({name: 'Company'})
@@ -182,44 +223,205 @@ const sctreeData = ref([
   {
     label: '排产进程及参数设置',
     children:[
-      {label: '1.计划中工单', number: 1 },
-      {label: '2.排程中工单', number: 2 },
-      {label: '3.制程中工单', number: 3 },
-      {label: '4.已完工工单', number: 4 }
+      {label: '1.计划中工单', number: 1},
+      {label: '2.排程中工单', number: 2,},
+      {label: '3.制程中工单', number: 3,},
+      {label: '4.已完工工单', number: 4,}
     ],
   }
 ]);
 
+const tableFields = ref(
+{
+      '1': [
+          { title:'生产分类', prop: '生产分类', width: 90, align:'left', },
+          { title: '工单编号', prop: '工单编号', width: 120, align:'left', },
+          { title: '产品代号', prop: '产品代号', width: 120, align:'left', },
+          { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
+          { title: '接单日期', prop: '接单日期', width: 160, align:'left', },
+          { title: '交货日期', prop: '交货日期', width: 160, align:'left', },
+          { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
+          { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
+          { title: '客户名称', prop: '客户名称', width: 200, align:'left', },
+          { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
+        { title: '备注', prop: '备注', width: 400, align:'left', },
+          { title: '客户料号', prop: '客户料号', width: 120, align:'left', },
+          { title: '创建用户', prop: '创建用户', width: 160, align:'left', },
+          { title: '创建时间', prop: '创建时间', width: 160, align:'left', },
+          { title: '修改时间', prop: '修改时间', width: 160, align:'left', },
+          { title: 'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
+          { title: '投料率', prop: '投料率', width: 120, align:'left', },
+          { title: '销售订单号', prop: '销售订单号', width: 120, align:'left', },
+    ],
+    '2':[
+      { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
+      { title: '工单编号', prop: '工单编号', width: 120, align:'left', },
+      { title: '产品代号', prop: '产品代号', width: 120, align:'left', },
+      { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
+      { title: '接单日期', prop: '接单日期', width: 160, align:'left', },
+      { title: '交货日期', prop: '交货日期', width: 160, align:'left', },
+      { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
+      { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
+      { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
+      { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
+      { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
+      { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
+      { title: '创建用户', prop: '创建用户', width: 160, align:'left', },
+      { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
+      { title: 'GYUID', prop: 'GYUID', width: 120, align:'left', },
+      ],
+      '3': [
+        { title: '最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
+        { title: '工单编号', prop: '工单编号', width: 120, align:'left', },
+        { title: '产品代号', prop: '产品代号', width: 120, align:'left', },
+        { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
+        { title: '接单日期', prop: '接单日期', width: 160, align:'left', },
+        { title: '交货日期', prop: '交货日期', width: 160, align:'left', },
+        { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
+        { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
+        { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
+        { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
+        { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
+        { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
+        { title: '客户料号', prop: '客户料号', width: 160, align:'left', },
+        { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
+        { title: 'GYUID', prop: 'GYUID', width: 120, align:'left', },
+      ],
+      '4': [
+        { title: '工单编号', prop: '工单编号', width: 120, align:'left', },
+        { title: '产品代号', prop: '产品代号', width: 120, align:'left', },
+        { title: '产品名称', prop: '产品名称', width: 340, align:'left', },
+        { title: '接单日期', prop: '接单日期', width: 160, align:'left', },
+        { title: '交货日期', prop: '交货日期', width: 160, align:'left', },
+        { title: '订单数量', prop: '订单数量', width: 120, align:'left', },
+        { title: '计量单位', prop: '计量单位', width: 120, align:'left', },
+        { title: '销售订单号', prop: '销售订单号', width: 200, align:'left', },
+        { title: '客户编号', prop: '客户编号', width: 120, align:'left', },
+        { title: '客户名称', prop: '客户名称', width: 120, align:'left', },
+        { title: '客户料号', prop: '客户料号', width: 160, align:'left', },
+        { title: '排程类型', prop: '排程类型', width: 120, align:'left', },
+        { title: 'GDUID', prop: 'GDUID', width: 120, align:'left', },
+      ]
+    }
+)
+
+const bottomTableF = ref({
+  '2': [
+    { title:'工单编号', prop: '工单编号', width: 120, align:'left', },
+    { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
+    { title:'机组', prop: '机组', width: 120, align:'left', },
+    { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
+    { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
+    { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
+    { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
+    { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
+    { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
+    { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
+    { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
+    { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
+    { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
+    { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
+    { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
+    { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
+    { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
+    { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
+    { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
+  ],
+  '3': [
+    { title:'工单编号', prop: '工单编号', width: 120, align:'left', },
+    { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
+    { title:'机组', prop: '机组', width: 120, align:'left', },
+    { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
+    { title:'工序产量', prop: '工序产量', width: 120, align:'left', },
+    { title:'已完成产量', prop: '已完成产量', width: 120, align:'left', },
+    { title:'剩余产量', prop: '剩余产量', width: 120, align:'left', },
+    { title:'小时产能', prop: '小时产能', width: 120, align:'left', },
+    { title:'产能系数', prop: '产能系数', width: 120, align:'left', },
+    { title:'生产工时', prop: '生产工时', width: 120, align:'left', },
+    { title:'辅助工时', prop: '辅助工时', width: 120, align:'left', },
+    { title:'最早开工时间', prop: '最早开工时间', width: 120, align:'left', },
+    { title:'计划开工时间', prop: '计划开工时间', width: 120, align:'left', },
+    { title:'计划完工时间', prop: '计划完工时间', width: 120, align:'left', },
+    { title:'班次安排', prop: '班次安排', width: 120, align:'left', },
+    { title:'设备名称', prop: '设备名称', width: 120, align:'left', },
+    { title:'排单备注', prop: '排单备注', width: 120, align:'left', },
+    { title:'工序完工', prop: '工序完工', width: 120, align:'left', },
+    { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
+      ],
+})
+
 const treeData = ref([]);
+const currentNode = ref('1')
+//印件资料
+const yjtableData = ref([])
+//工艺资料
+const gytableData = ref([])
+
+const bottomData = ref([])
 //点击 设备定额及分配参数设置
 const schandleNodeClick = async (node) => {
-  console.log(node);
+  currentNode.value = node.number
+  bottomData.value = []
+  yjtableData.value = []
+  gytableData.value = []
   switch (node.number) {
     case 1:
+      // 计划中工单
       const Projectdata = await Project();
       tableData.value = Projectdata.data
-      // const productCountMap = tableData.value.reduce((countMap, item) => {
-      //   const productName = item.产品名称;
-      //   countMap[productName] = (countMap[productName] || 0) + 1;
-      //   return countMap;
-      // }, {});
-      // const productCountMapLength = Object.keys(productCountMap).length;
-      // console.log(`产品名称总数量:${productCountMapLength}`);
       break;
     case 2:
+      //排程中工单
+      tableData.value = [
+        {
+          '最早开工时间': '',
+          '工单编号': '2011719',
+          '产品代号': '100102003',
+          '产品名称': '利群(休闲云端)手工条盒',
+          '接单日期': '2020.11.04',
+          '交货日期': '2020.11.14',
+          '订单数量': '12.5',
+          '计量单位': '万张',
+          '销售订单号': '利群(休闲云端)手工条盒 201102',
+          '排程类型': '2.排程中工单',
+          '客户编号': '1001',
+          '客户名称': '浙江中烟',
+          '客户料号': '',
+          'GDUID': '5222',
+          'GYUID': '95913',
+        },
+        {
+          '最早开工时间': '',
+          '工单编号': '2380342',
+          '产品代号': '',
+          '产品名称': '检验改二维码专用印章',
+          '接单日期': '2023.03.07',
+          '交货日期': '',
+          '订单数量': '',
+          '计量单位': '张',
+          '销售订单号': '',
+          '排程类型': '2.排程中工单',
+          '客户编号': '1001',
+          '客户名称': '浙江中烟',
+          '客户料号': '',
+          'GDUID': '14405',
+          'GYUID': '211808',
+        },
+      ]
       break;
     case 3:
+      //制程中工单
       break;
     case 4:
+      //已完工工单
       break;
   }
 };
+//进入页面自动加载数据
 const workbenchdata = async () => {
   try {
     const data = await workbench();
     const rawData = data.data;
-    console.log(rawData);
-
     const dataArray =Object.keys(rawData).map(key => ({
       label: key,
       children: Object.keys(rawData[key]).map(subKey => ({
@@ -240,82 +442,148 @@ workbenchdata();
 //点击左侧树形获取列表
 const tableData = ref([])
 const handleNodeClick = async (node) => {
-  const custom_code = node.label; // 假设你想使用节点的 label 作为 custom_code
+  const custom_code = node.label;
+  console.log("↓↓↓↓点击了车间参数↓↓↓↓");
   console.log(custom_code);
 };
 
+//下方表格数据
+const gdtableRowClick = async (row) => {
+
+  // 计划中
+  if (currentNode.value == 1) {
+    const Gd_gdbh = row.工单编号;
+    // console.log(Gd_gdbh);
+    //计划中工单->工艺资料接口
+    const gyres = await projectCraft({Gd_gdbh: Gd_gdbh});
+    //计划中工单->印件资料接口
+    const yjres = await projectPrint({Gd_gdbh: Gd_gdbh});
+    //工艺资料表格
+    gytableData.value.splice(0, gytableData.value.length, ...gyres.data);
+    //印件资料表格
+    yjtableData.value.splice(0, yjtableData.value.length, ...(yjres?.data ?? []));
+  }
 
-//印件资料
-const yjtableData = reactive([])
-//工艺资料
-const gytableData = reactive([])
-
-const tableRowClick = async (row) => {
-  //点击表格获取 产品编号
-  // const Gd_gdbh = row.工单编号;
-  const Gd_gdbh = '2401101';
-  // console.log(Gd_gdbh);
-  const gyres = await projectCraft({Gd_gdbh:Gd_gdbh});//接口
-  gytableData.splice(0, gytableData.length, ...gyres.data);//工艺资料表格
-  const yjres = await projectPrint({Gd_gdbh:Gd_gdbh});//接口
-  yjtableData.splice(0, yjtableData.length, ...yjres.data);//印件资料表格
+  // 排程中 下方表格
+  if (currentNode.value == 2) {
+    bottomData.value = [
+      {
+        '工单编号' : '2305909',
+        '印件工序及名称' : '01-01 裁切【光边】',
+        '机组' : 'QZ01# QZ03#',
+        '设备编号' : 'QZ01#',
+        '工序产量' : '3000',
+        '已完成产量' : '',
+        '剩余产量' : '9000',
+        '产能系数' : '1',
+        '生产工时' : '',
+        '辅助工时' : '1',
+        '最早开工时间' : '',
+        '计划完工时间' : '',
+        '班次安排' : '007',
+        '设备名称' : '海德堡波拉裁切刀(QZ-01)',
+      }
+    ]
+  }
 };
 
+//搜索查询
+const searchInfo = ref('')
+//点击【查询】按钮
+const onSubmit = () => {
+  // console.log("点击了搜索按钮")
+};
 
+// =========== 【工序状态更正】 ===========
+const gxztgzzlist = ref(false);
+const gxztgzzformData = reactive({gdbh: '',});
+const gxztgzztableData = ref([]);
+//工序状态更正【按钮】
+const onStatusgzClick = () => {
+  // if(工单编号.value == null){
+  //   gxztgzzlist.value = false;
+  //   ElMessage({
+  //     type: 'warning',
+  //     message: '请选择树形后,再操作此功能'
+  //   })
+  // }else{
+  gxztgzzformData['gdbh'] = '2312192';
+  _ProcessStatusCorrection();
+  gxztgzzlist.value = true;
+  // }
+};
+//工序状态更正【回车】
+const gxztgzzgetProductValue = () => {
+  _ProcessStatusCorrection();
+};
+//工序状态更正
+const _ProcessStatusCorrection = async (row) => {
+  const workOrder = gxztgzzformData['gdbh'];
+  console.log(workOrder)
+  const ProcessStatusCorrectiondata = await ProcessStatusCorrection({workOrder:workOrder});
+  gxztgzztableData.value = ProcessStatusCorrectiondata.data;
+};
+//工序状态更正【退出】
+const gxztgzzCancel = () => {
+  gxztgzzlist.value = false;
+};
 
 
-// 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-  address: '',
-  image: '',
-  name: '',
-})
-
-// 验证规则
-const rule = reactive({
-})
-
-const searchRule = reactive({
-  createdAt: [
-    { validator: (rule, value, callback) => {
-        if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
-          callback(new Error('请填写结束日期'))
-        } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
-          callback(new Error('请填写开始日期'))
-        } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
-          callback(new Error('开始日期应当早于结束日期'))
-        } else {
-          callback()
-        }
-      }, trigger: 'change' }
-  ],
-})
+// =========== 状态设置 ===========
+const onstatuslist = ref(false);
+const statusformData = reactive({gdbh: '',});
+const status = ref('计划中'); // 默认选择在产
+// const _stacode = ref(null);
+//点击【状态设置】按钮
+const onStatusClick = () => {
+  // if(_product_code.value == null){
+  //   onstatuslist.value = false;
+  //   ElMessage({
+  //     type: 'warning',
+  //     message: '请选择树形后,再操作此功能'
+  //   })
+  // }else{
+    statusformData['gdbh'] = '2401156';
+    onstatuslist.value = true;
+  // }
+};
+//工单状态设置放弃按钮
+const handleCancel = () => {
+  onstatuslist.value = false;
+};
+//工单状态设置执行按钮
+const handleConfirm = async () => {
+  //工单编号
+  let workOrder = statusformData['gdbh'];
+  //状态
+  let statusCode;
+  if (status.value === '计划中') {
+    statusCode = "1-计划中";
+  } else if (status.value === '生产中') {
+    statusCode = "2-生产中";
+  }else if (status.value === '已完工') {
+    statusCode = "3-已完工";
+  }
+  const StatusEditdata = await StatusEdit({workOrder:workOrder,status:statusCode});
+  if (StatusEditdata.code === 0) {
+    ElMessage({
+      type: 'success',
+      message: '更新成功'
+    })
+  } else {
+    ElMessage({
+      type: 'error',
+      message: '更新成功'
+    })
+  }
+  onstatuslist.value = false;
+};
+// handleCancel(_stacode);
 
-const elFormRef = ref()
-const elSearchFormRef = ref()
 
-// =========== 表格控制部分 ===========
 const page = ref(1)
 const total = ref(0)
 const pageSize = ref(10)
-const searchInfo = ref({})
-
-// 重置
-const onReset = () => {
-  searchInfo.value = {}
-  getTableData()
-}
-
-// 搜索
-const onSubmit = () => {
-  elSearchFormRef.value?.validate(async(valid) => {
-    if (!valid) return
-    page.value = 1
-    pageSize.value = 10
-    getTableData()
-  })
-}
-
 // 分页
 const handleSizeChange = (val) => {
   pageSize.value = val
@@ -330,15 +598,8 @@ const handleCurrentChange = (val) => {
 
 // 查询
 const getTableData = async() => {
-  const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
-  if (table.code === 0) {
-    tableData.value = table.data.list
-    total.value = table.data.total
-    page.value = table.data.page
-    pageSize.value = table.data.pageSize
-  }
-}
 
+}
 getTableData()
 
 // ============== 表格控制部分结束 ===============
@@ -367,80 +628,21 @@ const updateCompanyFunc = async (row) => {
   dialogFormVisible.value = true;
 };
 
-// 弹窗控制标记
-const dialogFormVisible = ref(false)
-
-// 查看详情控制标记
-const detailShow = ref(false)
-
-// 打开详情弹窗
-const openDetailShow = () => {
-  detailShow.value = true
-}
-
-// 打开详情
-const getDetails = async (row) => {
-  // 打开弹窗
-  const res = await findCompany({ ID: row.ID })
-  if (res.code === 0) {
-    formData.value = res.data.recompany
-    openDetailShow()
-  }
-}
-
-// 关闭详情弹窗
-const closeDetailShow = () => {
-  detailShow.value = false
-  formData.value = {
-    address: '',
-    image: '',
-    name: '',
-  }
-}
-
 // 打开弹窗
 const openDialog = () => {
-  type.value = 'create'
   dialogFormVisible.value = true
 }
-
-// 关闭弹窗
-const closeDialog = () => {
-  dialogFormVisible.value = false
-  formData.value = {
-    address: '',
-    image: '',
-    name: '',
-  }
-}
 // 弹窗确定
 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()
-    }
-  })
+  console.log("弹窗确定")
 }
+// 关闭弹窗
+const closeDialog = () => {dialogFormVisible.value = false}
 </script>
-<style>
+<style scoped>
+:deep(.el-table td .cell) {
+  line-height: 30px !important;
+}
 .JKWTree-container {
   display: flex;
 }
@@ -459,8 +661,8 @@ const enterDialog = async () => {
 .JKWTree-content {
   flex: 1;
 }
-/* 选中某行时的背景色*/
-.el-table__body tr.current-row>td {
+/* 选中某行时的背景色 */
+:deep(.el-table__body tr.current-row) > td {
   background: #ff80ff !important;
 }
 </style>

File diff suppressed because it is too large
+ 1107 - 99
src/view/yunyin/shengchanguanli/gongdanziliao.vue


Some files were not shown because too many files changed in this diff