Browse Source

运营管理

liuhairui 1 year ago
parent
commit
03cb228fb9

+ 29 - 2
src/api/yunyin/yunying.js

@@ -387,11 +387,11 @@ export const WorkOrderSearch = (params) => {
     })
 }
 //工序完工
-export const complete = (data) => {
+export const complete = (params) => {
     return service({
         url: '/mes_server/manufacture/complete',
         method: 'get',
-        data
+        params
     })
 }
 //加入排产
@@ -461,6 +461,24 @@ export const StatusEdit = (data) => {
     })
 }
 
+//工序状态更正->编辑
+export const ProcessStatusCorrectionEdit = (data) => {
+    return service({
+        url: '/mes_server/manufacture/ProcessStatusCorrectionEdit',
+        method: 'post',
+        data
+    })
+}
+
+//机台制程/排程工单列表
+export const MachineWorkOrderList = (params) => {
+    return service({
+        url: '/mes_server/manufacture/MachineWorkOrderList',
+        method: 'get',
+        params
+    })
+}
+
 
 /** 7.设备运行跟踪*/
 //左侧菜单
@@ -550,4 +568,13 @@ export const teamDel = (params) => {
         method: 'get',
         params
     })
+}
+
+//获取机台编号
+export const getMachineMac = (data) => {
+    return service({
+        url:'/mes_server/reporting_work/getMachineMac',
+        method: 'get',
+        data
+    })
 }

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


+ 307 - 106
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <layout>
-      <layout-sider :resize-directions="['right']" :width="300">
+      <layout-sider :resize-directions="['right']" :width="200">
         <div class="JKWTree-tree" style="height: 746px;">
           <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
         </div>
@@ -75,7 +75,7 @@
               <el-button type="" icon="edit" @click="oneditpcClick">更新排程</el-button>
               <el-button type="" @click="cjsbpcCancel">退出</el-button>
 
-              <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+              <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; ">
                 <div style="width: 100%; height: 60px; padding: 0px;  display: flex; align-items: center;">
                   <el-form-item label="设备代号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
                     <el-input v-model="cjsbpcformData['sbdh']" disabled placeholder="" />
@@ -85,8 +85,8 @@
                       <el-option
                           v-for="(option, index) in cjsbpcformData.bancis"
                           :key="index"
-                          :label="option"
-                          :value="option"
+                          :label="option.label"
+                          :value="option.value"
                       />
                     </el-select>
                   </el-form-item>
@@ -95,6 +95,62 @@
                   </el-form-item>
 
                 </div>
+                <el-table ref="paichengRef"
+                          :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: 74vh" border tooltip-effect="dark"
+                          :data="paichengData" row-key="ID" >
+<!--                  <el-table-column v-slot="scope" align="left" label=优先次序 width="120" >-->
+<!--                    <el-input disabled  v-model="scope.row.优先次序" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=工单编号 width="200" >-->
+<!--                    <el-input disabled  v-model="scope.row.工单编号" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=印件名称 width="220" >-->
+<!--                    <el-input disabled  v-model="scope.row.印件名称" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=接货数 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.接货数" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=小时产能 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.小时产能" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=产能系数 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.产能系数" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.生产工时" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=生产工时 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.生产工时" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=辅助工时 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.辅助工时" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=班次安排 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.班次安排" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=排单备注 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.排单备注" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=最早开工时间 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.最早开工时间" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=计划开工时间 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.计划开工时间" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=计划完工时间 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.计划完工时间" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=销售订单号 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.销售订单号" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+<!--                  <el-table-column v-slot="scope" align="left" label=印件/工序 width="110" >-->
+<!--                    <el-input disabled  v-model="scope.row.印件/工序" :clearable="false"/>-->
+<!--                  </el-table-column>-->
+                </el-table>
               </div>
 
             </el-dialog>
@@ -111,8 +167,6 @@
                   <el-form-item label="" prop="currentProcess" style="margin-right: 20px; padding: 0px">
                     <el-input v-model="gxclhcformData['gdmc']" disabled placeholder="" style="width: 340px;"/>
                   </el-form-item>
