liuhairui 2 недель назад
Родитель
Сommit
16d9947b50

+ 57 - 0
src/api/jixiaoguanli/baogong.js

@@ -9,3 +9,60 @@ export const getMac = (data) => {
   })
 }
 
+/**
+ * 工分报工
+ */
+
+//获取大工序和人员信息
+export const getMajorprocessAndPerson = (params) => {
+  return service({
+    url: '/mes_server/reporting_work/getMajorprocessAndPerson',
+    method: 'get', 
+    params
+  })
+}
+
+//获取订单车缝部件信息或其他大工序工艺数据
+export const GetOrderProcess = (params) => {
+  return service({
+    url: '/mes_server/reporting_work/GetOrderProcess',
+    method: 'get',
+    params
+  })
+}
+
+//获取车缝部件的工艺资料
+export const GetCarProcess = (params) => {
+  return service({
+    url: '/mes_server/reporting_work/GetCarProcess',
+    method: 'get',
+    params
+  })
+}
+
+//工分报工
+export const ReportingWork = (data) => {
+  return service({
+    url: '/mes_server/reporting_work/ReportingWork',
+    method: 'post',
+    data
+  })
+}
+
+//报工工分数据表左侧菜单栏
+export const GetReportingWorkLeft = (params) => {
+  return service({
+    url: '/mes_server/reporting_work/GetReportingWorkLeft',
+    method: 'get',
+    params
+  })
+}
+
+//机台报工数据
+export const GetReportingWorkData = (params) => {
+  return service({
+    url: '/mes_server/reporting_work/GetReportingWorkData',
+    method: 'get',
+    params
+  })
+}

+ 21 - 4
src/api/mes/job.js

@@ -256,11 +256,28 @@ export const UnapprovalList = (params) => {
   })
 }
 
+//辅料计划入库时间更新
+export const AccessoriesInboundTime = (data) => {
+  return service({
+    url: '/mes_server/manufacture/AccessoriesInboundTime',
+    method: 'post',
+    data
+  })
+}
+
+//收发左侧菜单
+export const getDateNodes = (params) => {
+  return service({
+    url: '/mes_server/manufacture/getDateNodes',
+    method: 'get',
+    params
+  })
+}
 
-//月度订单工序左侧菜单
-export const dateList = (params) => {
+//获取产量计酬详情数据
+export const getCfdataDetail = (params) => {
   return service({
-    url: '/mes_server/manufacture/dateList',
+    url: '/mes_server/manufacture/getCfdataDetail',
     method: 'get',
     params
   })
@@ -917,7 +934,7 @@ export const ApiSubPieceAnd = (params) => {
   return service({
     url: '/mes_server/Facility/ApiSubPieceAnd',
     method: 'get',
-    params
+    params 
   })
 }
 

+ 215 - 0
src/view/performance/WorkScoreReporting/WorkReportEntry.vue

@@ -0,0 +1,215 @@
+<template>
+  <div class="work-report-entry">
+    <div class="container">
+      <!-- 左侧块 -->
+      <div class="left-block" @click="navigateToReporting">
+        <h2>产量报工</h2>
+        <p v-if="process">当前工序: {{ process }}</p>
+        <p v-else>正在检测工序...</p>
+      </div>
+       
+      <!-- 右侧块 -->
+      <div class="right-block" @click="navigateToGongfen">
+        <h2>工分报工</h2>
+        <p>点击进入工分报工</p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { ElMessage } from 'element-plus'
+import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
+
+defineOptions({ name: 'WorkReportEntry' })
+
+const router = useRouter()
+const Machine = ref('')
+const process = ref('')
+
+// 物理地址获取机台编号和工序
+const getMachineMacdata = async () => {
+  try {
+    const data = await getMachineMac({ sys_sbID: Machine.value })
+    if (data.data === null) {
+      ElMessage({
+        type: 'warning',
+        message: '未获取到机台信息,使用默认工序'
+      })
+      process.value = '默认工序'
+      return
+    }
+    process.value = data.data['生产工序']
+  } catch (error) {
+    console.error('获取机台信息失败:', error)
+    ElMessage({
+      type: 'error',
+      message: '获取机台信息失败'
+    })
+  }
+}
+
+// 自动获取物理地址
+const GetAddr = () => {
+  var xmlhttp = null
+  if (window.XMLHttpRequest) {
+    xmlhttp = new XMLHttpRequest()
+  } else if (window.ActiveXObject) {
+    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
+  }
+  
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+      try {
+        const res = JSON.parse(xmlhttp.response)
+        let result = ''
+        for (let i = 0; i < res.macAddress.length; i++) {
+          if (i % 2 === 0 && i !== 0) {
+            result += '-' // 根据实际需求修改分隔符
+          }
+          result += res.macAddress[i]
+        }
+        Machine.value = result
+        getMachineMacdata()
+      } catch (error) {
+        console.error('解析物理地址失败:', error)
+        ElMessage({
+          type: 'error',
+          message: '获取物理地址失败'
+        })
+      }
+    }
+  }
+  
+  xmlhttp.open("get", "http://127.0.0.1:8090/init")
+  xmlhttp.send()
+}
+
+// 导航到报工页面
+const navigateToReporting = () => {
+  if (!process.value) {
+    ElMessage({
+      type: 'warning',
+      message: '请等待工序检测完成'
+    })
+    return
+  }
+  
+  // 根据工序跳转到对应页面
+  const routeMap = {
+    '裁剪': '/layout/baogong/caiqiebaogong',
+    '车缝': '/layout/baogong/chafengbaogong',
+    '后道': '/layout/baogong/houdaobaogong',
+    '大烫': '/layout/baogong/datangbaogong',
+    '总检': '/layout/baogong/zongjianbaogong',
+    '包装': '/layout/baogong/baozhuangbaogong'
+    // 可以根据实际需求添加更多工序映射
+  }
+  
+  const route = routeMap[process.value]
+  if (route) {
+    router.push(route)
+  } else {
+    ElMessage({
+      type: 'warning',
+      message: `未找到${process.value}对应的报工页面`
+    })
+  }
+}
+
+// 导航到工分报工页面
+const navigateToGongfen = () => {
+  router.push('/layout/baogong/gongfenbaogong')
+}
+
+onMounted(() => {
+  GetAddr()
+})
+</script>
+
+<style scoped>
+.work-report-entry {
+  width: 100%;
+  height: 100vh;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #f5f7fa;
+}
+
+.container {
+  width: 70%;
+  height: 50%;
+  display: flex;
+  gap: 20px;
+}
+
+.left-block,
+.right-block {
+  flex: 1;
+  background-color: white;
+  border-radius: 8px;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+  transition: all 0.3s ease;
+  padding: 20px;
+}
+
+.left-block:hover,
+.right-block:hover {
+  transform: translateY(-3px);
+  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
+}
+
+.left-block {
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+  color: white;
+}
+
+.right-block {
+  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
+  color: white;
+}
+
+.left-block h2,
+.right-block h2 {
+  font-size: 18px;
+  margin-bottom: 15px;
+  font-weight: bold;
+}
+
+.left-block p,
+.right-block p {
+  font-size: 14px;
+  text-align: center;
+}
+
+@media screen and (max-width: 768px) {
+  .container {
+    flex-direction: column;
+    height: 60%;
+    width: 80%;
+  }
+  
+  .left-block,
+  .right-block {
+    height: 45%;
+  }
+  
+  .left-block h2,
+  .right-block h2 {
+    font-size: 16px;
+  }
+  
+  .left-block p,
+  .right-block p {
+    font-size: 12px;
+  }
+}
+</style>

+ 1251 - 0
src/view/performance/WorkScoreReporting/gongfenbaogong.vue

