zck 2 月之前
父節點
當前提交
5d3d115760

+ 44 - 0
src/api/jixiaoguanli/caiwubaobiao.js

@@ -165,3 +165,47 @@ export const shuidianqiMachineDetailList = (params) => {
   })
 }
 
+//v23财务--其他待摊费用创建
+export const PrepaidExpensesListEdit = (data) => {
+  return service({
+    url:'/mes_server/Cost_Accounting/PrepaidExpensesListEdit',
+    method: 'post',
+    data
+  })
+}
+
+//v23财务--其他待摊费用列表
+export const PrepaidExpensesList = (params) => {
+  return service({
+    url:'/mes_server/Cost_Accounting/PrepaidExpensesList',
+    method: 'get',
+    params
+  })
+}
+
+//v23财务--参考其他费用参考月份
+export const PrepaidExpensesDetailCopy = (params) => {
+  return service({
+    url:'/mes_server/Cost_Accounting/PrepaidExpensesDetailCopy',
+    method: 'get',
+    params
+  })
+}
+
+//v23财务--各月水电气直接费用创建
+export const shuidianqiDetailAdd = (params) => {
+  return service({
+    url:'/mes_server/Cost_Accounting/shuidianqiDetailAdd',
+    method: 'get',
+    params
+  })
+}
+
+//v23财务--计算成本
+export const CostCalculation = (params) => {
+  return service({
+    url:'/mes_server/Cost_Calculation/CostCalculation',
+    method: 'get',
+    params
+  })
+}

+ 9 - 0
src/api/mes/huhejob.js

@@ -322,6 +322,15 @@ export const gitProcessList = (params) => {
   })
 }
 