-
-
                 </div>
               </div>
 
@@ -122,26 +176,26 @@
               <el-form-item>
                 <!--按钮-->
                 <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 200px;"></el-input>
-                <el-button type="primary" icon="search" @click="onSubmit" style="margin: 5px 5px 5px 10px">查询</el-button>
-                <el-button type="primary" icon="edit" @click="onStatusClick" style="margin: 5px">状态设置</el-button>
+                <el-button type="primary" icon="search" disabled @click="onSubmit" style="margin: 5px 5px 5px 10px">查询</el-button>
                 <div v-if="treeType === 'customTree'">
-                <el-button type="primary" icon="edit" @click="ongxztgzClick" 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="ongxztgzClick" style="margin: 5px">工序状态更正</el-button>
                 </div>
                 <div v-else>
-                <el-button type="primary" icon="edit" disabled @click="onjrpcClick" style="margin: 5px">加入排产</el-button>
-                <el-button type="primary" icon="edit" disabled @click="onztwgClick" style="margin: 5px">暂停排产</el-button>
-                <el-button type="primary" icon="edit" disabled @click="ongxwgClick" style="margin: 5px">工序完工</el-button>
-                <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>
-                <el-button type="primary" icon="edit" disabled @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>
+                <el-button type="primary" icon="edit"  @click="onjrpcClick" style="margin: 5px">加入排产</el-button>
+                <el-button type="primary" icon="edit"  @click="onztwgClick" style="margin: 5px">暂停排产</el-button>
+                <el-button type="primary" icon="edit"  @click="ongxwgClick" style="margin: 5px">工序完工</el-button>
+<!--                <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>-->
+<!--                <el-button type="primary" icon="edit" disabled @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>-->
                 </div>
-                <el-button type="primary" icon="edit" disabled @click="onprintClick" style="margin: 5px">工单打印</el-button>
-                <el-button type="primary" icon="edit" disabled @click="ongxclhcClick" style="margin: 5px">工序产量核查</el-button>
-                <el-button type="primary" icon="edit" disabled @click="onlcdlistClick" style="margin: 5px">流程单查询</el-button>
+<!--                <el-button type="primary" icon="edit" disabled @click="onprintClick" style="margin: 5px">工单打印</el-button>-->
+<!--                <el-button type="primary" icon="edit" disabled @click="ongxclhcClick" style="margin: 5px">工序产量核查</el-button>-->
+<!--                <el-button type="primary" icon="edit" disabled @click="onlcdlistClick" style="margin: 5px">流程单查询</el-button>-->
               </el-form-item>
             </el-form>
           </div>
 
-          <div class="gva-table-box">
+          <div class="gva-table-box"  v-if="treeType === 'customTree'">
             <el-table ref="multipleTable" style="width: 100%;height: 30vh"
                       :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                       :header-cell-style="{ padding: '0px' }" border
@@ -154,55 +208,56 @@
             </el-table>
           </div>
 