@@ -0,0 +1,1251 @@
+<template>
+  <div>
+    <layout>
+      <layout-content >
+        <div class="gva-table-box">
+            <div style="display: flex; align-items: baseline; margin-bottom: 10px;">
+                <h1 style="margin: 0;">{{_code}}工分报工</h1>
+            </div>
+              <el-row :gutter="10" style="align-items: center; margin-bottom: 20px;">
+                <!-- 子订单编号输入框 -->
+                <el-col :span="4"  style="padding: 0px;margin: 0px;">
+                  <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号条码"@keyup.enter="add_onSubmit" id="searchInput" style="width: 100%; height: 50px;"/>
+                </el-col>
+              
+                <!-- 查询按钮 -->
+                <el-col :span="1.5"  style="padding: 0px;margin: 0px;">
+                  <el-button type="primary" icon="search" @click="add_onSubmit"style="height: 50px;width: 80px;">查询</el-button>
+                </el-col>
+                
+
+              
+                <el-col :span="1.5" style="padding: 0px;margin: 0px;">
+                  <el-text style="font-size: 30px;">机台号</el-text>
+                </el-col>
+                <!-- 机台号输入框 -->
+                <el-col :span="2"><el-input v-model="add_formData['机台号']" readonly style="width: 100%; height: 40px;"/></el-col>
+                 
+                <el-col :span="1.5" style="padding: 0px;margin: 0px;">
+                    <el-text style="font-size: 30px;">工序</el-text>
+                </el-col>
+                <!-- 工序输入框 -->
+                <el-col :span="2"><el-input v-model="add_formData['工序']"  readonly  style="width: 100%; height: 40px;" /></el-col>
+              
+                <el-col :span="1.5" style="padding: 0px;margin: 0px;">
+                    <el-text style="font-size: 30px;">组别</el-text>
+                </el-col>
+                <!-- 组别输入框 -->
+                <el-col :span="2"><el-input v-model="add_formData['组别']" readonly  style="width: 100%; height: 40px;" /></el-col>
+              
+
+              </el-row>
+              
+              <!-- 订单信息显示区域 -->
+              <div v-if="orderInfoList.length > 0" style="margin-top: 20px; margin-bottom: 20px;">
+                <h3 style="font-size: 20px; margin-bottom: 15px;">订单信息</h3>
+                <el-table :data="orderInfoList" style="width: 100%">
+                  <el-table-column prop="订单编号" label="订单编号" width="180" />
+                  <el-table-column prop="生产款号" label="生产款号" width="250" />
+                  <el-table-column prop="款式" label="款式" width="150" />
+                </el-table>
+              </div>
+              
+              <!-- 员工选择区域 -->
+              <div style="margin-top: 20px; margin-bottom: 20px;">
+                <h3 style="font-size: 20px; margin-bottom: 15px;">选择操作上报人员</h3>
+                <div class="employee-grid" style="display: inline-grid; vertical-align: top;">
+                  <div 
+                    v-for="employee in employees" 
+                    :key="employee['员工编号']"
+                    class="employee-card"
+                    :class="{ selected: selectedEmployee === employee['员工编号'] }"
+                    @click="selectEmployee(employee)"
+                  >
+                    <div class="employee-avatar" :style="{ backgroundColor: getAvatarColor(employee['员工编号']) }">
+                      {{ employee['员工姓名'].charAt(0) }}
+                    </div>
+                    <div class="employee-name">{{ employee['员工姓名'] }}</div>
+                    <div class="employee-id">{{ employee['员工编号'] }}</div>
+                  </div>
+                  <!-- 工分报工按钮 -->
+                  <div style="display: flex; align-items: center; justify-content: center; padding: 15px;">
+                    <el-button type="success" icon="document" @click="openWorkScoreDialog" style="height: 80px; width: 120px; font-size: 18px;">工分报工</el-button>
+                  </div>
+                </div>
+              </div>
+            
+              <el-main>
+                <!-- 表格数据 -->
+                  <el-tabs v-model="activeName">
+                      <el-tab-pane label="报工历史记录"   @click="showTable('报工历史记录')" name="first">
+                        <el-table ref="multipleTable" style="width: 100%;height: 52vh" tooltip-effect="dark"
+                                  :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
+                                  :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
+                                  :data="bgjdhz_tableData"  border row-key="ID"
+                                  size="small" 
+                                  highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                                  @row-click="tableRowClick" :show-overflow-tooltip="true">
+                                  <el-table-column align="left" label="报工时间"    prop="sys_rq"      width="150"/>
+                                  <el-table-column align="left" label="子订单编号" prop="子订单编号"    width="130"/>
+                                  <el-table-column align="left" label="生产款号"  prop="款号"    width="120"/>
+                                  <el-table-column align="left" label="款式"      prop="款式"      width="100"/>
+                                  <el-table-column align="left" label="组别"      prop="sczl_jtbh"      width="80"/>
+                                  <el-table-column align="left" label="尺码"      prop="尺码"      width="70"/>
+                                  <el-table-column align="left" label="实裁数量"      prop="数量"      width="100"/>
+                        </el-table>
+                      </el-tab-pane>
+                      
+                      
+                    <el-tab-pane label="产量进度汇总记录"   @click="showTable('产量进度汇总记录')" name="two">
+                        <el-table ref="multipleTable" style="width: 100%;height: 52vh" tooltip-effect="dark"
+                                  :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
+                                  :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
+                                  :data="jdhz_tableData"  border row-key="ID"
+                                  size="small" 
+                                  show-summary  :summary-method="getSummaries"
+                                  highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                                  @row-click="tableRowClick" :show-overflow-tooltip="true">
+                                  <el-table-column  align="left" label="订单子编号" prop="子订单编号"  width="130"/>
+                                  <el-table-column  align="left" label="款号" prop="款号" width="140" />
+                                  <el-table-column  align="left" label="色系名称" prop="颜色" width="100" />
+                                  <el-table-column v-for="item in sizeDatas" :key="item" align="left" :label="item" :prop="item" width="60" :cell-style="cellStyle">
+                                    <template v-slot="scope">
+                                        <div style="width: 80px;" @click="handleSizeClick(scope.$index, item, scope.row)">
+                                            {{ scope.row[item] }}
+                                        </div>
+                                    </template>
+                                  </el-table-column>
+                                  <el-table-column  align="left" label="实裁总数" 	 prop="裁剪数" width="90" />
+                                  <!-- <el-table-column  align="left" label="上报时间" prop="上报时间" width="160" /> -->
+                        </el-table>
+                    </el-tab-pane>
+                    
+                    <el-tab-pane label="订单资料附件" name="third">
+                      <el-table ref="multipleTable"
+                                :row-style="{ height: '30px' }"
+                                :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+                                :header-cell-style="{ padding: '0px' }"
+                                :show-overflow-tooltip="true"
+                                :cell-class-name="planUsageCellClass"
+                                highlight-current-row="true"
+                                @row-dblclick="gdbomupdateCompanyFunc"
+                                style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID">
+                       <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+                       <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+                       <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+                       <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+                       <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+                                     <el-table-column align="left" label="操作"width="100"fixed="right">
+                                       <template #default="scope">
+                                         <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+                                       </template>
+                                     </el-table-column>
+                      </el-table>
+                    </el-tab-pane> 
+                    
+                    
+                    <el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
+                        <el-table ref="multipleTable"
+                                          :row-style="{ height: '30px' }"
+                                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
+                                          :header-cell-style="{ padding: '0px' }"
+                                          :show-overflow-tooltip="true"
+                                          :cell-class-name="planUsageCellClass"
+                                          highlight-current-row="true"
+                                          @row-dblclick="ExcelShow"
+                                          style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID">
+                                      <el-table-column align="left" label="关联编号" prop="关联编号"  width="115"/>
+                                      <el-table-column align="left" label="备注" 	prop="附件备注"  width="110"/>
+                                      <el-table-column align="left" label="文件类型" prop="附件类型"  width="100"/>
+                                      <el-table-column align="left" label="建档时间" prop="sys_rq"  width="160"/>
+                                      <el-table-column align="left" label="建档用户" prop="sys_id"  width="200"/>
+                                      <el-table-column align="left" label="操作"width="100"fixed="right">
+                                        <template #default="scope">
+                                          <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button> 
+                                        </template>
+                                      </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+                    </el-tabs>
+                    
+                    </el-main>
+            </div>
+            
+                <!-- 是否订单尾包确认弹窗 -->
+                <el-dialog v-model="DialogVisible" title="是否订单尾包" destroy-on-close width="30%" style="top: 20%;">
+                    <h3>请再次确认是否该订单产品已全部报工,该批为订单尾包?</h3>
+                    <div class="dialog-footer" style="text-align: right;">
+                        <el-button @click="confirmDialogVisible">取消</el-button>
+                        <el-button type="primary" @click="handleConfirm">确认</el-button>
+                    </div>
+                </el-dialog>
+                
+                <!-- 工分报工对话框 -->
+                <el-dialog
+                  v-model="workScoreDialogVisible"
+                  :title="add_formData['工序'] + '工分报工'"
+                  width="100%"
+                  height="100%"
+                  fullscreen
+                >
+                  <div style="padding: 20px; display: flex; height: 85vh;">
+                    <!-- 左侧人员和订单信息 -->
+                    <div style="width: 30%; padding-right: 20px; border-right: 1px solid #e0e0e0;">
+                      <!-- 订单信息卡片 -->
+                      <div style="background-color: #333; color: white; padding: 20px; border-radius: 8px; margin-bottom: 20px;">
+                        <h3 style="margin-top: 0; font-size: 24px;">{{ add_searchInfo }}</h3>
+                        <p style="margin: 10px 0;">{{ orderInfoList.length > 0 ? orderInfoList[0]['生产款号'] : '' }}</p>
+                      </div>
+                      
+                      <!-- 选择操作上报人员 -->
+                      <h3 style="font-size: 18px; margin-bottom: 15px;">选择操作上报人员</h3>
+                      <div class="employee-grid" style="grid-template-columns: repeat(4, 1fr);">
+                        <div 
+                          v-for="employee in employees" 
+                          :key="employee['员工编号']"
+                          class="employee-card"
+                          :class="{ selected: selectedEmployee === employee['员工编号'] }"
+                          @click="selectEmployee(employee)"
+                        >
+                          <div class="employee-avatar" :style="{ backgroundColor: getAvatarColor(employee['员工编号']) }">
+                            {{ employee['员工姓名'].charAt(0) }}
+                          </div>
+                          <div class="employee-name">{{ employee['员工姓名'] }}</div>
+                          <div class="employee-id">{{ employee['员工编号'] }}</div>
+                        </div>
+                      </div>
+                      
+                      <!-- 订单信息 -->
+                      <div style="margin-top: 30px;">
+                        <h3 style="font-size: 18px; margin-bottom: 15px;">订单信息</h3>
+                        <div v-if="orderInfoList.length > 0">
+                          <p><strong>订单编号:</strong> {{ orderInfoList[0]['订单编号'] }}</p>
+                          <p><strong>生产款号:</strong> {{ orderInfoList[0]['生产款号'] }}</p>
+                          <p><strong>款式:</strong> {{ orderInfoList[0]['款式'] }}</p>
+                        </div>
+                        <p><strong>机台号:</strong> {{ add_formData['机台号'] }}</p>
+                        <p><strong>工序:</strong> {{ add_formData['工序'] }}</p>
+                        <p><strong>组别:</strong> {{ add_formData['组别'] }}</p>
+                      </div>
+                    </div>
+                    
+                    <!-- 右侧工艺部件信息 -->
+                    <div style="flex: 1; padding-left: 30px;">
+                      <h3 style="font-size: 20px; margin-bottom: 20px;">{{ add_formData['工序'] }}工艺</h3>
+                      
+                      <!-- 车缝工序:显示部件列表 -->
+                      <div v-if="add_formData['工序'] === '车缝' && processParts.length > 0">
+                        <div v-for="(part, index) in processParts" :key="part['部件编号']" style="margin-bottom: 20px;">
+                          <div style="display: flex; align-items: center; margin-bottom: 10px;">
+                            <h4 style="margin: 0; font-size: 16px;">部件: {{ part['部件名称'] }}</h4>
+                            <el-input v-model="partQuantities[index]" placeholder="填写上报数量" style="margin-left: auto; width: 150px;"></el-input>
+                          </div>
+                          
+                          <!-- 工艺列表 -->
+                          <div v-if="partProcesses[index] && partProcesses[index].length > 0">
+                            <div v-for="process in partProcesses[index]" :key="process['工艺编号']" style="margin-left: 20px; margin-bottom: 10px;">
+                              <el-input :value="process['工艺编号'] + ' ' + process['工艺名称']" readonly style="width: 400px;"></el-input>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                      
+                      <!-- 非车缝工序:直接显示工艺列表 -->
+                      <div v-else-if="add_formData['工序'] !== '车缝' && partProcesses.length > 0 && partProcesses[0].length > 0">
+                        <div style="margin-bottom: 20px;">
+                          <div style="display: flex; align-items: center; margin-bottom: 10px;">
+                            <h4 style="margin: 0; font-size: 16px;">工艺列表</h4>
+                            <el-input v-model="partQuantities[0]" placeholder="填写上报数量" style="margin-left: auto; width: 150px;"></el-input>
+                          </div>
+                          
+                          <!-- 工艺列表 -->
+                          <div>
+                            <div v-for="process in partProcesses[0]" :key="process['工艺编号']" style="margin-left: 20px; margin-bottom: 10px;">
+                              <el-input :value="process['工艺编号'] + ' ' + process['工艺名称']" readonly style="width: 400px;"></el-input>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                      
+                      <div v-else-if="loadingProcess" style="text-align: center; padding: 50px;">
+                        <el-loading-spinner></el-loading-spinner>
+                        <p style="margin-top: 10px;">加载中...</p>
+                      </div>
+                      <div v-else style="text-align: center; padding: 50px; color: #999;">
+                        暂无工艺信息
+                      </div>
+                    </div>
+                  </div>
+                  <template #footer>
+                    <span class="dialog-footer" style="text-align: right;">
+                      <el-button @click="workScoreDialogVisible = false">取消</el-button>
+                      <el-button type="primary" @click="submitWorkScore">提交</el-button>
+                    </span>
+                  </template>
+                </el-dialog>
+        </layout-content>
+      </layout>
+    <SubOrderPage ref="SubOrderPageRef" />
+    <!-- 子订单详情页 -->
+    <luckyexcelPage ref="luckyexcelPageRef" />
+    </div>
+  </template>
+<script>
+export default {
+  data() {
+    return {
+        currentTable: '', // 当前展示的表格
+        activeName: 'first',
+        dialogFormVisible: false,
+        formDataTest: {
+        imageUrl: '' // 添加一个字段来保存上传的图片路径
+        },
+        rule: {} // 初始化rule对象
+    };
+  }, 
+  methods: {
+    handleKeyDown(event, prevId, currentId, nextId) {
+      const currentElement = document.getElementById(currentId);
+      const isEmpty = currentElement.value === '';
+      const atStart = currentElement.selectionStart === 0;
+      const atEnd = currentElement.selectionStart === currentElement.value.length;
+      switch (event.keyCode) {
+        case 13: // Enter
+        case 40: // 向下箭头
+          if (nextId) {
+            document.getElementById(nextId).focus();
+          }
+          break;
+        case 38: // 向上箭头
+          if (prevId) {
+            document.getElementById(prevId).focus();
+          }
+          break;
+        case 8: // 删除键
+          if (prevId && (isEmpty || atStart)) {
+            document.getElementById(prevId).focus();
+          }
+          break;
+        case 37: // 向左箭头
+          if (prevId && atStart) {
+            document.getElementById(prevId).focus();
+          }
+          break;
+        case 39: // 向右箭头
+          if (nextId && atEnd) {
+            document.getElementById(nextId).focus();
+          }
+          break;
+        default:
+          break;
+      }
+    },
+  },
+};
+</script>
+<script setup>
+// 全量引入格式化工具 请按需保留
+import $script from 'scriptjs'
+import $ from 'jquery';
+import LuckyExcel from 'luckyexcel';
+import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+import {ref, reactive} from 'vue';
+import {getSpotList,getInfo,OrderAttachments,Apiorder} from '@/api/mes/job';
+import {getMac,getMajorprocessAndPerson,GetOrderProcess,GetCarProcess,ReportingWork} from '@/api/jixiaoguanli/baogong'
+import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
+import {ElMessage,ElMessageBox} from "element-plus";
+// import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
+// import SubOrderPage from '../yunyin/shengchanguanli/components/SubOrder.vue';
+import { useUserStore } from '@/pinia/modules/user';
+defineOptions({name: 'Company'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+//定义跳转页面
+const SubOrderPageRef = ref()//子订单详情页
+const printPageRef = ref()//打印预览
+const luckyexcelPageRef = ref()//pdf预览
+//获取登录用户信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+console.log('获取用户名称',_username.value)
+//全局获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+const hours = String(today.getHours()).padStart(2, '0');
+const minutes = String(today.getMinutes()).padStart(2, '0');
+const seconds = String(today.getSeconds()).padStart(2, '0');
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
+const add_searchInfo = ref('')
+
+//全局获取code,接口接收code
+const _code = '裁剪'
+//全局接口接受的物理地址
+const Machine = ref('')
+//全局获取UniqId
+const UniqId = ref('')
+
+// 员工数据
+const employees = ref([])
+const selectedEmployee = ref('')
+
+//物理地址获取机台编号
+const getMachineMacdata = async () => {
+  try {
+    const data  = await getMachineMac({sys_sbID:Machine.value});
+    if (data.data === null) {
+        // ElMessage({
+        // 	type: 'error',
+        // 	message: '未获取到机台编号请确认MAC地址或与管理员联系'
+        // })
+        add_formData['机台号'] = '测试机台'
+        add_formData['工序'] = _code
+        add_formData['组别'] = "测试"
+        add_formData['人员'] = "测试"
+        return;
+    }
+    add_formData['机台号'] = data.data['机台号']
+    add_formData['工序'] = data.data['生产工序']
+    add_formData['组别'] = data.data['组别']
+    add_formData['人员'] = data.data['组长']
+    // 获取员工数据
+    getEmployeeData(data.data['机台号'])
+    setTimeout(() => {
+        const inputElement = document.getElementById('searchInput');
+        if (inputElement) {
+            inputElement.focus();
+        }
+    }, 100); // 延迟100毫秒
+  } catch (error) {
+    console.error(error)
+  }
+}
+
+// 获取员工数据
+const getEmployeeData = async (machineId) => {
+  try {
+    const data = await getMajorprocessAndPerson({ machine: machineId || 'CF01' })
+    if (data.code === 0 && data.data) {
+      employees.value = data.data.person || []
+      // 设置默认选中第一个员工
+      if (employees.value.length > 0) {
+        selectedEmployee.value = employees.value[0].员工编号
+        add_formData['人员'] = employees.value[0].员工姓名
+      }
+    }
+  } catch (error) {
+    console.error('获取员工数据失败:', error)
+  }
+}
+
+// 选择员工
+const selectEmployee = (employee) => {
+  selectedEmployee.value = employee.员工编号
+  add_formData['人员'] = employee.员工姓名
+}
+
+//工分报工对话框
+const workScoreDialogVisible = ref(false);
+
+//工艺部件数据
+const processParts = ref([]);
+
+//工艺数据
+const partProcesses = ref([]);
+
+//部件数量
+const partQuantities = ref([]);
+
+//加载状态
+const loadingProcess = ref(false);
+
+//打开工分报工对话框
+const openWorkScoreDialog = async () => {
+  if (add_searchInfo.value === '' || add_searchInfo.value === undefined) {
+    warningres('请先输入订单编号并查询');
+    return;
+  }
+  
+  if (orderInfoList.length === 0) {
+    warningres('请先查询订单信息');
+    return;
+  }
+  
+  if (!selectedEmployee.value) {
+    warningres('请选择操作上报人员');
+    return;
+  }
+  
+  // 加载工艺部件数据
+  await loadProcessParts();
+  
+  workScoreDialogVisible.value = true;
+};
+
+//加载工艺部件数据
+const loadProcessParts = async () => {
+  loadingProcess.value = true;
+  try {
+    // 调用GetOrderProcess接口
+    const response = await GetOrderProcess({
+      workorder: add_searchInfo.value,
+      majorprocess: add_formData['工序']
+    });
+    
+    if (response.code === 0 && response.data) {
+      // 检查是否是车缝工序
+      if (add_formData['工序'] === '车缝') {
+        // 车缝工序:返回部件数据
+        processParts.value = response.data;
+        partQuantities.value = new Array(response.data.length).fill('');
+        partProcesses.value = new Array(response.data.length).fill([]);
+        
+        // 获取每个部件的工艺
+        for (let i = 0; i < response.data.length; i++) {
+          await loadPartProcesses(i, response.data[i]['部件编号']);
+        }
+      } else {
+        // 非车缝工序:直接返回工艺数据
+        processParts.value = []; // 非车缝没有部件
+        partQuantities.value = [""]; // 只有一个工艺列表
+        partProcesses.value = [response.data]; // 直接将工艺数据作为第一个元素
+      }
+    } else {
+      processParts.value = [];
+      partQuantities.value = [];
+      partProcesses.value = [];
+      warningres('获取工艺部件失败');
+    }
+  } catch (error) {
+    console.error('获取工艺部件失败:', error);
+    warningres('网络错误,请稍后重试');
+    processParts.value = [];
+    partQuantities.value = [];
+    partProcesses.value = [];
+  } finally {
+    loadingProcess.value = false;
+  }
+};
+
+//加载部件工艺数据
+const loadPartProcesses = async (index, partCode) => {
+  try {
+    // 调用GetCarProcess接口
+    const response = await GetCarProcess({
+      workorder: add_searchInfo.value,
+      part_code: partCode
+    });
+    
+    if (response.code === 0 && response.data) {
+      partProcesses.value[index] = response.data;
+    } else {
+      partProcesses.value[index] = [];
+    }
+  } catch (error) {
+    console.error('获取部件工艺失败:', error);
+    partProcesses.value[index] = [];
+  }
+};
+
+//提交工分报工
+const submitWorkScore = async () => {
+  try {
+    // 验证是否选择了员工
+    if (!selectedEmployee.value) {
+      warningres('请选择操作上报人员');
+      return;
+    }
+    
+    // 获取选中的员工信息
+    const selectedEmp = employees.value.find(emp => emp['员工编号'] === selectedEmployee.value);
+    if (!selectedEmp) {
+      warningres('未找到选中的员工信息');
+      return;
+    }
+    
+    // 构建上报数据
+    const reportData = [];
+    
+    // 检查是否是车缝工序
+    if (add_formData['工序'] === '车缝') {
+      // 车缝工序:按有上报数量的部件中的工艺上报
+      for (let i = 0; i < processParts.value.length; i++) {
+        const quantity = partQuantities.value[i];
+        if (quantity && quantity.trim() !== '') {
+          // 有上报数量,上报该部件的所有工艺
+          const part = processParts.value[i];
+          const processes = partProcesses.value[i];
+          
+          for (const process of processes) {
+            reportData.push({
+              staff_no: selectedEmp['员工编号'],
+              staff_name: selectedEmp['员工姓名'],
+              work_order: add_searchInfo.value,
+              majorprocess: add_formData['工序'],
+              part_code: part['部件编号'],
+              process_code: process['工艺编号'],
+              process_name: process['工艺名称'],
+              standard_hour: process['标准工时'] || '',
+              standard_score: process['标准工分'] || '',
+              coefficient: process['系数'] || '1',
+              number: quantity,
+              machine: add_formData['机台号'],
+              sys_id: add_formData['组别'],
+              date: currentDates
+            });
+          }
+        }
+      }
+    } else { 
+      // 非车缝工序:按所有工艺上报
+      if (partProcesses.value[0] && partProcesses.value[0].length > 0) {
+        const quantity = partQuantities.value[0];
+        if (quantity && quantity.trim() !== '') {
+          for (const process of partProcesses.value[0]) {
+            reportData.push({
+              staff_no: selectedEmp['员工编号'],
+              staff_name: selectedEmp['员工姓名'],
+              work_order: add_searchInfo.value,
+              majorprocess: add_formData['工序'],
+              part_code: '',
+              process_code: process['工艺编号'],
+              process_name: process['工艺名称'],
+              standard_hour: process['标准工时'] || '',
+              standard_score: process['标准工分'] || '',
+              coefficient: process['系数'] || '1',
+              number: quantity,
+              machine: add_formData['机台号'],
+              sys_id: userStore.userInfo.nickName,
+              date: currentDates
+            });
+          }
+        }
+      }
+    }
+    
+    // 验证是否有数据需要上报
+    if (reportData.length === 0) {
+      warningres('请填写上报数量');
+      return;
+    }
+    
+    // 调用ReportingWork接口
+    const response = await ReportingWork(reportData);
+    
+    if (response.code === 0) {
+      ElMessage.success('工分报工提交成功');
+      workScoreDialogVisible.value = false;
+    } else {
+      warningres(response.msg || '提交失败');
+    }
+  } catch (error) {
+    console.error('提交工分报工失败:', error);
+    warningres('网络错误,请稍后重试');
+  }
+};
+
+// 生成头像颜色
+const getAvatarColor = (index) => {
+  const colors = [
+    '#667eea', '#764ba2', '#f093fb', '#f5576c',
+    '#4facfe', '#00f2fe', '#43e97b', '#38f9d7'
+  ]
+  return colors[index % colors.length]
+}
+//自动获取物理地址
+const GetAddr =  () => {
+  var xmlhttp = null;
+  var res;
+  if (window.XMLHttpRequest) {
+    xmlhttp = new XMLHttpRequest();
+  } else if (window.ActiveXObject) {
+    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+  }
+  // 2. 设置回调函数
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+      res = eval('('+xmlhttp.response+')');
+      let result = ''
+      for (let i = 0; i < res.macAddress.length; i++) {
+        if (i % 2 === 0 && i !== 0) {
+          result += '-' // 根据实际需求修改分隔符
+        }
+        result += res.macAddress[i]
+      }
+      Machine.value = result
+    getMachineMacdata(Machine.value)
+    }
+  }
+  // 3. 打开一个连接
+  xmlhttp.open("get", "http://127.0.0.1:8090/init")
+  //  5. 发送
+   xmlhttp.send();
+}
+// getMachineMacdata();
+GetAddr()
+// PDF预览
+const showPdf = async (row) => {
+    luckyexcelPageRef.value.open(row)
+}
+
+const add_formData = reactive({
+  机台号: '',	
+  工序: '',
+  组别: '',
+  人员: '',	
+  尺码: '',
+  数量: '',
+  是否订单尾包: '',
+});
+//清空对象的属性值
+const gd_clearFormData = () => {
+  Object.keys(add_formData).forEach(key => {
+    add_formData[key] = '';
+  });
+};
+
+//进度汇总表格数据
+const add_tableData = reactive([]);
+const jdhz_tableData = reactive([]);
+const bgjdhz_tableData = reactive([]);
+const _order = ref('');
+const _UniqId = ref('');
+//尺寸列表
+const sizeDatas = reactive([])
+//技术附件
+const jstableData = reactive([])
+const ddtableData = reactive([])
+const _list = ref('');
+
+//订单信息数据
+const orderInfoList = reactive([]);
+
+//查询
+const add_onSubmit = async ()=>{
+  if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
+    warningres('搜索内容不能为空')
+    return;
+  }
+  
+  try {
+    // 调用Apiorder接口
+    const response = await Apiorder({ search: add_searchInfo.value });
+    if (response.code === 0 && response.data) {
+      if (response.data.total === 0) {
+        warningres('暂无该订单编号');
+        orderInfoList.length = 0;
+      } else if (response.data.list) {
+        // 清空并更新订单信息列表
+        orderInfoList.length = 0;
+        orderInfoList.splice(0, response.data.list.length, ...response.data.list);
+        successres('查询成功');
+      } else {
+        warningres(response.msg || '查询失败');
+        orderInfoList.length = 0;
+      }
+    } else {
+      warningres(response.msg || '查询失败');
+      orderInfoList.length = 0;
+    }
+  } catch (error) {
+    console.error('查询订单信息失败:', error);
+    warningres('网络错误,请稍后重试');
+  }
+};
+
+  //总数量合计
+  const getSummaries = (param) => {  
+    const { columns, data } = param;  
+    const sums = {};  
+    const summableLabels = [...sizeDatas, "实裁总数"];
+    columns.forEach((column, index) => {  
+        if (index === 1) {  
+            sums[index] = '总数量合计';  
+            return;  
+        }  
+        if (summableLabels.includes(column.label)) {  
+            const values = data.map(item => Number(item[column.property]));  
+            // 检查数组中是否所有值都是 NaN  
+            if (!values.every(value => isNaN(value))) {  
+                sums[index] = values.reduce((prev, curr) => {  
+                    const value = Number(curr);  
+                    if (!isNaN(value)) {  
+                        return prev + value; 
+                    }  
+                    return prev;  
+                }, 0);  
+                // 如果需要,可以在这里添加单位  
+                // sums[index] += ' 件';  
+            } else {  
+                 sums[index] = '';  
+            }  
+        }  
+    });  
+    return sums;  
+};  
+
+
+//表格行点击
+const tableRowClick = async (row)=>{
+  add_searchInfo.value = row.子订单编号
+    _order.value = row.子订单编号
+}
+
+
+
+const _searchInput = async ()=>{
+    setTimeout(() => {
+        const inputElement = document.getElementById('searchInput');
+            if (inputElement) {
+                inputElement.focus();		
+            }
+    }, 100);
+}
+
+//子订单详情页
+const cp_gdprintonClick = async () => {
+    if(add_searchInfo.value === '' || add_searchInfo.value === null){
+        warningres('请扫描子订单(条码)后再查看')
+        return false;
+    }
+    SubOrderPageRef.value.open(add_searchInfo.value,add_formData['工序']) 
+}
+    
+
+
+const gd_yulan = () => {
+  if(add_searchInfo.value === '' || add_searchInfo.value === null){
+    warningres('请选择具体的工单后,再操作此功能')
+    return false;
+  }else{
+    const order = add_searchInfo.value.split('-')[0]
+      printPageRef.value.open(order) 
+  }
+}
+
+
+const _orderid = ref('')//订单子编号
+const _kh = ref('')//生产款号
+
+
+
+
+// =========== 分页 ===========
+// 分页相关的响应式变量
+const page = ref(1)
+const total = ref(0)
+const pageSize = ref(10)
+// 分页
+const handleCurrentChange = (val) => {
+  page.value = val;
+  _getStaffList();
+};
+
+// 修改页面容量 点击多少条/页
+const handleSizeChange = (val) => {
+  page.value = 10;//默认显示
+  pageSize.value = val;
+  _getStaffList();
+};
+
+
+
+// 成功
+const successres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+        message: `<strong style="font-size: 60px; color: black; background-color: #80FA80; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+
+// 失败
+const errorres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+        message: `<strong style="font-size: 60px; color: white; background-color: red; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+
+// 警告
+const warningres = (arr) => {
+    ElMessage({
+        type: '',
+        dangerouslyUseHTMLString: true,
+        // duration: 0,  // 不自动关闭
+        message: `<strong style="font-size: 60px; color: black; background-color: #f5ff2f; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
+        customClass: 'custom-warning-message'
+    });
+}
+</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; /* 调整左侧输入框的宽度 */
+}
+
+/* 媒体查询,根据需要调整断点 */
+@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;
+}
+/* 图片上传 */
+.upload-box {
+  width: 200px;
+  height: 200px;
+  border: 2px dashed #e2e2e2;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: relative;
+  cursor: pointer;
+}
+.uploaded-image {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.upload-icon {
+  font-size: 40px;
+  color: #c0c4cc;
+}
+.file-input {
+  display: none;
+}
+.el-table .warning-row {
+  background: oldlace;
+}
+
+/*bom参数背景*/
+:deep(.el-table__body .background-plan-usage-low div div div) {
+  background: #80FA80 !important;
+}
+/* 选中某行时的背景色 */
+:deep(.el-table__body tr.current-row) > td {
+  background: #ff80ff !important;
+}
+
+/* 员工选择区域样式 */
+.employee-grid {
+  display: grid;
+  grid-template-columns: repeat(8, 1fr);
+  gap: 15px;
+  margin-top: 10px;
+}
+
+.employee-card {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 15px;
+  border-radius: 8px;
+  background-color: #f5f7fa;
+  cursor: pointer;
+  transition: all 0.3s ease;
+  border: 2px solid transparent;
+}
+
+.employee-card:hover {
+  transform: translateY(-3px);
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
+}
+
+.employee-card.selected {
+  border-color: #667eea;
+  background-color: #e6e8ff;
+}
+
+.employee-avatar {
+  width: 50px;
+  height: 50px;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: white;
+  font-size: 20px;
+  font-weight: bold;
+  margin-bottom: 10px;
+}
+
+.employee-name {
+  font-size: 14px;
+  font-weight: bold;
+  margin-bottom: 5px;
+  text-align: center;
+}
+
+.employee-id {
+  font-size: 12px;
+  color: #666;
+  text-align: center;
+}
+</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;
+    margin-left: -10px !important;
+  min-height: 600px;
+}
+.mab{
+  margin-bottom: 5px;
+}
+
+/* 搜索样式 */
+::v-deep .el-input__wrapper #searchInput {  
+  font-size: 16px; 
+} 
+::v-deep .el-input__wrapper #jitaihao {  
+  font-size: 18px; 
+}  
+::v-deep .el-input__wrapper #gongxu {  
+  font-size: 18px; 
+}  
+::v-deep .el-input__wrapper #zubie {  
+  font-size: 18px; 
+}  
+::v-deep .el-input__wrapper #renyuan {  
+  font-size: 18px; 
+} 
+::v-deep .el-input__wrapper #shuliang {  
+  font-size: 18px; 
+  color: red;
+} 
+::v-deep .el-input__wrapper #chima {  
+  font-size: 18px; 
+} 
+
+/* 尺码/制单数合计样式 */
+::v-deep .el-input__wrapper  #cm1{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm2{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm3{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm4{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm5{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm6{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm7{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm8{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm9{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm10{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm11{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm12{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm13{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cm14{
+    font-size: 20px; 
+}
+::v-deep .el-input__wrapper  #cmtotal{
+    font-size: 20px; 
+}
+/* 本次实裁新增样式 */
+::v-deep .el-input__wrapper  #cmsl1{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl2{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl3{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl4{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl5{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl6{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl7{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl8{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl9{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl10{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl11{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl12{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl13{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #cmsl14{
+    font-size: 20px; 
+    color: red !important;
+}
+::v-deep .el-input__wrapper  #zdtotal{
+    font-size: 20px; 
+  color: red !important;
+}
+::v-deep .el-input__wrapper  #scs1{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs2{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs3{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs4{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs5{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs6{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs7{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs8{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs9{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs10{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs11{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs12{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs13{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #scs14{
+    font-size: 18px; 
+}
+::v-deep .el-input__wrapper  #sctotal{
+    font-size: 18px; 
+}
+
+
+/* 表格复选框大小调整 */
+:deep(.el-checkbox.el-checkbox--small .el-checkbox__inner) {
+    width: 30px;
+    /* 复选框宽度 */
+    height: 20px;
+    /* 复选框高度 */
+}
+:deep(.el-checkbox.el-checkbox--small.is-checked .el-checkbox__inner::after) {
+    transform: scale(1.2) rotate(45deg);
+    /* 调整选中后的对勾大小 */
+    top: 5%;
+    /* 调整对勾位置 */
+    left: 40%;
+    /* 调整对勾位置 */
+    width: 5px;
+    /* 调整对勾宽度 */
+    height: 9px;
+    /* 调整对勾高度 */
+}
+
+</style>

+ 278 - 0
src/view/yunyin/shengchanguanli/SendReceiveRecord.vue

@@ -0,0 +1,278 @@
+<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="搜索" style="width: 180px;" @keyup.enter="onSubmit()"></el-input>
+                <el-button type="primary" icon="search" @click="onSubmit" title="查询"  >查询</el-button>
+                <el-button @click="resetSearch" title="重置"  >重置</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+        </layout-header>
+
+        <layout>
+          <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>收发记录</h3>
+              <el-tree :data="treeData"  :props="defaultProps"  class="treecolor" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+              </el-tree>
+            </div>
+          </layout-sider>
+ 
+          <layout-content >
+            <div class="gva-table-box">
+              <el-table ref="multipleTable" style="width: 100%;height: 70vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="tableData"  border row-key="sczl_bh"
+                        size="small"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange"
+                        v-loading="loading">
+               <el-table-column  sortable align="center" label="订单编号" prop="订单编号"  width="120" />
+               <el-table-column  sortable align="center" label="子订单编号" prop="子订单编号"  width="150" />
+               <el-table-column  sortable align="center" label="款号" prop="款号"  width="120" />
+               <el-table-column  sortable align="center" label="尺码" prop="尺码"  width="100" />
+               <el-table-column  sortable align="center" label="数量" prop="数量"  width="100" />
+               <el-table-column  sortable align="center" label="编号" prop="sczl_bh"  width="120" />
+              </el-table>
+              <div class="gva-pagination">
+                <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+            </div>
+          </layout-content>
+        </layout>
+      </layout>
+    </div>
+  </template>
+  <script setup>
+// 全量引入格式化工具 请按需保留
+import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+import {ref, reactive} from 'vue'
+import {ElMessage} from "element-plus";
+import { getDateNodes, getCfdataDetail } from '@/api/mes/job'
+defineOptions({name: 'SendReceiveRecord'})
+
+  // =========== 获取左侧树侧形结构 ===========
+  const treeData = ref('')
+  const defaultProps = {
+    children: 'children',
+    label: 'label'
+  }
+
+// 获取树形数据
+const getTree = async () => {
+  try {
+    const response = await getDateNodes() 
+    const data = response.data 
+    
+    // 转换数据为el-tree需要的格式
+    treeData.value = data.map(item => {
+      return {
+        label: `${item.year}年`,
+        children: item.month_list.map(month => {
+          return {
+            label: `${month.month}月`,
+            children: month.day_list.map(day => {
+              return {
+                label: `${day.day}日`,
+                year: item.year,
+                month: month.month,
+                day: day.day
+              }
+            })
+          }
+        })
+      }
+    })
+  } catch (error) {
+    ElMessage.error('获取数据失败')
+    console.error('获取树形数据失败:', error)
+  }
+}
+getTree()
+  
+
+const tableData = ref([])
+const _selectedDate = ref({})
+const loading = ref(false)
+const handleNodeClick = async (node) => {
+    
+    // 取消所有节点的颜色
+    const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
+    allNodes.forEach(node => {
+    node.querySelector('.el-tree-node__label').style.color = '';
+    });
+    // 获取点击的节点 给当前点击的节点改变颜色【红色】
+    const clickedNodeId = node['$treeNodeId'];
+    const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
+    if (clickedNode) {
+    clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
+    }
+    
+    _selectedDate.value = {
+      year: node.year,
+      month: node.month,
+      day: node.day
+    }
+    console.log('点击节点:', node)
+  if (!node.children) {
+    loading.value = true
+    try {
+      const res = await getCfdataDetail({
+        year: node.year,
+        month: node.month,
+        day: node.day
+      })
+      console.log('获取数据:', res)
+      if(res.code === 0){
+        tableData.value = res.data
+        originalTableData.value = res.data
+        total.value = res.data.length
+      } else {
+        ElMessage.warning(res.msg || '获取数据失败')
+        tableData.value = []
+        originalTableData.value = []
+        total.value = 0
+      }
+    } catch (error) {
+      ElMessage.error('网络错误,请稍后重试')
+      console.error('获取数据失败:', error)
+      tableData.value = []
+      total.value = 0
+    } finally {
+      loading.value = false
+    }
+  }
+
+}
+
+const searchInfo = ref('')
+const originalTableData = ref([])
+const onSubmit = async () => {
+  if (!searchInfo.value) {
+    ElMessage.warning('请输入搜索内容');
+    return;
+  }else{
+    // 本地搜索过滤
+    const searchTerm = searchInfo.value.toLowerCase()
+    const filteredData = originalTableData.value.filter(item => {
+      return (
+        item.订单编号.toLowerCase().includes(searchTerm) ||
+        item.子订单编号.toLowerCase().includes(searchTerm) ||
+        item.款号.toLowerCase().includes(searchTerm) ||
+        item.尺码.toLowerCase().includes(searchTerm) ||
+        item.sczl_bh.toLowerCase().includes(searchTerm)
+      )
+    })
+    tableData.value = filteredData
+    total.value = filteredData.length
+    ElMessage.success(`找到 ${filteredData.length} 条匹配记录`)
+  }
+}
+
+const resetSearch = () => {
+  searchInfo.value = ''
+  tableData.value = [...originalTableData.value]
+  total.value = originalTableData.value.length
+  ElMessage.success('搜索已重置')
+}
+
+// 分页相关
+const page = ref(1)
+const pageSize = ref(10)
+const total = ref(0)
+const handleCurrentChange = (val) => {
+  page.value = val
+  // 重新获取数据
+}
+const handleSizeChange = (val) => {
+  pageSize.value = val
+  // 重新获取数据
+}
+
+// 其他方法
+const handleSelectionChange = (val) => {
+  console.log('选中项:', val)
+}
+const updateCompanyFunc = (row) => {
+  console.log('双击行:', row)
+}
+const gxbgCellClass = (row, column, rowIndex, columnIndex) => {
+  // 可以根据需要添加单元格样式
+  return ''
+}
+const handleNodeExpand = (node) => {
+  console.log('展开节点:', node)
+}
+  </script>
+  
+  <style scoped>
+  .form-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .form-column {
+    margin-right: 15px; /* 调整列之间的间距 */
+  }
+  
+  /* 左侧输入框宽度调整 */
+  .form-column .el-form-item .el-input {
+    width: 150px; /* 调整左侧输入框的宽度 */
+  }
+  
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    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>

+ 131 - 60
src/view/yunyin/shengchanguanli/dahuobaobiao.vue

@@ -4,8 +4,6 @@
       <layout-header>
         <div class="top-action-bar action-buttons">
            <el-button type="primary" icon="download" @click="exportMonthlyData">导出出货大货生产进度表</el-button>
-           <el-button type="primary" icon="edit" @click="openSampleApprovalDialog">样衣核批</el-button>
-           <el-button type="primary" icon="edit" @click="openFabricPlanDialog" :disabled="selectedRows.length !== 1">面料计划入库时间维护</el-button>
         </div>
       </layout-header>
 
@@ -38,13 +36,34 @@
                 <el-table-column sortable align="center" label="货期" prop="货期" width="100" />
                 <el-table-column sortable align="center" label="款号" prop="款号" width="150" />
                 <el-table-column sortable align="center" label="生产组别" prop="生产组别" width="100" />
+                <el-table-column sortable align="center" label="面料入库时间" prop="面料入库时间" width="140" />
+                <el-table-column  align="center" label="辅料计划入库时间" prop="辅料计划入库时间" width="140">
+                  <template #default="{ row }">
+                    <el-date-picker
+                      v-model="row.辅料计划入库时间"
+                      type="date"
+                      value-format="YYYY-MM-DD"
+                      style="width: 100%"
+                      @change="(newDate) => handleAccessoryDateChange(row, newDate)"
+                    />
+                  </template>
+                </el-table-column>
+                <el-table-column sortable align="center" label="核批日期" prop="核批日期" width="140">
+                  <template #default="{ row }">
+                    <el-date-picker
+                      v-model="row.核批日期"
+                      type="date"
+                      value-format="YYYY-MM-DD"
+                      style="width: 100%"
+                      @change="(newDate) => handleApprovalDateChange(row, newDate)"
+                    />
+                  </template>
+                </el-table-column>
                 <el-table-column sortable align="center" label="订单数量" prop="订单数量" width="100" />
                 <el-table-column sortable align="center" label="实裁数量" prop="实裁数量" width="100" />
                 <el-table-column sortable align="center" label="已完成数量" prop="已完成数量" width="120" />
                 <el-table-column sortable align="center" label="入库数量" prop="入库数量" width="100" />
-                <el-table-column sortable align="center" label="面料入库时间" prop="面料入库时间" width="140" />
-                <el-table-column sortable align="center" label="辅料入库时间" prop="辅料入库时间" width="140" />
-                <el-table-column sortable align="center" label="产前样批核" prop="核批日期" width="120" />
+
                 <el-table-column sortable align="center" label="开裁日期" prop="开裁日期" width="100" />
                 <el-table-column sortable align="center" label="上车位日期" prop="上车位日期" width="120" />
                 <el-table-column sortable align="center" label="台产" prop="台产" width="80" />
@@ -72,7 +91,17 @@
                 <el-table-column prop="物料名称" label="物料名称" width="200" />
                 <el-table-column prop="核批日期" label="核批日期" width="110" />
                 <el-table-column prop="核批人" label="核批人" width="130" />
-                <el-table-column prop="计划入库时间" label="计划入库时间" width="130" />
+                <el-table-column prop="计划入库时间" label="计划入库时间" width="140">
+                  <template #default="{ row }">
+                    <el-date-picker
+                      v-model="row.计划入库时间"
+                      type="date"
+                      value-format="YYYY-MM-DD"
+                      style="width: 100%"
+                      @change="(newDate) => handlePlanDateChange(row, newDate)"
+                    />
+                  </template>
+                </el-table-column>
                 <el-table-column prop="实际入库时间" label="实际入库时间" width="130" />
                 <el-table-column prop="入库数量" label="入库数量" width="100" />
                 <el-table-column prop="计划入库操作人" label="计划入库操作人" width="130" />
@@ -83,66 +112,15 @@
       </layout>
     </layout>
   </div>
-
-  <!-- 样衣核批弹窗 -->
-  <el-dialog v-model="sampleApprovalDialogVisible" title="样衣核批" width="400px" top="20%" destroy-on-close>
-    <el-form :model="sampleApprovalForm" label-width="100px">
-      <el-form-item label="核批日期">
-        <el-date-picker v-model="sampleApprovalForm.approvalDate" type="date" style="width: 100%" />
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <div class="dialog-footer">
-        <el-button @click="sampleApprovalDialogVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitSampleApproval">确定</el-button>
-      </div>
-    </template>
-  </el-dialog>
-
-  <!-- 面料计划入库时间维护弹窗 -->
-  <el-dialog v-model="fabricPlanDialogVisible" title="面料计划入库时间维护" width="80%" top="10%" destroy-on-close>
-    <el-descriptions class="margin-top" :column="4" :size="'small'" border>
-      <el-descriptions-item label="订单编号">{{ selectedOrder?.订单编号 || '' }}</el-descriptions-item>
-      <el-descriptions-item label="客户">{{ selectedOrder?.客人编号 || '' }}</el-descriptions-item>
-      <el-descriptions-item label="款号">{{ selectedOrder?.款号 || '' }}</el-descriptions-item>
-      <el-descriptions-item label="款式">{{ selectedOrder?.款式 || '' }}</el-descriptions-item>
-    </el-descriptions>
-    <el-divider content-position="left">
-      <span style="font-size: 16px;font-weight: bold;margin-left: 20px;">面料计划入库时间(仅计划入库时间可修改)</span>
-    </el-divider>
-    <div style="margin-top: 10px;">
-      <el-table ref="fabricPlanTable" style="width: 100%;" border :data="fabricPlanData">
-        <el-table-column prop="物料分类" label="物料分类" width="120" />
-        <el-table-column prop="物料名称" label="物料名称" width="200" />
-        <el-table-column prop="计划入库时间" label="计划入库时间" width="180">
-          <template #default="{ row }">
-            <el-date-picker v-model="row.计划入库时间" type="date" value-format="YYYY-MM-DD" style="width: 100%" />
-          </template>
-        </el-table-column>
-        <el-table-column prop="计划用料" label="计划用料" width="100" />
-        <el-table-column prop="定额用料" label="定额用料" width="100" />
-        <el-table-column prop="计划门幅" label="计划门幅" width="100" />
-        <el-table-column prop="定额门幅" label="定额门幅" width="100" />
-        <el-table-column prop="备注" label="备注" width="200" />
-      </el-table>
-    </div>
-    <template #footer>
-      <div class="dialog-footer">
-        <el-button @click="fabricPlanDialogVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitFabricPlan">保存</el-button>
-      </div>
-    </template>
-  </el-dialog>
 </template>
   <script setup>
   import {ref, reactive, onMounted} from 'vue'
   import { Layout, LayoutSider, LayoutContent, LayoutHeader } from '@arco-design/web-vue'
   import {
+    orderBomList, FabricEdit, Approval, AccessoriesInboundTime,
     getWorkOrderDates, getWorkOrdersByMonth,
   } from '@/api/mes/job'
-  import {
-    orderBomList, FabricEdit,Approval
-  } from '@/api/mes/job'
+
 
   import { ElMessage } from 'element-plus'
   import { useUserStore } from '@/pinia/modules/user'
@@ -157,7 +135,7 @@
   const treeData = ref([])
   const defaultProps = {
     label: 'label'
-  }
+  } 
   
   // 右侧表格数据
   const tableData = reactive([])
@@ -446,6 +424,99 @@
   onMounted(() => {
     getDateList();
   })
+
+  // 计划入库时间编辑相关
+  const handlePlanDateChange = async (row, newDate) => {
+    try {
+      const formattedData = [{
+        BOM_工单编号: selectedOrder.value.订单编号,
+        UNIQID: row.UNIQID !== undefined ? row.UNIQID : "",
+        物料分类: row.物料分类 !== null ? row.物料分类 : "",
+        BOM_物料名称: row.物料名称 !== null ? row.物料名称 : "",
+        BOM_计划用量: row.计划用料 !== null ? row.计划用料 : "",
+        BOM_标准用量: row.定额用料 !== null ? row.定额用料 : "",
+        BOM_实际用量: row.裁床实际用料 !== null ? row.裁床实际用料 : "",
+        Bom_领用数量: row.裁床领用面料 !== null ? row.裁床领用面料 : "",
+        BOM_退还数量: row.裁床退回仓库面料 !== null ? row.裁床退回仓库面料 : "",
+        BOM_desc: row.备注 !== null ? row.备注 : "",
+        BOM_计划门幅: row.计划门幅 !== null ? row.计划门幅 : "",
+        BOM_定额门幅: row.定额门幅 !== null ? row.定额门幅 : "",
+        BOM_投料单位: "",
+        Sys_ID: userStore.userInfo.nickName,
+        Sys_rq: getTodayYmd(),
+        计划入库时间: row.计划入库时间 != null && String(row.计划入库时间).trim() !== ''
+          ? String(row.计划入库时间).trim()
+          : getTodayYmd(),
+        计划入库操作人: userStore.userInfo.nickName,
+      }];
+
+      const add_FabricEditdata = await FabricEdit(formattedData);
+      if (add_FabricEditdata.code === 0) {
+        ElMessage.success('修改成功');
+      } else {
+        ElMessage.error('修改失败');
+      }
+    } catch (error) {
+      console.error('修改失败:', error);
+      ElMessage.error('修改失败');
+    }
+  };
+
+  // 样衣核批日期编辑相关
+  const handleApprovalDateChange = async (row, newDate) => {
+    try {
+      if (!row.Uniqid) {
+        ElMessage.error('缺少Uniqid,无法提交');
+        return;
+      }
+
+      const formattedDate = row.核批日期 ? row.核批日期 : getTodayYmd();
+      const operator = userStore.userInfo.nickName;
+
+      const response = await Approval({ 
+        Uniqid: row.Uniqid, 
+        rq: formattedDate, 
+        sys_id: operator 
+      });
+      
+      if (response.code === 0) {
+        ElMessage.success('样衣核批提交成功');
+      } else {
+        ElMessage.error('样衣核批提交失败');
+      }
+    } catch (error) {
+      console.error('样衣核批提交失败:', error);
+      ElMessage.error('样衣核批提交失败');
+    }
+  };
+
+  // 辅料入库时间编辑相关
+  const handleAccessoryDateChange = async (row, newDate) => {
+    try {
+      if (!row.Uniqid) {
+        ElMessage.error('缺少Uniqid,无法提交');
+        return;
+      }
+
+      const formattedDate = row.辅料入库时间 ? row.辅料入库时间 : getTodayYmd();
+      const operator = userStore.userInfo.nickName;
+
+      const response = await AccessoriesInboundTime({ 
+        Uniqid: row.Uniqid, 
+        rq: formattedDate, 
+        sys_id: operator 
+      });
+      
+      if (response.code === 0) {
+        ElMessage.success('辅料入库时间修改成功');
+      } else {
+        ElMessage.error('辅料入库时间修改失败');
+      }
+    } catch (error) {
+      console.error('辅料入库时间修改失败:', error);
+      ElMessage.error('辅料入库时间修改失败');
+    }
+  };
   
   // 导出大货生产进度表
   const exportMonthlyData = async () => {