+// 最新糊盒班组查询
+export const classifyList = (params) => {
+  return service({
+    url: '/mes_server/Gluing_report/classifyList',
+    method: 'get',
+    params
+  })
+}
+
 // 糊盒工资查询左侧接口
 export const Gluing_Salary_Tab = (params) => {
   return service({

+ 55 - 0
src/api/mes/job.js

@@ -561,6 +561,61 @@ export const QIDetailList = (params) => {
 	设备管理
 */
 
+//设备部件寿命跟踪->获取左侧菜单
+export const getECTab = (params) => {
+  return service({
+    url: '/mes_server/Equipment_Components/getMachineList',
+    method: 'get',
+    params
+  })
+}
+
+//设备部件寿命跟踪->部件清单列表
+export const getEquipmentList = (params) => {
+  return service({
+    url: '/mes_server/Equipment_Components/getEquipmentList',
+    method: 'get',
+    params
+  })
+}
+
+//设备部件寿命跟踪->创建机台组建配置
+export const CreateEquipmentInfo = (data) => {
+  return service({
+    url: '/mes_server/Equipment_Components/CreateEquipmentInfo',
+    method: 'post',
+    data
+  })
+}
+
+//设备部件寿命跟踪->设备部件寿命跟踪上方列表
+export const getMachineEquipmentList = (params) => {
+  return service({
+    url: '/mes_server/Equipment_Components/getMachineEquipmentList',
+    method: 'get',
+    params
+  })
+}
+
+//设备部件寿命跟踪->设备部件寿命跟踪下方列表
+export const getEquipmentDetailList = (params) => {
+  return service({
+    url: '/mes_server/Equipment_Components/getEquipmentDetailList',
+    method: 'get',
+    params
+  })
+}
+
+//设备部件寿命跟踪->部件数据修改
+export const getEquipmentUpdate = (data) => {
+  return service({
+    url: '/mes_server/Equipment_Components/getEquipmentUpdate',
+    method: 'post',
+    data
+  })
+}
+
+
 //设备电量消耗查询->左侧菜单
 export const getPMTab = (params) => {
   return service({

+ 539 - 0
src/view/equipment/ComponentLifespan.vue

@@ -0,0 +1,539 @@
+<template>
+    <div>
+      <layout>
+        <layout-header>
+          <div class="">
+            <!--          按钮部分-->
+            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
+              <el-form-item>
+                <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
+                <el-button type="primary" class="bt" icon="download" @click="list_create" >清单建立</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="onupdata" >修改</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
+              </el-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>设备部件寿命跟踪</h3>
+              <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+              </el-tree>
+            </div>
+          </layout-sider>
+  
+          <!-- 右侧区域 -->
+          <layout-content >
+          <el-main>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 33vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="hztableData"  border row-key="ID"
+                        size="small"   id="hztab"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" 
+                        @row-click="hztableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="部件编号" prop="部件编号"  width="120" />
+               <el-table-column  sortable align="center" label="部件名称" prop="部件名称"  width="120" />
+               <el-table-column   align="center" label="组件编号" prop="组件编号"  width="200" />
+               <el-table-column   align="center" label="更换日期" prop="更换日期"  width="200" />
+               <el-table-column   align="center" label="小时寿命" prop="小时寿命"  width="110" />
+               <el-table-column   align="center" label="阈值" prop="阈值"  width="200" />
+               <el-table-column   align="center" label="首次更换日期" prop="首次更换日期"  width="200" />
+               <el-table-column   align="center" label="运行工时" prop="运行工时"  width="110" />
+               <el-table-column   align="center" label="序号" prop="序号"  width="110" />
+               <el-table-column   align="center" label="设备编号" prop="设备编号"  width="110" />
+              </el-table>
+  
+              <!-- 分页 -->
+              <div class="gva-pagination">
+                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+            </div>
+
+
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 45vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="mxtableData"  border row-key="ID"
+                        size="small"   id="mxtab"
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="工单编号" prop="工单编号"  width="120" />
+               <el-table-column  sortable align="center" label="印件号" prop="印件号"  width="120" />
+               <el-table-column  sortable align="center" label="印件名称" prop="印件名称"  width="200" />
+               <el-table-column  sortable align="center" label="日期" prop="日期"  width="100" />
+               <el-table-column  sortable align="center" label="工时" prop="工时"  width="100" />
+               <el-table-column  sortable align="center" label="机台编号" prop="机台编号"  width="100" />
+              </el-table>
+  
+              <!-- 分页 -->
+              <div class="gva-pagination">
+                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+            </div>
+  
+
+            <el-dialog
+    v-model="dialogVisible"
+    title='部件寿命跟踪清单'
+    width="500px"
+  >
+    <!-- 树状图 -->
+    <div class="tree-wrapper">
+      <el-tree
+        ref="treeRef"
+        :data="bjtreeData"
+        show-checkbox
+        node-key="id"
+        :props="defaultProps"
+        v-loading="loading"
+        @check="handleCheck"
+      />
+    </div>
+
+    <!-- 底部按钮 -->
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button @click="dialogVisible = false">放弃</el-button>
+        <el-button 
+          type="primary" 
+          @click="handleConfirm"
+          :disabled="checkedKeys.length === 0"
+        >
+          执行
+        </el-button>
+      </span>
+    </template>
+  </el-dialog>
+
+
+
+  <el-dialog
+    v-model="recordDialogVisible"
+    title="设备部件更换记录"
+    width="600px"
+    :close-on-click-modal="false"
+  >
+    <div class="record-dialog-content">
+      <!-- 设备信息 -->
+      <div class="info-section">
+        <div class="info-row">
+          <span class="info-label">设备编号:</span>
+          <el-input
+            v-model="currentRow.设备编号"
+            placeholder="请输入设备编号"
+            size="small"
+            style="width: 150px"
+          />
+          <span class="info-label" style="margin-left: 40px;">设备名称:</span>
+          <el-input
+            v-model="currentRow.设备名称"
+            placeholder="请输入设备名称"
+            size="small"
+            style="width: 180px"
+          />
+        </div>
+        <div class="info-row">
+          <span class="info-label">部件编号:</span>
+          <el-input
+            v-model="currentRow.部件编号"
+            placeholder="请输入部件编号"
+            size="small"
+            style="width: 150px"
+          />
+          <span class="info-label" style="margin-left: 40px;">部件名称:</span>
+          <el-input
+            v-model="currentRow.部件名称"
+            placeholder="请输入部件名称"
+            size="small"
+            style="width: 180px"
+          />
+        </div>
+      </div>
+
+      <el-divider />
+
+      <!-- 组件信息 -->
+      <div class="info-section">
+        <div class="info-row">
+          <span class="info-label">组件编号:</span>
+          <el-input
+            v-model="currentRow.组件编号"
+            placeholder="请输入组件编号"
+            size="small"
+            style="width: 150px"
+          />
+          <span class="info-label" style="margin-left: 40px;">更换日期:</span>
+          <el-date-picker
+            v-model="currentRow.更换日期"
+            type="date"
+            placeholder="选择更换日期"
+            size="small"
+            style="width: 150px"
+            value-format="YYYY-MM-DD"
+          />
+        </div>
+        <div class="info-row">
+          <span class="info-label">小时寿命:</span>
+          <el-input
+            v-model="currentRow.小时寿命"
+            size="small"
+            style="width: 120px"
+          />
+          <span class="info-label" style="margin-left: 40px;">阈值:</span>
+          <el-input
+            v-model="currentRow.阈值"
+            size="small"
+            style="width: 120px"
+          />
+        </div>
+      </div>
+
+      <el-divider />
+
+      <!-- 说明文字 -->
+      <div class="description-section">
+        <p><strong>A、</strong>对需要做寿命统计的部件,要先创建部件清单</p>
+        <p><strong>B、</strong>以创建一条新记录的方式,实现组件的更换</p>
+        <p><strong>C、</strong>由于工作疏忽导致的记录信息错误,方可采用修改方式实现信息修正</p>
+      </div>
+    </div>
+
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="recordDialogVisible = false">取消</el-button>
+        <el-button type="primary" @click="handleSave">保存修改</el-button>
+      </div>
+    </template>
+  </el-dialog>
+
+          </el-main>
+        </layout-content>
+        </layout>
+      </layout>
+    </div>
+  </template>
+  <script setup>
+  // 全量引入格式化工具 请按需保留
+  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+  import { getECTab,getEquipmentList,CreateEquipmentInfo,getMachineEquipmentList,getEquipmentDetailList,getEquipmentUpdate } from '@/api/mes/job'
+  import {ref, reactive} from 'vue'
+  import { useUserStore } from '@/pinia/modules/user'
+  import { exportExcelFile } from '@/utils/excel'
+  import {ElMessage} from "element-plus";
+  defineOptions({name: 'Company'})
+
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+
+  // =========== 获取左侧树侧形结构 ===========
+    const treeData = ref([])
+const defaultProps = {
+  children: 'children',
+  label: 'label'
+}
+
+const Chejian = ref('')
+const Machine = ref('')
+const _sbmc = ref('')
+const GetTab = async () => {
+  try {
+    const res = await getECTab()
+    if (res.code == 0) {
+      // 转换数据结构 - 核心优化:给二级节点添加workshop属性存储车间名称
+      treeData.value = Object.entries(res.data).map(([workshop, groups]) => ({
+        label: workshop,
+        children: Object.entries(groups).map(([groupName, equipments]) => ({
+          label: groupName,
+          workshop: workshop, // 新增:存储当前二级节点所属的车间名称
+          children: equipments.map(equipment => ({
+            label: equipment,
+            // label: equipment.split('-->')[1]?.trim() || equipment,
+            equipmentCode: equipment.split('-->')[0]?.trim() || ''
+          }))
+        }))
+      }))
+    }
+  } catch (error) {
+    console.error('获取设备部件数据失败:', error)
+    // ElMessage.error('获取数据失败')
+  }
+}
+
+// 优化点击事件处理逻辑
+const handleNodeClick = (node) => {
+  if (!node.children) {
+    console.log('点击了:', node)
+    _sbmc.value = node.label
+    Machine.value = node.equipmentCode
+    Chejian.value = node.parent?.workshop || Chejian.value
+    hztable(node.equipmentCode)
+  } else {
+    // 点击一级节点(车间)或二级节点(机组)
+    console.log('点击了节点:', node)
+    // 一级节点直接用label,二级节点用预存的workshop属性
+    Chejian.value = node.workshop || node.label
+  }
+}
+
+GetTab()
+
+
+//上方列表
+const hztableData = ref([])
+const hztable = async (machine) => {
+  try {
+    const res = await getMachineEquipmentList({
+        machine: machine
+    })
+    if (res.code == 0) {
+      hztableData.value = res.data
+    }
+  } catch (error) {
+    console.error('获取设备部件数据失败:', error)
+    // 可以添加用户提示
+    // ElMessage.error('获取数据失败')
+  }
+}
+
+const mxtableData = ref([])
+const selectedRow = ref({})
+const hztableRowClick = async (row) => {
+  selectedRow.value = row
+  console.log('点击了:', row.更换日期.split(' ')[0]  )
+  const response = await getEquipmentDetailList({
+    machine: row.设备编号,
+    date: row.更换日期.split(' ')[0]
+  })
+  if (response.code == 0) {
+    mxtableData.value = response.data
+  }
+}
+
+
+// 响应式数据
+const dialogVisible = ref(false)
+const loading = ref(false)
+const bjtreeData = ref([])
+const treeRef = ref()
+const checkedKeys = ref('')
+
+
+// 点击按钮
+const list_create = async () => {
+  if (!Machine.value) {
+    ElMessage.error('请先选择设备')
+    return
+  }
+  
+  dialogVisible.value = true
+  await fetchEquipmentList()
+}
+
+// 获取数据
+const fetchEquipmentList = async () => {
+  try {
+    loading.value = true
+    checkedKeys.value = '' // 清空选择
+    
+    const res = await getEquipmentList()
+    
+    if (res.code === 200 || res.code === 0) {
+      // 转换为树状结构
+      bjtreeData.value = [
+        {
+          id: 'root',
+          label: Chejian.value,
+          children: (res.data || []).map(item => ({
+            id: item.Uniqid.toString(),
+            label: item.名称 || '未知设备'
+          }))
+        }
+      ]
+    }
+  } catch (error) {
+    ElMessage.error('加载失败')
+    treeData.value = []
+  } finally {
+    loading.value = false
+  }
+}
+
+// 选择事件
+const handleCheck = (data, checkedInfo) => {
+  checkedKeys.value = checkedInfo.checkedKeys
+  console.log('选中的Uniqid:', checkedKeys.value.join(','))
+}
+
+const handleConfirm = async() => {
+  if (checkedKeys.value.length === 0) {
+    ElMessage.warning('请选择部件')
+    return
+  }
+  
+  const res = await CreateEquipmentInfo({
+    jtbh: Machine.value,
+    ids: checkedKeys.value.join(','),
+    sys_id: userStore.userInfo.nickName
+  })
+  if (res.code == 0) {
+    ElMessage.success('操作成功')
+  } else {
+    ElMessage.error(res.msg || '操作失败')
+  }
+  dialogVisible.value = false
+}
+
+
+// 弹窗状态
+const recordDialogVisible= ref(false)
+const currentRow = ref({})
+const onupdata = async () => {
+  if (!selectedRow.value) {
+    ElMessage.warning('请先选择一条记录')
+    return
+  }
+  
+  currentRow.value = { ...selectedRow.value }
+  currentRow.value.设备名称 = _sbmc.value
+  recordDialogVisible.value = true
+}
+
+
+
+const handleSave = async () => {
+    console.log(currentRow.value)
+    const params = {
+      code: currentRow.value.组件编号,
+      hour: currentRow.value.小时寿命,
+      date: currentRow.value.更换日期.split(' ')[0],
+      number: currentRow.value.阈值,
+      id: currentRow.value.Uniqid,
+    }
+  const res = await getEquipmentUpdate(params)
+  if (res.code == 0) {
+    hztable(Machine.value)
+    ElMessage.success('操作成功')
+  } else {
+    ElMessage.error(res.msg || '操作失败')
+  }
+  recordDialogVisible.value = false
+}
+  </script>
+  
+  <style scoped>
+  .form-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .form-column {
+    /*flex: 1;*/
+    margin-right: 15px; /* 调整列之间的间距 */
+  }
+  
+  /* 左侧输入框宽度调整 */
+  .form-column .el-form-item .el-input {
+    width: 150px; /* 调整左侧输入框的宽度 */
+  }
+  
+  :deep(.hui-plan-usage-lows  div) {
+    color: #8c939d !important;
+  }
+  :deep(.lan-plan-usage-lows  div) {
+    color: blue !important;
+    font-weight: bold;
+  }
+  
+
+  /* 媒体查询,根据需要调整断点 */
+  @media screen and (max-width: 768px) {
+    .form-column {
+      flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+      margin-right: 0;
+    }
+  }
+  /*:deep(.el-table td .cell) {*/
+  /*  line-height: 30px !important;*/
+  /*}*/
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    /*width: 300px;*/
+    background-color: #fff;
+    padding: 10px;
+    margin-right: 20px;
+  }
+  .JKWTree-tree h3 {
+    font-size: 15px;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+  .JKWTree-content {
+    flex: 1;
+  }
+
+  
+  /* 选中某行时的背景色 */
+  :deep(.el-table__body tr.current-row) > td {
+    background: #ff80ff !important;
+  }
+  </style>
+  <style scoped>
+  :deep(.el-table td .cell) {
+    line-height: 20px !important;
+  }
+  :deep(.el-tabs__header){
+    margin-bottom: 0;
+  }
+  .search{
+    margin-left: 0px !important;
+    margin-right: 10px !important;
+  }
+  .bt{
+    margin-left: 2px !important;
+    padding: 3px !important;
+    font-size: 12px;
+  }
+  .el-tabs__header{
+    margin: 0px !important;
+  }
+  .gva-table-box{
+    padding: 0px !important;
+  }
+  .mab{
+    margin-bottom: 5px;
+  }
+
+  .tree-wrapper {
+  min-height: 300px;
+  max-height: 400px;
+  overflow-y: auto;
+}
+
+.dialog-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+}
+  </style>
+  

+ 366 - 0
src/view/v23financial/v23CostOrder.vue

@@ -0,0 +1,366 @@
+<template>
+    <div>
+      <layout>
+        <layout-header>
+          <div class="">
+            <!--          按钮部分-->
+            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
+              <el-form-item>
+                <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
+                <el-button type="primary" class="bt" icon="edit"  @click="oncreate">成本计算</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="ToExcel" >导出到Excel</el-button>
+              </el-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>V23工单成本独立核算</h3>
+              <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+              </el-tree>
+            </div>
+          </layout-sider>
+  
+          <!-- 右侧区域 -->
+          <layout-content >
+          <el-main>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 63vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="hztableData"  border row-key="ID"
+                        size="small" id="tab2"
+
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="车间名称" prop="车间名称"  width="120" />
+               <el-table-column  sortable align="center" label="工单编号" prop="sczl_gdbh"  width="120" />
+               <el-table-column   align="center" label="年月" prop="sys_ny"  width="100" />
+               <el-table-column   align="center" label="印件号" prop="sczl_yjno"  width="90" />
+               <el-table-column   align="center" label="印件名称" prop="印件名称"  width="300" />
+               <el-table-column   align="center" label="工序号" prop="sczl_gxh"  width="90" />
+               <el-table-column   align="center" label="工序名称" prop="工序名称"  width="110" />
+               <el-table-column   align="center" label="设备编号" prop="sczl_jtbh"  width="110" />
+               <el-table-column   align="center" label="卷张换算系数" prop="卷张换算系数"  width="110" />
+               <el-table-column   align="center" label="占用机时" prop="占用机时"  width="110" />
+               <el-table-column   align="center" label="班组车头产量" prop="班组车头产量"  width="120" />
+               <el-table-column   align="center" label="墨数" prop="sczl_ms"  width="110" />
+               <el-table-column   align="center" label="工序难度系数" prop="工序难度系数"  width="200" />
+               <el-table-column   align="center" label="班组换算产量" prop="班组换算产量"  width="200" />
+               <el-table-column   align="center" label="千件工价" prop="千件工价"  width="110" />
+               <el-table-column   align="center" label="计件产量" prop="计件产量"  width="200" />
+               <el-table-column   align="center" label="水电分摊因子" prop="水电分摊因子"  width="200" />
+               <el-table-column   align="center" label="材料分摊因子" prop="材料分摊因子"  width="200" />
+               <el-table-column   align="center" label="人工分摊因子" prop="人工分摊因子"  width="200" />
+               <el-table-column   align="center" label="小时折旧额" prop="A_小时折旧额"  width="200" />
+               <el-table-column   align="center" label="车间人工" prop="车间人工"  width="110" />
+               <el-table-column   align="center" label="部门人工附加" prop="部门人工附加"  width="110" />
+               <el-table-column   align="center" label="直接材料" prop="直接材料"  width="200" />
+               <el-table-column   align="center" label="考核直接材料" prop="考核直接材料"  width="200" />
+               <el-table-column   align="center" label="分摊材料" prop="分摊材料"  width="110" />
+               <el-table-column   align="center" label="直接折旧" prop="直接折旧"  width="110" />
+               <el-table-column   align="center" label="分摊折旧" prop="分摊折旧"  width="200" />
+               <el-table-column   align="center" label="直接水电" prop="直接水电"  width="200" />
+               <el-table-column   align="center" label="分摊水电" prop="分摊水电"  width="110" />
+               <el-table-column   align="center" label="场地租金" prop="场地租金"  width="110" />
+               <el-table-column   align="center" label="废气处理" prop="废气处理"  width="200" />
+               <el-table-column   align="center" label="锅炉" prop="锅炉"  width="140" />
+               <el-table-column   align="center" label="热水锅炉" prop="热水锅炉"  width="110" />
+               <el-table-column   align="center" label="空压机A" prop="空压机A"  width="110" />
+               <el-table-column   align="center" label="空压机B" prop="空压机B"  width="110" />
+               <el-table-column   align="center" label="真空鼓风机A" prop="真空鼓风机A"  width="110" />
+               <el-table-column   align="center" label="真空鼓风机B" prop="真空鼓风机B"  width="110" />
+               <el-table-column   align="center" label="中央空调A" prop="中央空调A"  width="110" />
+               <el-table-column   align="center" label="中央空调B" prop="中央空调B"  width="110" />
+               <el-table-column   align="center" label="分摊其他" prop="分摊其他"  width="200" />
+               <el-table-column   align="center" label="成本合计" prop="客户编号"  width="200" />
+              </el-table>
+  
+              <!-- 分页 -->
+              <div class="gva-pagination">
+                  <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="page"
+                    :page-size="limit"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total">
+                  </el-pagination>
+                </div>
+            </div>
+
+            <el-dialog
+      v-model="costlist"
+      title="成本计算"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">计算月份:</span>
+          <el-date-picker
+            v-model="costMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="costlist = false">取消</el-button>
+          <el-button type="primary" @click="costhandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+          </el-main>
+        </layout-content>
+        </layout>
+      </layout>
+    </div>
+  </template>
+  <script setup>
+  // 全量引入格式化工具 请按需保留
+  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+  import {ref, reactive} from 'vue'
+  import { useUserStore } from '@/pinia/modules/user'
+  import { exportExcelFile } from '@/utils/excel'
+  import {ElMessage} from "element-plus";
+  import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import LuckyExcel from 'luckyexcel';
+  import {getSummaryTab,SummaryCostAccountingList,CostCalculation} from '@/api/jixiaoguanli/caiwubaobiao'
+
+  defineOptions({name: 'Company'})
+
+  const userStore = useUserStore()
+  const _username = ref('')
+  _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+
+  // =========== 获取左侧树侧形结构 ===========
+const treeData = ref([]);
+const defaultProps = {
+  children: 'children',
+  label: 'label'
+};
+const getTreeData = async () => {
+  try {
+    const res = await getSummaryTab(); // 调用您的API接口
+    
+    if (res.code === 0 && res.data) {
+      // 转换数据结构
+      treeData.value = Object.entries(res.data).map(([yearMonth, workshops]) => {
+        // 提取年份和月份(假设格式为YYYYMM)
+        const year = yearMonth.substring(0, 4);
+        const month = yearMonth.substring(4);
+        
+        return {
+          label: `${year}${month}`,
+          value: yearMonth,
+          children: workshops.map(workshop => ({
+            label: workshop.trim(), // 去除车间名称前后空格
+            value: `${yearMonth}-${workshop.trim()}`,
+            // 可以添加其他属性
+            type: 'workshop'
+          }))
+        };
+      }).sort((a, b) => b.value.localeCompare(a.value)); // 按年月倒序排序
+      
+      console.log('生成的树形数据:', treeData.value);
+    } else {
+      console.error('获取数据失败:', res.msg);
+    }
+  } catch (error) {
+    console.error('请求出错:', error);
+  }
+};
+getTreeData();
+
+const hztableData = ref([])
+const handleNodeClick = async (nodeData) => {
+  console.log('点击节点:', nodeData);
+  
+  // 根据节点类型处理不同逻辑
+  if (nodeData.value.split('-').length === 1) {
+    // 点击了年月节点
+    console.log('选择了年月:', nodeData.label);
+  } else {
+    // 点击了车间节点
+    const [yearMonth, workshop] = nodeData.value.split('-');
+    console.log(`选择了 ${yearMonth} 的 ${workshop}`);
+    const res = await SummaryCostAccountingList({month:yearMonth,sist:workshop})
+    console.log(res)
+    if(res.code === 0){
+        hztableData.value = res.data
+
+    }
+  }
+};
+
+  
+//导出按钮
+const ToExcel = async () => { 
+  try {
+    const el = document.getElementById('tab2');
+    //  使用table_to_sheet获取工作表对象
+    const worksheet = XLSX.utils.table_to_sheet(el, { raw: true });
+    //设置从C列开始为数字格式
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    for (let col = 3; col <= range.e.c; col++) { // 从C列(索引2)开始
+      for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
+        if (worksheet[cellAddress]) {
+          // 尝试转换为数字
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 数字类型
+            worksheet[cellAddress].v = numValue; // 更新值
+            // worksheet[cellAddress].z = '0.000'; // 数字格式
+          }
+        }
+      }
+    }
+    
+    // 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+    XLSX.writeFile(workbook, '成本汇总.xlsx');
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败,请重试');
+  }
+};
+  
+const costlist = ref(false)
+const costMonth = ref('')
+  
+const oncreate = () => {
+  costlist.value = true;
+}
+
+const costhandleConfirm = async () => {
+  if (!costMonth.value) {
+    ElMessage.error('请选择计算月份');
+    return;
+  }
+  try {
+    const qtdtAdds = await CostCalculation({
+      month: costMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (qtdtAdds.code === 0) {
+      costlist.value = false;
+      ElMessage({type: 'success',message: '计算成功'})
+    } else {
+      ElMessage({type: 'error',message: '计算失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+  
+  
+  </script>
+  
+  <style scoped>
+  .form-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .form-column {
+    /*flex: 1;*/
+    margin-right: 15px; /* 调整列之间的间距 */
+  }
+  
+  /* 左侧输入框宽度调整 */
+  .form-column .el-form-item .el-input {
+    width: 150px; /* 调整左侧输入框的宽度 */
+  }
+  
+  :deep(.hui-plan-usage-lows  div) {
+    color: #8c939d !important;
+  }
+  :deep(.lan-plan-usage-lows  div) {
+    color: blue !important;
+    font-weight: bold;
+  }
+  
+
+  /* 媒体查询,根据需要调整断点 */
+  @media screen and (max-width: 768px) {
+    .form-column {
+      flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+      margin-right: 0;
+    }
+  }
+  /*:deep(.el-table td .cell) {*/
+  /*  line-height: 30px !important;*/
+  /*}*/
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    /*width: 300px;*/
+    background-color: #fff;
+    padding: 10px;
+    margin-right: 20px;
+  }
+  .JKWTree-tree h3 {
+    font-size: 15px;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+  .JKWTree-content {
+    flex: 1;
+  }
+
+  
+  /* 选中某行时的背景色 */
+  :deep(.el-table__body tr.current-row) > td {
+    background: #ff80ff !important;
+  }
+  </style>
+  <style scoped>
+  :deep(.el-table td .cell) {
+    line-height: 20px !important;
+  }
+  :deep(.el-tabs__header){
+    margin-bottom: 0;
+  }
+  .search{
+    margin-left: 0px !important;
+    margin-right: 10px !important;
+  }
+  .bt{
+    margin-left: 2px !important;
+    padding: 3px !important;
+    font-size: 12px;
+  }
+  .el-tabs__header{
+    margin: 0px !important;
+  }
+  .gva-table-box{
+    padding: 0px !important;
+  }
+  .mab{
+    margin-bottom: 5px;
+  }
+  </style>
+  

+ 360 - 0
src/view/v23financial/v23CostProcess.vue

@@ -0,0 +1,360 @@
+<template>
+    <div>
+      <layout>
+        <layout-header>
+          <div class="">
+            <!--          按钮部分-->
+            <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
+              <el-form-item>
+                <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
+                <el-button type="primary" class="bt" icon="edit"  @click="oncreate">成本计算</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="ToExcel" >导出到Excel</el-button>
+              </el-form-item>
+            </el-form>
+  
+        
+  
+          </div>
+        </layout-header>
+  
+        <layout>
+          <!--    左侧树侧形结构-->
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>V23工序成本独立核算</h3>
+              <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+              </el-tree>
+            </div>
+          </layout-sider>
+  
+          <!-- 右侧区域 -->
+          <layout-content >
+          <el-main>
+            <div class="gva-table-box">
+              <!-- 表格数据 -->
+              <el-table ref="multipleTable" style="width: 100%;height: 76vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="hztableData"  border row-key="ID"
+                        size="small" id="tab2"
+
+                        :cell-class-name="gxbgCellClass"
+                        highlight-current-row="true" @row-dblclick="updateCompanyFunc"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+               <el-table-column  sortable align="center" label="车间名称" prop="车间名称"  width="120" />
+               <el-table-column  sortable align="center" label="工单编号" prop="sczl_gdbh"  width="120" />
+               <el-table-column   align="center" label="年月" prop="sys_ny"  width="100" />
+               <el-table-column   align="center" label="印件号" prop="sczl_yjno"  width="90" />
+               <el-table-column   align="center" label="印件名称" prop="印件名称"  width="300" />
+               <el-table-column   align="center" label="工序号" prop="sczl_gxh"  width="90" />
+               <el-table-column   align="center" label="工序名称" prop="工序名称"  width="110" />
+               <el-table-column   align="center" label="设备编号" prop="sczl_jtbh"  width="110" />
+               <el-table-column   align="center" label="卷张换算系数" prop="卷张换算系数"  width="110" />
+               <el-table-column   align="center" label="占用机时" prop="占用机时"  width="110" />
+               <el-table-column   align="center" label="班组车头产量" prop="班组车头产量"  width="120" />
+               <el-table-column   align="center" label="墨数" prop="sczl_ms"  width="110" />
+               <el-table-column   align="center" label="工序难度系数" prop="工序难度系数"  width="200" />
+               <el-table-column   align="center" label="班组换算产量" prop="班组换算产量"  width="200" />
+               <el-table-column   align="center" label="千件工价" prop="千件工价"  width="110" />
+               <el-table-column   align="center" label="计件产量" prop="计件产量"  width="200" />
+               <el-table-column   align="center" label="水电分摊因子" prop="水电分摊因子"  width="200" />
+               <el-table-column   align="center" label="材料分摊因子" prop="材料分摊因子"  width="200" />
+               <el-table-column   align="center" label="人工分摊因子" prop="人工分摊因子"  width="200" />
+               <el-table-column   align="center" label="小时折旧额" prop="A_小时折旧额"  width="200" />
+               <el-table-column   align="center" label="车间人工" prop="车间人工"  width="110" />
+               <el-table-column   align="center" label="部门人工附加" prop="部门人工附加"  width="110" />
+               <el-table-column   align="center" label="直接材料" prop="直接材料"  width="200" />
+               <el-table-column   align="center" label="考核直接材料" prop="考核直接材料"  width="200" />
+               <el-table-column   align="center" label="分摊材料" prop="分摊材料"  width="110" />
+               <el-table-column   align="center" label="直接折旧" prop="直接折旧"  width="110" />
+               <el-table-column   align="center" label="分摊折旧" prop="分摊折旧"  width="200" />
+               <el-table-column   align="center" label="直接水电" prop="直接水电"  width="200" />
+               <el-table-column   align="center" label="分摊水电" prop="分摊水电"  width="110" />
+               <el-table-column   align="center" label="场地租金" prop="场地租金"  width="110" />
+               <el-table-column   align="center" label="废气处理" prop="废气处理"  width="200" />
+               <el-table-column   align="center" label="锅炉" prop="锅炉"  width="140" />
+               <el-table-column   align="center" label="热水锅炉" prop="热水锅炉"  width="110" />
+               <el-table-column   align="center" label="空压机A" prop="空压机A"  width="110" />
+               <el-table-column   align="center" label="空压机B" prop="空压机B"  width="110" />
+               <el-table-column   align="center" label="真空鼓风机A" prop="真空鼓风机A"  width="110" />
+               <el-table-column   align="center" label="真空鼓风机B" prop="真空鼓风机B"  width="110" />
+               <el-table-column   align="center" label="中央空调A" prop="中央空调A"  width="110" />
+               <el-table-column   align="center" label="中央空调B" prop="中央空调B"  width="110" />
+               <el-table-column   align="center" label="分摊其他" prop="分摊其他"  width="200" />
+               <el-table-column   align="center" label="成本合计" prop="客户编号"  width="200" />
+              </el-table>
+  
+              <!-- 分页 -->
+              <div class="gva-pagination">
+                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+            </div>
+
+            <el-dialog
+      v-model="costlist"
+      title="成本计算"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">计算月份:</span>
+          <el-date-picker
+            v-model="costMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="costlist = false">取消</el-button>
+          <el-button type="primary" @click="costhandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+          </el-main>
+        </layout-content>
+        </layout>
+      </layout>
+    </div>
+  </template>
+  <script setup>
+  // 全量引入格式化工具 请按需保留
+  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+  import {ref, reactive} from 'vue'
+  import { useUserStore } from '@/pinia/modules/user'
+  import { exportExcelFile } from '@/utils/excel'
+  import {ElMessage} from "element-plus";
+  import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
+import LuckyExcel from 'luckyexcel';
+  import {getSummaryTab,SummaryCostAccountingList,CostCalculation} from '@/api/jixiaoguanli/caiwubaobiao'
+
+  defineOptions({name: 'Company'})
+
+  const userStore = useUserStore()
+  const _username = ref('')
+  _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+
+  // =========== 获取左侧树侧形结构 ===========
+const treeData = ref([]);
+const defaultProps = {
+  children: 'children',
+  label: 'label'
+};
+const getTreeData = async () => {
+  try {
+    const res = await getSummaryTab(); // 调用您的API接口
+    
+    if (res.code === 0 && res.data) {
+      // 转换数据结构
+      treeData.value = Object.entries(res.data).map(([yearMonth, workshops]) => {
+        // 提取年份和月份(假设格式为YYYYMM)
+        const year = yearMonth.substring(0, 4);
+        const month = yearMonth.substring(4);
+        
+        return {
+          label: `${year}${month}`,
+          value: yearMonth,
+          children: workshops.map(workshop => ({
+            label: workshop.trim(), // 去除车间名称前后空格
+            value: `${yearMonth}-${workshop.trim()}`,
+            // 可以添加其他属性
+            type: 'workshop'
+          }))
+        };
+      }).sort((a, b) => b.value.localeCompare(a.value)); // 按年月倒序排序
+      
+      console.log('生成的树形数据:', treeData.value);
+    } else {
+      console.error('获取数据失败:', res.msg);
+    }
+  } catch (error) {
+    console.error('请求出错:', error);
+  }
+};
+getTreeData();
+
+const hztableData = ref([])
+const handleNodeClick = async (nodeData) => {
+  console.log('点击节点:', nodeData);
+  
+  // 根据节点类型处理不同逻辑
+  if (nodeData.value.split('-').length === 1) {
+    // 点击了年月节点
+    console.log('选择了年月:', nodeData.label);
+  } else {
+    // 点击了车间节点
+    const [yearMonth, workshop] = nodeData.value.split('-');
+    console.log(`选择了 ${yearMonth} 的 ${workshop}`);
+    const res = await SummaryCostAccountingList({month:yearMonth,sist:workshop})
+    console.log(res)
+    if(res.code === 0){
+        hztableData.value = res.data
+
+    }
+  }
+};
+
+  
+//导出按钮
+const ToExcel = async () => { 
+  try {
+    const el = document.getElementById('tab2');
+    //  使用table_to_sheet获取工作表对象
+    const worksheet = XLSX.utils.table_to_sheet(el, { raw: true });
+    //设置从C列开始为数字格式
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    for (let col = 3; col <= range.e.c; col++) { // 从C列(索引2)开始
+      for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
+        if (worksheet[cellAddress]) {
+          // 尝试转换为数字
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 数字类型
+            worksheet[cellAddress].v = numValue; // 更新值
+            // worksheet[cellAddress].z = '0.000'; // 数字格式
+          }
+        }
+      }
+    }
+    
+    // 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+    XLSX.writeFile(workbook, '成本汇总.xlsx');
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败,请重试');
+  }
+};
+  
+const costlist = ref(false)
+const costMonth = ref('')
+  
+const oncreate = () => {
+  costlist.value = true;
+}
+
+const costhandleConfirm = async () => {
+  if (!costMonth.value) {
+    ElMessage.error('请选择计算月份');
+    return;
+  }
+  try {
+    const qtdtAdds = await CostCalculation({
+      month: costMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (qtdtAdds.code === 0) {
+      costlist.value = false;
+      ElMessage({type: 'success',message: '计算成功'})
+    } else {
+      ElMessage({type: 'error',message: '计算失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+  
+  
+  </script>
+  
+  <style scoped>
+  .form-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .form-column {
+    /*flex: 1;*/
+    margin-right: 15px; /* 调整列之间的间距 */
+  }
+  
+  /* 左侧输入框宽度调整 */
+  .form-column .el-form-item .el-input {
+    width: 150px; /* 调整左侧输入框的宽度 */
+  }
+  
+  :deep(.hui-plan-usage-lows  div) {
+    color: #8c939d !important;
+  }
+  :deep(.lan-plan-usage-lows  div) {
+    color: blue !important;
+    font-weight: bold;
+  }
+  
+
+  /* 媒体查询,根据需要调整断点 */
+  @media screen and (max-width: 768px) {
+    .form-column {
+      flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
+      margin-right: 0;
+    }
+  }
+  /*:deep(.el-table td .cell) {*/
+  /*  line-height: 30px !important;*/
+  /*}*/
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    /*width: 300px;*/
+    background-color: #fff;
+    padding: 10px;
+    margin-right: 20px;
+  }
+  .JKWTree-tree h3 {
+    font-size: 15px;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+  .JKWTree-content {
+    flex: 1;
+  }
+
+  
+  /* 选中某行时的背景色 */
+  :deep(.el-table__body tr.current-row) > td {
+    background: #ff80ff !important;
+  }
+  </style>
+  <style scoped>
+  :deep(.el-table td .cell) {
+    line-height: 20px !important;
+  }
+  :deep(.el-tabs__header){
+    margin-bottom: 0;
+  }
+  .search{
+    margin-left: 0px !important;
+    margin-right: 10px !important;
+  }
+  .bt{
+    margin-left: 2px !important;
+    padding: 3px !important;
+    font-size: 12px;
+  }
+  .el-tabs__header{
+    margin: 0px !important;
+  }
+  .gva-table-box{
+    padding: 0px !important;
+  }
+  .mab{
+    margin-bottom: 5px;
+  }
+  </style>
+  

+ 137 - 13
src/view/v23financial/v23CostSummary.vue

@@ -7,6 +7,7 @@
             <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
               <el-form-item>
                 <!-- <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input> -->
+                <el-button type="primary" class="bt" icon="edit"  @click="oncreate">成本计算</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="ToExcel" >导出到Excel</el-button>
               </el-form-item>
             </el-form>
@@ -18,7 +19,7 @@
   
         <layout>
           <!--    左侧树侧形结构-->
-          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+          <layout-sider :resize-directions="['right']" :width="190"  style="margin-right: 10px;height: 78vh">
             <div class="JKWTree-tree" style="height: 200px">
               <h3>V23车间成本独立核算</h3>
               <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
@@ -31,7 +32,7 @@
           <el-main>
             <div class="gva-table-box">
               <!-- 表格数据 -->
-              <el-table ref="multipleTable" style="width: 100%;height: 76vh" tooltip-effect="dark"
+              <el-table ref="multipleTable" style="width: 100%;height: 50vh" tooltip-effect="dark"
                         :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                         :data="hztableData"  border row-key="ID"
@@ -86,10 +87,92 @@
   
               <!-- 分页 -->
               <div class="gva-pagination">
-                <el-pagination layout="total" :current-page="page" :page-size="pageSize"
-                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+                  <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="page"
+                    :page-size="limit"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total">
+                  </el-pagination>
+                </div>
+
+                <div class="formula-description">
+            <div class="formula-title">计算公式说明:</div>
+            <div class="formula-grid">
+              <div class="formula-item">
+                <span class="formula-label">水电分摊因子:</span>
+                <span class="formula-content">工单机台生产工时</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">材料分摊因子:</span>
+                <span class="formula-content">色度数</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">人工分摊因子:</span>
+                <span class="formula-content">直接人工成本</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">小时折旧额:</span>
+                <span class="formula-content">机台小时折旧 × 水电分摊因子</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">车间人工:</span>
+                <span class="formula-content">车间人工成本 × (工单工序色度数 ÷ 车间总色度数)</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">部门人工附加:</span>
+                <span class="formula-content">部门人工 × (车间直接人工成本 ÷ 总直接人工成本) × (工单工序色度数 ÷ 车间总色度数)</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">直接材料:</span>
+                <span class="formula-content">ERP直接材料数量 × 单价</span>
+              </div>
+              <div class="formula-item">
+                <span class="formula-label">分摊材料:</span>
+                <span class="formula-content">ERP分摊材料数量 × 单价 × (工单工序色度数 ÷ 车间总色度数)</span>
               </div>
+              <div class="formula-item">
+                <span class="formula-label">直接水电:</span>
+                <span class="formula-content">上报运行时长 × 电量单价</span>
+              </div>
+              <div class="formula-item full-width">
+                <span class="formula-label">废气处理、锅炉、热水锅炉、空压机、空调、鼓风机:</span>
+                <span class="formula-content">上报数量 × 单价 × (水电分摊因子 ÷ 总分摊因子)(锅炉和热水锅炉只算卷凹机组)</span>
+              </div>
+            </div>
+          </div>
+
             </div>
+
+            <el-dialog
+      v-model="costlist"
+      title="成本计算"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">计算月份:</span>
+          <el-date-picker
+            v-model="costMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="costlist = false">取消</el-button>
+          <el-button type="primary" @click="costhandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
           </el-main>
         </layout-content>
         </layout>
@@ -100,14 +183,20 @@
   // 全量引入格式化工具 请按需保留
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   import {ref, reactive} from 'vue'
+  import { useUserStore } from '@/pinia/modules/user'
   import { exportExcelFile } from '@/utils/excel'
   import {ElMessage} from "element-plus";
   import * as XLSX from 'xlsx'
 import FileSaver from 'file-saver'
 import LuckyExcel from 'luckyexcel';
-  import {getSummaryTab,SummaryCostAccountingList} from '@/api/jixiaoguanli/caiwubaobiao'
+  import {getSummaryTab,SummaryCostAccountingList,CostCalculation} from '@/api/jixiaoguanli/caiwubaobiao'
 
   defineOptions({name: 'Company'})
+
+  const userStore = useUserStore()
+  const _username = ref('')
+  _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
+
   // =========== 获取左侧树侧形结构 ===========
 const treeData = ref([]);
 const defaultProps = {
@@ -147,10 +236,14 @@ const getTreeData = async () => {
 };
 getTreeData();
 
+const total = ref(0)
+const page = ref(1)
+const limit = ref(50)
+const nodeclick = ref('')
 const hztableData = ref([])
 const handleNodeClick = async (nodeData) => {
   console.log('点击节点:', nodeData);
-  
+  nodeclick.value = nodeData
   // 根据节点类型处理不同逻辑
   if (nodeData.value.split('-').length === 1) {
     // 点击了年月节点
@@ -159,15 +252,25 @@ const handleNodeClick = async (nodeData) => {
     // 点击了车间节点
     const [yearMonth, workshop] = nodeData.value.split('-');
     console.log(`选择了 ${yearMonth} 的 ${workshop}`);
-    const res = await SummaryCostAccountingList({month:yearMonth,sist:workshop})
+    const res = await SummaryCostAccountingList({month:yearMonth,sist:workshop,page:page.value,limit:limit.value})
     console.log(res)
     if(res.code === 0){
-        hztableData.value = res.data
-
+        hztableData.value = res.data.list
+        total.value = res.data.total
     }
   }
 };
 
+const handleSizeChange = (val) => {
+  limit.value = val;
+  handleNodeClick(nodeclick.value);
+}
+
+const handleCurrentChange = (val) => {
+  page.value = val;
+  handleNodeClick(nodeclick.value);
+}
+
   
 //导出按钮
 const ToExcel = async () => { 
@@ -205,12 +308,33 @@ const ToExcel = async () => {
   }
 };
   
-
+const costlist = ref(false)
+const costMonth = ref('')
   
+const oncreate = () => {
+  costlist.value = true;
+}
 
-  
-  
-  
+const costhandleConfirm = async () => {
+  if (!costMonth.value) {
+    ElMessage.error('请选择计算月份');
+    return;
+  }
+  try {
+    const qtdtAdds = await CostCalculation({
+      month: costMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (qtdtAdds.code === 0) {
+      costlist.value = false;
+      ElMessage({type: 'success',message: '计算成功'})
+    } else {
+      ElMessage({type: 'error',message: '计算失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
   
   
   </script>

+ 372 - 23
src/view/v23financial/v23Costmaintenance.vue

@@ -12,7 +12,11 @@
                 <el-button type="primary" class="bt" icon="edit" @click="oncbcreate">成本数据创建</el-button> 
                 <!-- <el-button type="primary" class="bt" icon="edit" @click="onsdqcreate">创建</el-button>  -->
                 <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showrgdownTable === false" @click="onartificial">月度人工维护</el-button>
+                <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdqzjupTable === false" @click="onsdqzj">水电气直接费用增加</el-button>
                 <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdqftupTable === false" @click="onsdqft">水电气分摊批量维护</el-button>
+                <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showqtdtTable === false" @click="onqtdt">其他待摊费用增加</el-button>
+                <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showqtdtTable === false" @click="onqtdtcopy">其他待摊费用复制</el-button>
+                <el-button type="primary" class="bt" icon="edit" :disabled="tableStates.showsdsupTable === false" @click="onsds">车间色度数添加</el-button>
                 <!-- <el-button type="primary" class="bt" icon="edit" @click="onout">分摊清单设置</el-button> -->
                 <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button>
@@ -192,16 +196,16 @@
                         highlight-current-row="true" @row-dblclick="updateCompanyFunc"
                         @row-click="tableRowClick" :show-overflow-tooltip="true"
                         @selection-change="handleSelectionChange">
-               <el-table-column  sortable align="center" label="部门一线工资" prop="部门一线工资"  width="120" />
-               <el-table-column  sortable align="center" label="管理人员工资" prop="管理人员工资"  width="120" />
-               <el-table-column  sortable align="center" label="工资成本占比" prop="工资成本占比"  width="200" />
-               <el-table-column  sortable align="center" label="场地租金" prop="工序场地租金"  width="100" />
+               <el-table-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="130" />
+               <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="100" />
                <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="100" />
-               <el-table-column  sortable align="center" label="修改时间" prop="修改时间"  width="100" />
+               <el-table-column  sortable align="center" label="创建时间" prop="创建时间"  width="160" />
+               <el-table-column  sortable align="center" label="修改时间" prop="修改时间"  width="160" />
               </el-table>
 
               <el-table v-if="tableStates.showsdsupTable"
@@ -375,6 +379,217 @@
 
 
 
+          <el-dialog
+    v-model="qtdtlist"
+    title="添加其他待摊费用"
+    width="600px"
+    :before-close="handleClose"
+  >
+    <el-form
+      ref="formRef"
+      :model="qtdtformData"
+      label-width="120px"
+      label-position="right"
+    >
+      <el-form-item label="年月" prop="month">
+        <el-date-picker
+          v-model="qtdtformData.month"
+          type="month"
+          placeholder="选择年月"
+          format="YYYYMM"
+          value-format="YYYYMM"
+          style="width: 100%"
+        />
+      </el-form-item>
+      
+      <el-form-item label="部门人员工资" prop="salary1">
+        <el-input
+          v-model="qtdtformData.salary1"
+          placeholder="请输入部门人员工资"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+      
+      <el-form-item label="管理人员工资" prop="salary2">
+        <el-input
+          v-model="qtdtformData.salary2"
+          placeholder="请输入管理人员工资"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+      
+      <el-form-item label="场地租金" prop="rental">
+        <el-input
+          v-model="qtdtformData.rental"
+          placeholder="请输入场地租金"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+      
+      <el-form-item label="待摊折旧" prop="depreciation">
+        <el-input
+          v-model="qtdtformData.depreciation"
+          placeholder="请输入待摊折旧"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+      
+      <el-form-item label="工资成本占比" prop="proportion">
+        <el-input
+          v-model="qtdtformData.proportion"
+          placeholder="请输入工资成本占比"
+          type="number"
+          step="0.01"
+          @input="calculateTotalCost"
+        >
+          <template #append>%</template>
+        </el-input>
+        <div class="form-tip">例如:0.25 表示 25%</div>
+      </el-form-item>
+      
+      <el-form-item label="其他费用" prop="rest">
+        <el-input
+          v-model="qtdtformData.rest"
+          placeholder="请输入其他费用"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+      
+      <el-form-item label="后勤人员工资" prop="profit">
+        <el-input
+          v-model="qtdtformData.profit"
+          placeholder="请输入后勤人员工资"
+          type="number"
+          @input="calculateTotalCost"
+        >
+          <template #append>元</template>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button @click="qtdthandleClose">取消</el-button>
+        <el-button type="primary" @click="qtdthandleSubmit">添加</el-button>
+      </span>
+    </template>
+  </el-dialog>
+
+
+
+  <el-dialog
+      v-model="qtdtcopylist"
+      title="其他待摊费用复制"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">参考月份:</span>
+          <el-date-picker
+            v-model="qtdtformMonth"
+            type="month"
+            placeholder="选择参考月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+        <div class="date-picker-item">
+          <span class="label">创建月份:</span>
+          <el-date-picker
+            v-model="qtdttoMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="qtdtcopylist = false">取消</el-button>
+          <el-button type="primary" @click="qtdtcopyhandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+
+
+    <el-dialog
+      v-model="sdqzjlist"
+      title="水电气直接费用增加"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">创建月份:</span>
+          <el-date-picker
+            v-model="sdqzjMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="sdqzjlist = false">取消</el-button>
+          <el-button type="primary" @click="sdqzjhandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      v-model="sdslist"
+      title="车间色度数增加"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <!-- 月份选择器 -->
+      <div class="date-picker-container">
+        <div class="date-picker-item">
+          <span class="label">创建月份:</span>
+          <el-date-picker
+            v-model="sdsMonth"
+            type="month"
+            placeholder="选择创建月份"
+            format="YYYY年MM月"
+            value-format="YYYYMM"
+          />
+        </div>
+      </div>
+
+      <!-- 底部按钮 -->
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="sdslist = false">取消</el-button>
+          <el-button type="primary" @click="sdshandleConfirm">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+
           </el-main>
         </layout-content>
         </layout>
@@ -392,7 +607,8 @@
   import * as XLSX from 'xlsx'
   import dayjs, { Dayjs } from 'dayjs';
   import {GetZzTab,ArtificialAdd,ArtificialAddList,ArtificialEdit,ArtificialList,ArtificialDetailList,shuidianqiList,shuidianqiDetailList,
-    shuidianqifentanList,ChromaticityAdd,ChromaticityDetailAdd,ChromaticityDetailList,MonochromaticDetailList,UtilitiesList,UtilitiesAdd,shuidianqiMachineDetailList
+    shuidianqifentanList,ChromaticityAdd,ChromaticityDetailAdd,ChromaticityDetailList,MonochromaticDetailList,UtilitiesList,UtilitiesAdd,shuidianqiMachineDetailList,
+    PrepaidExpensesListEdit,PrepaidExpensesList,PrepaidExpensesDetailCopy,shuidianqiDetailAdd,CostCalculation
   } from '@/api/jixiaoguanli/caiwubaobiao'
   import {ElMessage,ElMessageBox} from "element-plus";
   defineOptions({name: 'Company'})
@@ -551,14 +767,21 @@ const loadSdqftDetailData = async (rq,category,item) => {
   }
 }
 
-// const loadQtdtData = async (rq,category,item) => {
-//   try {
-//     const res = await ArtificialList({month: rq})
-//     rguptableData.value = res.data
-//   } catch (error) {
-//     console.error('加载其他分摊数据失败:', error)
-//   }
-// }
+const loadQtdtData = async (rq, category, item) => {
+  try {
+    const qtdtres = await PrepaidExpensesList({ month: rq })
+    
+    if (qtdtres.code === 0 && qtdtres.data) {
+      // 将对象转换为表格需要的数组格式
+      qtdttableData.value = [qtdtres.data]
+    } else {
+      qtdttableData.value = []
+    }
+  } catch (error) {
+    console.error('加载其他分摊数据失败:', error)
+    qtdttableData.value = []
+  }
+}
 
 const loadSdsDetailData = async (rq,category,item) => {
   try {
@@ -588,14 +811,15 @@ const sdqzjuptableRowClick  = async (row) => {
   }
 }
 // 水电费分摊上方数据行点击事件
-// const sdqftuptableRowClick = async (row) => {
-//   console.log(row)
-//   const res = await ArtificialDetailList({month: row.年月,machine: row.设备编号})
-//   if(res.code === 0){
-//     console.log(res)
-//     rgdowntableData.value = res.data
-//   }
-// }
+const sdqftuptableRowClick = async (row) => {
+  console.log(row)
+  const res = await shuidianqiMachineDetailList({month: _noderq.value,sist: row.部门名称,search: '待分摊总额'})
+  if(res.code === 0){
+    console.log(res)
+    rgdowntableData.value = res.data
+  }
+}
+
 // 色度数上方数据行点击事件
 const sdsuptableRowClick = async (row) => {
   console.log(row)
@@ -648,6 +872,7 @@ const rgsj_tableColumns = ref(
 const DEFAULT_WORKSHOPS = ['胶印车间', '凹丝印车间', '印后车间', '检验车间'];
 const onartificial = () => {
   rgsjlist.value = true
+  rgsjgetProductValue()
 }
 
 const rgsjgetProductValue = () => {
@@ -766,6 +991,7 @@ const onsdqcreate = () => {
 
 const onsdqft = () => {
   sdqftlist.value = true
+  sdqftgetProductValue()
 }
 
 const sdqcopyonDialog = () => {
@@ -893,6 +1119,129 @@ const sdqftCancel = () => {
 };
 
 
+const qtdtlist = ref(false)
+const onqtdt = () => {
+  qtdtlist.value = true
+  qtdtformData.value.month = _noderq.value;
+}
+
+const qtdtformData = ref({
+  month: '',
+  salary1: '',
+  salary2: '',
+  rental: '',
+  depreciation: '',
+  proportion: '',
+  rest: '',
+  profit: '',
+  sys_id: ''
+})
+
+const qtdthandleSubmit = async () => {
+  qtdtformData.value.sys_id = userStore.userInfo.nickName;
+  try {
+    const qtdtAdds = await PrepaidExpensesListEdit(qtdtformData.value);
+    if (qtdtAdds.code === 0) {
+      qtdtlist.value = false;
+      ElMessage({type: 'success',message: '添加成功'})
+      loadQtdtData(_noderq.value);
+    } else {
+      ElMessage({type: 'error',message: '添加失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+
+const qtdthandleClose = () => {
+  qtdtlist.value = false;
+}
+
+
+
+//其他待摊费用复制
+const qtdtcopylist = ref(false)
+const onqtdtcopy = () => {
+  qtdtcopylist.value = true
+}
+
+// 月份数据
+const qtdtformMonth = ref('')
+const qtdttoMonth = ref('')
+const qtdtcopyhandleConfirm = async () => {
+  try {
+    const qtdtAdds = await PrepaidExpensesDetailCopy({
+      formMonth: qtdtformMonth.value,
+      toMonth: qtdttoMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (qtdtAdds.code === 0) {
+      qtdtcopylist.value = false;
+      ElMessage({type: 'success',message: '复制成功'})
+      loadQtdtData(_noderq.value);
+    } else {
+      ElMessage({type: 'error',message: '复制失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+
+
+const sdqzjlist = ref(false)
+const onsdqzj = () => {
+  sdqzjlist.value = true
+  sdqzjMonth.value = _noderq.value
+}
+
+const sdqzjMonth = ref('')
+
+const sdqzjhandleConfirm = async () => {
+  try {
+    const sdqzjAdds = await shuidianqiDetailAdd({
+      month: sdqzjMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (sdqzjAdds.code === 0) {
+      sdqzjlist.value = false;
+      ElMessage({type: 'success',message: '增加成功'})
+      loadSdqzjData(_noderq.value);
+    } else {
+      ElMessage({type: 'error',message: '增加失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+
+const sdslist = ref(false)
+const onsds = () => {
+  sdslist.value = true
+  sdsMonth.value = _noderq.value
+}
+
+
+const sdsMonth = ref('')
+const sdshandleConfirm = async () => {
+  try {
+    const sdsAdds = await ChromaticityDetailAdd({
+      month: sdsMonth.value,
+      sys_id: userStore.userInfo.nickName
+    });
+    if (sdsAdds.code === 0) {
+      sdslist.value = false;
+      ElMessage({type: 'success',message: '增加成功'})
+      loadSdsData(_noderq.value);
+    } else {
+      ElMessage({type: 'error',message: '增加失败'})
+    }
+  } catch (error) {
+    console.error(error);
+  }
+}
+
+
+
 const exportExcel = async (isSummary) => {
   try {
     // 1. 获取当前显示的表格ID

+ 38 - 24
src/view/yunyin/huheguanli/huhebaogong.vue

@@ -230,6 +230,7 @@
 						style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" >
 				<el-table-column type="selection" width="55" />
 				<el-table-column fixed align="left" label="机台编号" prop="机台编号"  width="100"/>
+        <el-table-column fixed align="left" label="班组" prop="班组"  width="90"/>
 				<el-table-column fixed align="left" label="工单编号" prop="工单编号"  width="100"/>
 				<el-table-column fixed align="left" label="工序名称" prop="工序名称"  width="90"/>
 				<el-table-column fixed align="left" label="产品代号" prop="产品代号"  width="120"/>
@@ -634,12 +635,18 @@
 
 
 			<el-row :gutter="24" style="height: 40px;">
-			  <el-col :span="14">
+			  <el-col :span="10">
 			    <el-form-item label="工序名称:" prop="flatFeed" class="mab">
 			    <el-input v-model="gyformdata.gxmc" id="工序名称" @focus="gxmcHandleFocus()" @blur="getGXsubmit()" @keydown="ent1($event)" style="width: 350px;"  />
 			    <el-input v-model="gyformdata.gxh" id="工序号"  :readonly=true :clearable="true" style="width: 80px;" />
 			    </el-form-item>
 			  </el-col>
+
+        <el-col :span="7">
+			    <el-form-item label="开工时间:" prop="flatFeed" class="mab">
+					   <el-date-picker v-model="gyformdata.starttime" type="datetime"  format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @keydown="ent1($event)" />
+			    </el-form-item>
+			  </el-col>
 			</el-row>
 			
 			<el-row :gutter="24" style="height: 40px;">
@@ -663,27 +670,33 @@
 				    </el-select>
 				  </el-form-item>
 			  </el-col>
-			  <el-col :span="7">
-			    <el-form-item label="开工时间:" prop="flatFeed" class="mab">
-					   <el-date-picker v-model="gyformdata.starttime" type="datetime"  format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @keydown="ent1($event)" />
-			    </el-form-item>
-			  </el-col>
-				<!-- <el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
-				<el-form-item label="流程单号" prop="id" style="margin-top:0px; margin-bottom: 1px;">
-					<el-input v-model="gyformdata.num" id="流程单号" style="margin-top:0px; margin-bottom: 1px;"  @keydown="ent1($event)"  placeholder="" />
-				</el-form-item>
-				</el-col> -->
+
+				<el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
+          <el-form-item label="班组" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+    <el-select 
+      v-model="gyformdata.班组" 
+      id="班组" 
+      style="margin-top:0px; margin-bottom: 3px;"
+      @keydown="ent1($event)"
+      placeholder="请选择班组"
+    >
+      <!-- 这里可以添加选项,例如: -->
+      <el-option label="白班" value="白班" />
+      <el-option label="夜班" value="夜班" />
+    </el-select>
+  </el-form-item>
+				</el-col>
 			</el-row>
 
 			<el-row :gutter="24" style="height: 40px;">
 			  <el-col :span="9">
 			    <el-form-item label="上机时间:" prop="flatFeed" class="mab">
 				 <el-date-picker
-				         v-model="gyformdata.sj1"
+				         v-model="gyformdata.上机时间"
 				         type="datetime"
-				         format="YYYY/MM/DD hh:mm:ss"
-				         value-format="YYYY-MM-DD h:m:s"
-						 @keydown="ent1($event)"
+				         format="YYYY-MM-DD HH:mm:ss"
+				         value-format="YYYY-MM-DD HH:mm:ss"
+						      @keydown="ent1($event)"
 				       />
 			    </el-form-item>
 			  </el-col>
@@ -692,8 +705,8 @@
 				<el-date-picker
 				        v-model="gyformdata.sj2"
 				        type="datetime"
-				        format="YYYY/MM/DD hh:mm:ss"
-				        value-format="YYYY-MM-DD h:m:s"
+				        format="YYYY-MM-DD HH:mm:ss"
+				        value-format="YYYY-MM-DD HH:mm:ss"
 						@keydown="ent1($event)"
 				      />
 			    </el-form-item>
@@ -2050,9 +2063,9 @@ const sbupdateCompanyFunc = (row) => {
 		// Gy0_ls:order_info.Gy0_ls,
 	  };
 	  formData3.value = { ...formData3.value, ...newData };
-	  const memberCount = Math.min(Object.keys(Bzlist.value).length, 10);
+	  const memberCount = Math.min(Object.keys(Bzlist.value).length, 30);
 
-for (let i = 0; i < 10; i++) {
+for (let i = 0; i < 30; i++) {
   const memberKey = `组员${i+1}`;
   
   // 初始化成员对象
@@ -2168,13 +2181,13 @@ const processTableData = (data) => {
 const mapClassMembers = (item) => {
   if (item.class && Array.isArray(item.class)) {
     // 先清空现有的组员字段
-    for (let i = 1; i <= 10; i++) {
+    for (let i = 1; i <= 30; i++) {
       item[`组员${i}`] = '';
     }
     
     // 重新填充组员数据
     item.class.forEach((member, index) => {
-      if (index < 10) { // 最多10个组员
+      if (index < 30) { // 最多30个组员
         const memberField = `组员${index + 1}`;
         item[memberField] = `${member.姓名} ${member.编号} (${(parseFloat(member.比例) * 100).toFixed(1)}%)`;
       }
@@ -2493,7 +2506,7 @@ const handleBzConfirm = async () => {
       // 处理组员数据
       if (apiData.class && Array.isArray(apiData.class)) {
         apiData.class.forEach((member, index) => {
-          if (index < 10) {
+          if (index < 30) {
             const memberKey = `组员${index + 1}`
             gyformdata.value[memberKey] = {
 			  角色: member.角色 || '',
@@ -2535,6 +2548,7 @@ const gychanliangenterDialog = async(row) => {
 		异常类型: gyformdata.value.异常类型,
 		设备运行工时: gyformdata.value.设备运行工时,
 		sczl_jtbh:gyformdata.value.sczl_jtbh,
+    sczl_bzdh:gyformdata.value.班组,
 		id: gyformdata.value.Uid,
     role: gyformdata.value.role,
     price: gyformdata.value.price,
@@ -3105,9 +3119,9 @@ const getGluingcoleData = async () => {
     if (response.code === 0) {
       gluingcoleData.value = response.data
       
-      // 处理角色选项:从role1到role10中过滤掉空值
+      // 处理角色选项:从role1到role30中过滤掉空值
       roleOptions.value = []
-      for (let i = 1; i <= 10; i++) {
+      for (let i = 1; i <= 30; i++) {
         const roleKey = `role${i}`
         const roleValue = response.data[roleKey]
         if (roleValue && roleValue.trim() !== '') {

+ 149 - 35
src/view/yunyin/huheguanli/huhechejianbaogong.vue

@@ -55,6 +55,23 @@
         </el-select>
       </el-form-item>
     </el-col>
+    <el-col :span="3" style="margin-top:0px; margin-bottom: 3px;">
+  <el-form-item label="班组" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+    <el-select 
+      v-model="formData3.班组" 
+      id="班组" 
+      style="margin-top:0px; margin-bottom: 3px;"
+      @keydown="ent($event, '机台名称', '班组', '工单编号')"
+      @change="handleBzChange"
+      placeholder="请选择班组"
+    >
+      <!-- 这里可以添加选项,例如: -->
+      <el-option label="白班" value="白班" />
+      <el-option label="夜班" value="夜班" />
+    </el-select>
+  </el-form-item>
+</el-col>
+
   </el-row>
 			  <el-row :gutter="24" style="margin-top:0px; margin-bottom: 3px;">
 				<el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
@@ -87,7 +104,7 @@
         <el-input
           v-model="formData3.product_name"
           id="产品名称"
-          disabled
+          readonly
           style="margin-top:0px; margin-bottom: 3px;"
           @keydown="ent($event, '工单编号', '产品名称', '工序名称')"
           placeholder=""
@@ -190,7 +207,7 @@
 					</el-col>
 			  
 					<el-col :span="5" style="margin-top:0px; margin-bottom: 3px;">
-					  <el-form-item label="制程废品" prop="id" style="margin-top:0px; margin-bottom: 3px;">
+					  <el-form-item label="废品" prop="id" style="margin-top:0px; margin-bottom: 3px;">
 						<el-input v-model="formData3.制程废品" id="制程废品" style="margin-top:0px; margin-bottom: 3px;" @keydown="ent($event, '产量', '制程废品', '制程次品')"  placeholder="" />
 					  </el-form-item>
 					</el-col>
@@ -433,16 +450,16 @@
 		  	</el-row>
 
         <el-row :gutter="10" style="margin-top: 10px;">
-          <el-col :span="2"><el-input v-model="formData3.组员1['姓名']" disabled id="name1"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员2['姓名']" disabled id="name2"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员3['姓名']" disabled id="name3"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员4['姓名']" disabled id="name4"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员5['姓名']" disabled id="name5"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员6['姓名']" disabled id="name6"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员7['姓名']" disabled id="name7"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员8['姓名']" disabled id="name8"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员9['姓名']" disabled id="name9"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员10['姓名']"  disabled id="name10"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员1['姓名']" readonly id="name1"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员2['姓名']" readonly id="name2"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员3['姓名']" readonly id="name3"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员4['姓名']" readonly id="name4"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员5['姓名']" readonly id="name5"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员6['姓名']" readonly id="name6"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员7['姓名']" readonly id="name7"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员8['姓名']" readonly id="name8"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员9['姓名']" readonly id="name9"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员10['姓名']"  readonly id="name10"/></el-col>
           <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
         </el-row>
 
@@ -625,16 +642,16 @@
 		  	</el-row>
 
         <el-row :gutter="10" style="margin-top: 10px;">
-          <el-col :span="2"><el-input v-model="formData3.组员11['姓名']" disabled id="name11"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员12['姓名']" disabled id="name12"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员13['姓名']" disabled id="name13"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员14['姓名']" disabled id="name14"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员15['姓名']" disabled id="name15"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员16['姓名']" disabled id="name16"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员17['姓名']" disabled id="name17"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员18['姓名']" disabled id="name18"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员19['姓名']" disabled id="name19"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员20['姓名']" disabled id="name20"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员11['姓名']" readonly id="name11"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员12['姓名']" readonly id="name12"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员13['姓名']" readonly id="name13"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员14['姓名']" readonly id="name14"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员15['姓名']" readonly id="name15"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员16['姓名']" readonly id="name16"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员17['姓名']" readonly id="name17"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员18['姓名']" readonly id="name18"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员19['姓名']" readonly id="name19"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员20['姓名']" readonly id="name20"/></el-col>
           <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
         </el-row>
 
@@ -818,16 +835,16 @@
 		  	</el-row>
 
         <el-row :gutter="10" style="margin-top: 10px;">
-          <el-col :span="2"><el-input v-model="formData3.组员21['姓名']" disabled id="name21"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员22['姓名']" disabled id="name22"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员23['姓名']" disabled id="name23"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员24['姓名']" disabled id="name24"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员25['姓名']" disabled id="name25"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员26['姓名']" disabled id="name26"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员27['姓名']" disabled id="name27"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员28['姓名']" disabled id="name28"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员29['姓名']" disabled id="name29"/></el-col>
-          <el-col :span="2"><el-input v-model="formData3.组员30['姓名']"  disabled id="name30"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员21['姓名']" readonly id="name21"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员22['姓名']" readonly id="name22"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员23['姓名']" readonly id="name23"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员24['姓名']" readonly id="name24"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员25['姓名']" readonly id="name25"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员26['姓名']" readonly id="name26"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员27['姓名']" readonly id="name27"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员28['姓名']" readonly id="name28"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员29['姓名']" readonly id="name29"/></el-col>
+          <el-col :span="2"><el-input v-model="formData3.组员30['姓名']"  readonly id="name30"/></el-col>
           <!-- <el-col :span="2"><el-input v-model="gyformdata.拉料['姓名']" id="name11"/></el-col> -->
         </el-row>
 
@@ -1166,7 +1183,7 @@
   } from "@/api/demo";
   
   // 全量引入格式化工具 请按需保留
-  import { getWorkOrderList,getMachineList,gitProcessList,getGluingcole,getGluingClassLList,AddGluingReportData,GcAdd } from '@/api/mes/huhejob'
+  import { getWorkOrderList,getMachineList,gitProcessList,getGluingcole,getGluingClassLList,AddGluingReportData,GcAdd,classifyList } from '@/api/mes/huhejob'
   import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
   import { ElMessage, ElMessageBox,ElNotification  } from 'element-plus'
   import { ref, reactive,watch,nextTick,onMounted } from 'vue'
@@ -1434,6 +1451,102 @@ const handleMachineChange = (selectedMachine) => {
   }
 }
 
+
+// 班组选择变化时的处理
+const handleBzChange = async (selectedBz) => {
+  console.log('选择的班组:', selectedBz)
+  
+  if (!selectedBz) {
+    // 如果清空选择,可以重置相关数据
+    resetMemberData()
+    return
+  }
+  
+  try {
+    // 调用 classifyList 接口获取班组数据
+    const response = await classifyList({ 
+      sczl_jtbh: formData3.value.jtmc,
+      sczl_bzdh: selectedBz 
+      // 根据实际接口参数调整
+    })
+    
+    console.log('接口返回的班组数据:', response.data)
+    
+    if (response.code === 0 && response.data && response.data.length > 0) {
+      // 处理接口返回的数据并填充到 formData3
+      fillMemberDataFromApi(response.data)
+    } else {
+      console.warn('未获取到班组数据或数据为空')
+      ElMessage.warning('未找到该班组的成员信息')
+      resetMemberData()
+    }
+  } catch (error) {
+    console.error('获取班组数据失败:', error)
+    ElMessage.error('获取班组数据失败,请重试')
+    resetMemberData()
+  }
+}
+
+// 从接口数据填充成员信息到 formData3
+const fillMemberDataFromApi = (apiData) => {
+  // 重置或初始化 formData3 中的组员数据
+  resetMemberData()
+  
+  // 遍历接口返回的数据
+  apiData.forEach((member, index) => {
+    // 成员索引从1开始
+    const memberIndex = index + 1
+    
+    // 确保不超过最大组员数量
+    if (memberIndex > 30) {
+      console.warn('超过最大组员数量30个,停止填充')
+      return
+    }
+    
+    const memberKey = `组员${memberIndex}`
+    
+    // 填充数据到 formData3
+    // 注意:接口数据中没有"角色"字段,这里可以根据需要设置默认值或留空
+    formData3.value[memberKey] = {
+      角色: '', // 接口数据中没有角色信息,可以留空或根据需要设置
+      编号: member.编号 || '',
+      姓名: member.姓名 || '',
+      比例: member.比例 || ''
+    }
+    
+    console.log(`填充 ${memberKey}:`, formData3.value[memberKey])
+  })
+  
+  console.log('接口数据填充完成后的 formData3:', formData3.value)
+}
+
+// 重置成员数据
+const resetMemberData = () => {
+  console.log('重置成员数据...')
+  
+  // 重置所有组员数据
+  for (let i = 1; i <= 30; i++) {
+    const memberKey = `组员${i}`
+    
+    // 如果 formData3.value[memberKey] 不存在,则初始化
+    if (!formData3.value[memberKey]) {
+      formData3.value[memberKey] = {
+        角色: '',
+        编号: '',
+        姓名: '',
+        比例: ''
+      }
+    } else {
+      // 如果已存在,则清空数据
+      formData3.value[memberKey]['角色'] = ''
+      formData3.value[memberKey]['编号'] = ''
+      formData3.value[memberKey]['姓名'] = ''
+      formData3.value[memberKey]['比例'] = ''
+    }
+  }
+}
+
+
 // 工单编号搜索方法
 const searchWorkOrders = async (query) => {
   if (!query || query.trim() === '') {
@@ -1777,8 +1890,8 @@ const handleBzConfirm = () => {
         const memberKey = `组员${currentMemberIndex}`
         
         // 确保当前组员位置有效(不超过10个组员)
-        if (currentMemberIndex > 10) {
-          console.warn('超过最大组员数量10个,停止填充')
+        if (currentMemberIndex > 30) {
+          console.warn('超过最大组员数量30个,停止填充')
           return // 或者使用 break 跳出循环
         }
         
@@ -1888,6 +2001,7 @@ const handleBzConfirm = () => {
 		设备运行工时:formData3.value.通电工时 || 0,
 		sys_id: userStore.userInfo.nickName,
 		sczl_jtbh: formData3.value.jtmc,
+    sczl_bzdh: formData3.value.班组,
 		bh1: formData3.value.组员1['编号'],
 		bh2: formData3.value.组员2['编号'],
 		bh3: formData3.value.组员3['编号'],

+ 2 - 2
src/view/yunyin/huheguanli/huhechengpinrucang.vue

@@ -642,7 +642,7 @@ const formData = ref({
 	jjcp_smb: "",
 	jjcp_sj: "",
 	jjcp_sl: "",
-	jjcp_dw: "",
+	jjcp_dw: "",
 	订单数量: "",
 	jjcp_sls: "",
 	机型备注: "",
@@ -666,7 +666,7 @@ const initFormData = () => {
 		jjcp_smb: "",
 		jjcp_sj: "",
 		jjcp_sl: "",
-		jjcp_dw: "",
+		jjcp_dw: "",
 		订单数量: "",
 		jjcp_sls: "",
 		机型备注: "",

+ 48 - 18
src/view/yunyin/huheguanli/huhetiming.vue

@@ -81,13 +81,18 @@
 										<el-input v-model="detailData.wgjs_js1" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy1">
-											<el-option label="" value="" />
+										<el-select 
+										v-model="detailData.wgjs_yy1" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>
 
@@ -104,13 +109,18 @@
 										<el-input v-model="detailData.wgjs_js2" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy2">
-											<el-option label="" value="" />
+										<el-select 
+										v-model="detailData.wgjs_yy2" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>
 
@@ -127,13 +137,18 @@
 										<el-input v-model="detailData.wgjs_js3" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy3">
-											<el-option label="" value="" />
+										<el-select 
+										v-model="detailData.wgjs_yy3" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>
 
@@ -150,13 +165,18 @@
 										<el-input v-model="detailData.wgjs_js4" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy4">
-											<el-option label="" value="" />
+										<el-select 
+										v-model="detailData.wgjs_yy4" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>
 
@@ -173,13 +193,18 @@
 										<el-input v-model="detailData.wgjs_js5" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy5">
-											<el-option label="" value="" />
+									<el-select 
+										v-model="detailData.wgjs_yy5" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>
 
@@ -196,13 +221,18 @@
 										<el-input v-model="detailData.wgjs_js6" />
 									</el-col>
 									<el-col :span="12">
-										<el-select v-model="detailData.wgjs_yy6">
-											<el-option label="" value="" />
+										<el-select 
+										v-model="detailData.wgjs_yy6" 
+										filterable 
+										allow-create
+										default-first-option
+										placeholder="请选择或输入原因"
+										>
 											<el-option label="换型清场" value="换型清场" />
 											<el-option label="异常工时" value="异常工时" />
 											<el-option label="设备维修" value="设备维修" />
 											<el-option label="设备保养" value="设备保养" />
-										</el-select>
+									</el-select>
 									</el-col>
 								</el-row>