-            <el-tabs v-model="activeName" type="card" @tab-click="handleClick" v-if="currentNode == '计划中' || currentNode == '已完工'">
-              <el-tab-pane label="工艺资料"  @click="showTable('工艺资料')"  name="first">
-                <el-table ref="multipleTable" :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="gytableData" row-key="ID" @selection-change="handleSelectionChange">
-                  <el-table-column align="left" label="工单编号" prop="工单编号"  width="90"/>
-                  <el-table-column align="left" label="重点工序" prop="重点工序"  width="90"/>
-                  <el-table-column align="left" label="印件工序及名称" prop="印件工序及名称"  width="500"/>
-                  <el-table-column align="left" label="工序备注" prop="工序备注"  width="150"/>
-                  <el-table-column align="left" label="机组" prop="机组"  width="80"/>
-                  <el-table-column align="left" label="小时产能" prop="小时产能"  width="90"/>
-                  <el-table-column align="left" label="生产工时" prop="生产工时"  width="90"/>
-                  <el-table-column align="left" label="辅助工时" prop="辅助工时"  width="90"/>
-                  <el-table-column align="left" label="印刷方式" prop="印刷方式"  width="90"/>
-                  <el-table-column align="left" label="版距" prop="版距"  width="70"/>
-                  <el-table-column align="left" label="创建用户" prop="创建用户"  width="100"/>
-                  <el-table-column align="left" label="创建时间" prop="创建时间"  width="110"/>
-                  <el-table-column align="left" label="修改时间" prop="修改时间"  width="110"/>
-                  <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="90"/>
-                </el-table>
-              </el-tab-pane>
-
-              <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="second">
-                <el-table ref="multipleTable" :row-style="{ height: '20px' }"
-                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-                          :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="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 align="left" label="工单编号" prop="工单编号"  width="90"/>
-                  <el-table-column align="left" label="印件号" prop="印件号"  width="70"/>
-                  <el-table-column align="left" label="印件代号" prop="印件代号"  width="100"/>
-                  <el-table-column align="left" label="印件名称" prop="印件名称"  width="240"/>
-                  <el-table-column align="left" label="纸张名称" prop="纸张名称"  width="230"/>
-                  <el-table-column align="left" label="投料规格" prop="投料规格"  width="100"/>
-                  <el-table-column align="left" label="成品数量" prop="成品数量"  width="90"/>
-                  <el-table-column align="left" label="实际投料" prop="实际投料"  width="90"/>
-                  <el-table-column align="left" label="投料单位" prop="投料单位"  width="85"/>
-                  <el-table-column align="left" label="平张投料" prop="平张投料"  width="90"/>
-                  <el-table-column align="left" label="联数" prop="联数"  width="70"/>
-                  <el-table-column align="left" label="开数" prop="开数"  width="70"/>
-                  <el-table-column align="left" label="创建用户" prop="创建用户"  width="110"/>
-                  <el-table-column align="left" label="创建时间" prop="创建时间"  width="110"/>
-                  <el-table-column align="left" label="修改时间" prop="修改时间"  width="110"/>
-                  <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="90"/>
-                </el-table>
-              </el-tab-pane>
-            </el-tabs>
+          <el-tabs v-model="activeName" type="card" @tab-click="handleClick" v-if="(currentNode == '计划中' || currentNode == '已完工') &&  treeType === 'customTree'">
+            <el-tab-pane label="工艺资料"  @click="showTable('工艺资料')"  name="first">
+              <el-table ref="multipleTable" :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="gytableData" row-key="ID" @selection-change="handleSelectionChange">
+                <el-table-column align="left" label="工单编号" prop="工单编号"  width="90"/>
+                <el-table-column align="left" label="重点工序" prop="重点工序"  width="90"/>
+                <el-table-column align="left" label="印件工序及名称" prop="印件工序及名称"  width="500"/>
+                <el-table-column align="left" label="工序备注" prop="工序备注"  width="150"/>
+                <el-table-column align="left" label="机组" prop="机组"  width="80"/>
+                <el-table-column align="left" label="小时产能" prop="小时产能"  width="90"/>
+                <el-table-column align="left" label="生产工时" prop="生产工时"  width="90"/>
+                <el-table-column align="left" label="辅助工时" prop="辅助工时"  width="90"/>
+                <el-table-column align="left" label="印刷方式" prop="印刷方式"  width="90"/>
+                <el-table-column align="left" label="版距" prop="版距"  width="70"/>
+                <el-table-column align="left" label="创建用户" prop="创建用户"  width="100"/>
+                <el-table-column align="left" label="创建时间" prop="创建时间"  width="110"/>
+                <el-table-column align="left" label="修改时间" prop="修改时间"  width="110"/>
+                <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="90"/>
+              </el-table>
+            </el-tab-pane>
+
+            <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="second">
+              <el-table ref="multipleTable" :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="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 align="left" label="工单编号" prop="工单编号"  width="90"/>
+                <el-table-column align="left" label="印件号" prop="印件号"  width="70"/>
+                <el-table-column align="left" label="印件代号" prop="印件代号"  width="100"/>
+                <el-table-column align="left" label="印件名称" prop="印件名称"  width="240"/>
+                <el-table-column align="left" label="纸张名称" prop="纸张名称"  width="230"/>
+                <el-table-column align="left" label="投料规格" prop="投料规格"  width="100"/>
+                <el-table-column align="left" label="成品数量" prop="成品数量"  width="90"/>
+                <el-table-column align="left" label="实际投料" prop="实际投料"  width="90"/>
+                <el-table-column align="left" label="投料单位" prop="投料单位"  width="85"/>
+                <el-table-column align="left" label="平张投料" prop="平张投料"  width="90"/>
+                <el-table-column align="left" label="联数" prop="联数"  width="70"/>
+                <el-table-column align="left" label="开数" prop="开数"  width="70"/>
+                <el-table-column align="left" label="创建用户" prop="创建用户"  width="110"/>
+                <el-table-column align="left" label="创建时间" prop="创建时间"  width="110"/>
+                <el-table-column align="left" label="修改时间" prop="修改时间"  width="110"/>
+                <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="90"/>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
 
+          <div v-if="treeType === 'customTree'">
             <el-table ref="multipleTable2"
                       v-if="['排程中', '制程中'].includes(currentNode)"
                       :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
@@ -213,7 +268,76 @@
                 <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
               </template>
             </el-table>
+          </div>
 
+          <div v-if="treeType === 'dataTree'">
+            <el-table ref="chejianRef"
+                      :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"  @row-click="chejianRowClick"
+                      style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange">
+              <el-table-column type="selection" width="55" />
+              <template v-for="item in [
+                  { align:'center', title: '工单编号', prop: '工单编号', width: 160  },
+                  { align:'center', title: '销售订单号', prop: '销售订单号', width: 200  },
+                  { align:'center', title: '印件名称', prop: '印件名称', width: 320  },
+                  { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200  },
+                  { align:'center', title: '工序产量', prop: '工序产量', width: 120  },
+                  { align:'center', title: '已完成产量', prop: '已完成产量', width: 160  },
+                  { align:'center', title: '产品名称', prop: '产品名称', width: 320  },
+                  { align:'center', title: '订单数量', prop: '订单数量', width: 120  },
+                  { align:'center', title: '计量单位', prop: '计量单位', width: 120  },
+                  { align:'center', title: '交货日期', prop: '交货日期', width: 140  },
+                  { align:'center', title: '产品代号', prop: '产品代号', width: 140  },
+                  { align:'center', title: '工序名称', prop: '工序名称', width: 120  },
+                  { align:'center', title: '机组', prop: '机组', width: 120  },
+                  { align:'center', title: '设备编号', prop: '设备编号', width: 120  },
+                  { align:'center', title: 'UNIQID', prop: 'UNIQID', width: 140  },
+                  { align:'center', title: '印件号', prop: '印件号', width: 100  },
+                  { align:'center', title: '工序号', prop: '工序号', width: 100  },
+              ]">
+                <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
+              </template>
+            </el-table>
+            <el-table ref="chejianfuRef"
+                      :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"  @row-click="chejianfuRowClick"
+                      style="width: 100%;height: 40vh;margin-top: 10px" border tooltip-effect="dark" :data="chejianfuData" row-key="ID" @selection-change="ZP_handleChange">
+              <el-table-column type="selection" width="55" />
+              <template v-for="item in [
+                  { align:'center', title: '工单编号', prop: '工单编号', width: 160  },
+                  { align:'center', title: '销售订单号', prop: '销售订单号', width: 200  },
+                  { align:'center', title: '印件名称', prop: '印件名称', width: 320  },
+                  { align:'center', title: '印件工序及名称', prop: '印件工序及名称', width: 200  },
+                  { align:'center', title: '工序产量', prop: '工序产量', width: 120  },
+                  { align:'center', title: '已完成产量', prop: '已完成产量', width: 160  },
+                  { align:'center', title: '小时产能', prop: '小时产能', width: 120  },
+                  { align:'center', title: '产能系数', prop: '产能系数', width: 120  },
+                  { align:'center', title: '生产工时', prop: '生产工时', width: 120  },
+                  { align:'center', title: '辅助工时', prop: '辅助工时', width: 140  },
+                  { align:'center', title: '最早开工时间', prop: '最早开工时间', width: 160  },
+                  { align:'center', title: '计划开工时间', prop: '计划开工时间', width: 160  },
+                  { align:'center', title: '计划完工时间', prop: '计划完工时间', width: 160  },
+                  { align:'center', title: '班次安排', prop: '班次安排', width: 120  },
+                  { align:'center', title: '排单备注', prop: '排单备注', width: 120  },
+                  { align:'center', title: '产品名称', prop: '产品名称', width: 180  },
+                  { align:'center', title: '订单数量', prop: '订单数量', width: 120  },
+                  { align:'center', title: '计量单位', prop: '计量单位', width: 120  },
+                  { align:'center', title: '交货日期', prop: '交货日期', width: 140  },
+                  { align:'center', title: '优先次序', prop: '优先次序', width: 140  },
+                  { align:'center', title: '产品代号', prop: '产品代号', width: 140  },
+                  { align:'center', title: '工序名称', prop: '工序名称', width: 120  },
+                  { align:'center', title: '设备编号', prop: '设备编号', width: 120  },
+                  { align:'center', title: '车间名称', prop: '车间名称', width: 120  },
+                  { align:'center', title: 'GYUID', prop: 'GYUID', width: 140  },
+                  { align:'center', title: '印件号', prop: '印件号', width: 100  },
+                  { align:'center', title: '工序号', prop: '工序号', width: 100  },
+              ]">
+                <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
+              </template>
+            </el-table>
+          </div>
         </el-main>
       </layout-content>
     </layout>
@@ -252,12 +376,15 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, reactive } from 'vue'
 import {
   DataList, getProduct, getProductData,scheduleProcess,ProductionSchedulingAdd,
-  Project, StatusEdit, EquipmentScheduling, ScheduleSelection,
-  projectCraft, ProcessStatusCorrection,WorkOrderSearch,
-  projectPrint, setProductStatus, workbench, ProcessFlow, Schedule
+  Project, StatusEdit, EquipmentScheduling, ScheduleSelection,MachineWorkOrderList,
+  projectCraft, ProcessStatusCorrection,WorkOrderSearch,ProductionSchedulingPause,
+  projectPrint, setProductStatus, workbench, ProcessFlow, Schedule,complete
 } from "@/api/yunyin/yunying";
 defineOptions({name: 'Company'})
 
+const chejianData = ref([])
+const chejianfuData = ref([])
+
 // =========== 左侧树侧形结构 ===========
 const sctreeData = ref([
   {
@@ -348,7 +475,7 @@ const tableFields = ref(
 //下方表格
 const bottomTableF = ref({
   "排程中": [
-    { title:'工单编号', prop: '工单编号', width: 80, align:'left', },
+    { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
     { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
     { title:'机组', prop: '机组', width: 120, align:'left', },
     { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
@@ -369,7 +496,7 @@ const bottomTableF = ref({
     { title:'UNIQID', prop: 'UNIQID', width: 120, align:'left', },
   ],
   "制程中": [
-    { title:'工单编号', prop: '工单编号', width: 80, align:'left', },
+    { title:'工单编号', prop: '工单编号', width: 90, align:'left', },
     { title:'印件工序及名称', prop: '印件工序及名称', width: 160, align:'left', },
     { title:'机组', prop: '机组', width: 120, align:'left', },
     { title:'设备编号', prop: '设备编号', width: 120, align:'left', },
@@ -664,6 +791,7 @@ const gdtableRowClick = async (row) => {
 
 //点击左侧树形获取表格列表
 const tableData = ref([]);
+const _machine = ref(null);
 const treeType = ref('customTree') // dataTree // 计划中,排产中 ,dataTree 车间
 const handleNodeClick = async (node) => {
   if (node.type && node.type === '__customer') {
@@ -676,12 +804,17 @@ const handleNodeClick = async (node) => {
     const dataBeforeHash = custom_code.split('#')[0].trim();
     const machine = dataBeforeHash + '#';
     console.log(machine)
-    // const EquipmentScheduling_list = await 接口({machine:machine});
-    // console.log(EquipmentScheduling_list);
+    _machine.value = machine;
+
+    const zhubiao = await MachineWorkOrderList({ machine, status: '排程' })
+    const  fubiao = await MachineWorkOrderList({ machine, status: '制程' })
+    // console.log(zhubiao, fubiao)
+
+    chejianData.value = zhubiao.data;
+    chejianfuData.value = fubiao.data;
   }
 };
 
-
 const searchInfo = ref('');
 // 提交搜索
 const onSubmit = () => {
@@ -708,7 +841,16 @@ const _WorkOrderSearch = async () => {
   }
 };
 
-
+// const paichengForm = ref([])
+// const paichengData = ref([
+//   {
+//     优先次序: 1, 工单编号: 1000, 印件名称: 'test',接货数: 111,
+//     小时产能: 1, 产能系数: 1.5, 生产工时: 333, 辅助工时: 222,
+//     班次安排: '1111', 排单备注: '备注备注', 最早开工时间: '2023-01-01 08:08:08',
+//     计划开工时间: '2023-01-01 08:08:08', 计划完工时间: '2023-01-01 08:08:08',
+//     销售订单号: '3335555', '印件/工序': '321312',
+//   }
+// ])
 
 
 // =========== 【工序状态更正】 ===========
@@ -742,61 +884,116 @@ const gxztgzzCancel = () => {
   gxztgzzlist.value = false;
 };
 
-
+//点击车间表格【获取车间工单编号】
+// const _PC_gdbh = ref(null)
+// const chejianRowClick = (row) => {
+//   // console.log(row['工单编号'])
+//   _PC_gdbh.value = row['工单编号'];
+// };
 //加入排产【按钮】
 const onjrpcClick = async () => {
-  if(_Gd_gdbh.value == null){
-    onstatuslist.value = false;
-    ElMessage({
-      type: 'warning',
-      message: '请选择树形后,再操作此功能'
-    })
+  if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
+    ElMessage({type: 'warning',message: '请选择排程中工单'})
   }else{
     let params = {}
-    params.workOrder = _Gd_gdbh.value;
-    params.machine = 'JY01#';
+    // params.workOrder = '2311116';
+    // params.machine = 'JY01#';
+    params.workOrder = _PC_gdbh.value;
+    params.machine = _machine.value;
     params.printCode = 1;
     params.processCode = 1;
+    console.log(params)
     const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
     console.log(ProductionSchedulingAdd_add)
-    // if (ProductionSchedulingAdd_add .code === 0) {
-    //   ElMessage({type: 'success',message: '更新成功'})
-    // } else {
-    //   console.log(ygjbzledit_eddt);
-    //   ElMessage({ type: 'error',message: '更新失败'})
-    // }
+    if (ProductionSchedulingAdd_add .code === 0) {
+      const  fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
+      chejianfuData.value = fubiao.data;
+      ElMessage({type: 'success',message: '加入排产 更新成功'});
+    } else {
+      ElMessage({ type: 'error',message: '更新失败'})
+    }
   }
 };
 
+// const _ZC_gdbh = ref(null)
+// const chejianfuRowClick = (row) => {
+//   // console.log(row['工单编号'])
+//   _ZC_gdbh.value = row['工单编号'];
+// };
+
 //暂停排产【按钮】
 const onztwgClick = async () => {
-  if(_Gd_gdbh.value == null){
-    onstatuslist.value = false;
-    ElMessage({
-      type: 'warning',
-      message: '请选择树形后,再操作此功能'
-    })
+  if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
+    ElMessage({type: 'warning', message: '请选择制程中工单'})
   }else{
     let params = {}
-    params.workOrder = _Gd_gdbh.value;
-    params.machine = 'JY01#';
+    // params.workOrder = '2311116';
+    // params.machine = 'JY01#';
+    params.workOrder = _ZC_gdbh.value;
+    params.machine = _machine.value;
     params.printCode = 1;
     params.processCode = 1;
+    console.log(params)
+
     const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
     console.log(ProductionSchedulingAdd_stop)
-    // if (ProductionSchedulingAdd_stop .code === 0) {
-    //   ElMessage({type: 'success',message: '更新成功'})
-    // } else {
-    //   console.log(ygjbzledit_eddt);
-    //   ElMessage({ type: 'error',message: '更新失败'})
-    // }
+    if (ProductionSchedulingAdd_stop .code === 0) {
+
+      const zhubiao = await MachineWorkOrderList({ machine:_machine.value, status: '排程' });
+      chejianData.value = zhubiao.data;
+      ElMessage({type: 'success',message: '暂停排产 更新成功'});
+    } else {
+      console.log(ygjbzledit_eddt);
+      ElMessage({ type: 'error',message: '更新失败'})
+    }
   }
 };
 
 //工序完工【按钮】
 const ongxwgClick = async () => {
-
+  if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
+    onstatuslist.value = false;
+    ElMessage({
+      type: 'warning',
+      message: '请选择制程中工单'
+    })
+  }else{
+    // let combinedValue = `${_ZC_gdbh.value},${_PC_gdbh.value}`;
+    // console.log(combinedValue);
+    let params = {}
+    params.workOrder = _ZC_gdbh.value;
+    params.processCode = _gxh.value;
+    console.log(params)
+    const complete_get = await complete(params);
+    console.log(complete_get)
+    if (complete_get .code === 0) {
+      const  fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
+      chejianfuData.value = fubiao.data;
+      ElMessage({type: 'success',message: '工序完工 更新成功'})
+    } else {
+      ElMessage({ type: 'error',message: '更新失败'})
+    }
+  }
 };
+//加入排程【上面到下面】
+const _PC_gdbh = ref(null)
+const PC_handleChange = (arr) => {
+  let str = arr.map((val) => val['工单编号']).join(",");
+  console.log(str);
+  _PC_gdbh.value = str;
+}
+//加入制程【下面到上面】
+const _ZC_gdbh = ref(null)
+const _gxh = ref(null)
+const ZP_handleChange = (arr) => {
+  console.log(arr)
+  let str = arr.map((val) => val['工单编号']).join(",");
+  let gxh = arr.map((val) => val['gxh']).join(",");
+  console.log(str);
+  console.log(gxh);
+  _ZC_gdbh.value = str;
+  _gxh.value = gxh;
+}
 
 //机组调整【按钮】
 const onjztzClick = async () => {
@@ -932,6 +1129,7 @@ const handleSelectionChange = (val) => {
   multipleSelection.value = val
 }
 
+
 // 行为控制标记(弹窗内部需要增还是改)
 const type = ref('')
 
@@ -981,7 +1179,7 @@ const _ScheduleSelectiondata = async ()=>{
 
     // 循环遍历数组并将每个班次的detail添加到bancis数组中
     for (const option of ScheduleSelectiondata.data) {
-      cjsbpcformData.bancis.push(option.detail);
+      cjsbpcformData.bancis.push({ label: option.detail, value: option.detail.split('||')[0], rename:option.detail});
     }
     console.log("赋值后的数据:", cjsbpcformData.bancis);
   } catch (error) {
@@ -1018,6 +1216,9 @@ const cjsbpcCancel = () => {
 
 </script>
 <style scoped>
+:deep(.el-tabs__header){
+  margin-bottom: 0;
+}
 :deep(.el-table td .cell) {
   line-height: 30px !important;
 }

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