Browse Source

运营管理

liuhairui 1 year ago
parent
commit
2a05f3c70b

+ 204 - 95
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -6,23 +6,32 @@
           <!--          按钮部分-->
           <el-form ref="elSearchFormRef"  :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
             <el-form-item>
-              <!--按钮-->
-              <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 180px;"></el-input>
+              <!--按钮 clearable-->
+              <el-input v-model="searchInfo" placeholder="搜索工单编号"  style="width: 180px;"></el-input>
               <el-button type="primary" icon="search"  @click="onSubmit"></el-button>
+              <el-button type="primary" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
+
               <div v-if="treeType === 'customTree'">
-                <el-button type="primary" icon="edit" @click="onStatusClick" class="bt">状态设置</el-button>
                 <el-button type="primary" icon="edit" @click="ongxztgzClick" class="bt">工序状态更正</el-button>
+                <el-button type="primary" icon="edit" disabled @click="pd_yysjcsonClick" class="bt">引用实际参数</el-button>
+                <el-button type="primary" icon="edit" disabled @click="pd_pccswhonClick" class="bt">排程参数维护</el-button>
+                <el-button type="primary" icon="edit" disabled @click="pd_pdcsfzonClick" class="bt">排单参数复制</el-button>
+                <el-button type="primary" icon="edit" disabled @click="pd_editscjhonClick" class="bt">编辑生产计划</el-button>
               </div>
+
               <div v-else>
                 <el-button type="primary" icon="edit"  @click="onjrpcClick" class="bt">加入排产</el-button>
                 <el-button type="primary" icon="edit"  @click="onztwgClick" class="bt">暂停排产</el-button>
                 <el-button type="primary" icon="edit"  @click="ongxwgClick" class="bt">工序完工</el-button>
-                <!--                <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>-->
-                                <el-button type="primary" icon="edit"  @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>
+                <el-button type="primary" icon="edit" @click="ongxztgzClick" class="bt">工序状态更正</el-button>
+                <el-button type="primary" icon="edit" disabled @click="onjztzClick" style="margin: 5px">机组调整</el-button>
+                <el-button type="primary" icon="edit"  @click="oncjsbpcClick" style="margin: 5px">车间设备排程</el-button>
               </div>
-              <!--                <el-button type="primary" icon="edit" disabled @click="onprintClick" style="margin: 5px">工单打印</el-button>-->
-              <!--                <el-button type="primary" icon="edit" disabled @click="ongxclhcClick" style="margin: 5px">工序产量核查</el-button>-->
-              <!--                <el-button type="primary" icon="edit" disabled @click="onlcdlistClick" style="margin: 5px">流程单查询</el-button>-->
+
+              <el-button type="primary" icon="edit" disabled @click="pd_gdprintonClick" class="bt">工单打印</el-button>
+              <el-button type="primary" icon="edit" disabled @click="pd_gxclhconClick" class="bt">工序产量核查</el-button>
+              <el-button type="primary" icon="edit" disabled @click="pd_lcdlistonClick" class="bt">流程单查询</el-button>
+
             </el-form-item>
           </el-form>
 
@@ -52,43 +61,46 @@
           <el-dialog v-model="gxztgzzlist" title="工序状态更正" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
             <el-button type="" @click="gxztgzzCancel">退出</el-button>
             <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
-              <el-form-item label="关键字 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
-                <el-input v-model="gxztgzzformData['gdbh']" @keyup.enter="gxztgzzgetProductValue" placeholder="" style="width: 500px;"/>
+              <el-form-item label="工单编号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
+                <el-input v-model="gxztgzzformData['gdbh']" @keyup.enter="gxztgzzgetProductValue" placeholder="" style="width: 200px;"/>
               </el-form-item>
             </div>
-            <el-table ref="multipleTable"
+            <el-table ref="paichengRef"
                       :show-overflow-tooltip="true"
                       :row-style="{ height: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                       :header-cell-style="{ padding: '0px' }"
-                      style="width: 100%;height: 710px" border tooltip-effect="dark"
-                      :data="gxztgzztableData" row-key="ID" @selection-change="handleSelectionChange">
-              <el-table-column v-slot="scope" align="left" label=印件及工序 width="600" >
-                <el-input disabled  v-model="scope.row.印件及工序" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=计划产量/已完成 width="590" >
-                <el-input disabled  v-model="scope.row['计划产量/已完成']" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=完成率 width="240" >
-                <el-input disabled  v-model="scope.row.完成率" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=完工时间 width="210" >
-                <el-input disabled  v-model="scope.row.完工时间" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=设备代号 width="240" >
-                <el-input disabled  v-model="scope.row.设备代号" :clearable="false"/>
-              </el-table-column>
+                      style="width: 100%;height: 74vh" border tooltip-effect="dark"
+                      :data="gxztgzztableData" row-key="ID"
+                      :cell-class-name="gxztgzzCellClass">
+              <template v-for="(item, idx) in gxztgzztableColumns">
+                <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+<!--                  <div v-if="['完工时间'].includes(item.prop)">-->
+<!--                    <el-input v-model="row[item.prop]"-->
+<!--                              :id="`input${idx}${$index}`" @keyup="gxztgzz_handleKeyDown($event, idx, $index, item.prop)"/>-->
+<!--                  </div>-->
+                  <div v-if="['完工时间'].includes(item.prop)">
+                    <el-date-picker
+                        v-model="row[item.prop]"
+                        type="datetime"
+
+                        :id="`datepicker${idx}${$index}`"
+                        placeholder="选择日期和时间">
+                    </el-date-picker>
+                  </div>
+                  <div v-else>{{ row[item.prop] }}</div>
+                </el-table-column>
+              </template>
             </el-table>
           </el-dialog>
+
           <!--加入排产【弹窗】-->
           <!--暂停完工【弹窗】-->
           <!--暂停完工【弹窗】-->
           <!--机组调整【弹窗】-->
           <!--车间设备排程【弹窗】-->
           <el-dialog v-model="cjsbpclist" title="车间设备排程" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
-            <el-button type="" icon="edit" disabled @click="oneditpcClick">更新排程</el-button>
             <el-button type="" @click="cjsbpcCancel">退出</el-button>
-
             <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; ">
               <div style="width: 100%; height: 60px; padding: 0px;  display: flex; align-items: center;">
                 <el-form-item label="设备代号 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
@@ -109,6 +121,11 @@
                 <el-form-item label="" prop="isBanciSelected" style="margin-left: 20px;">
                   <el-checkbox v-model="cjsbpcformData.isBanciSelected">所有班次</el-checkbox>
                 </el-form-item>
+
+                <el-form-item label="" prop="" style="margin-left: 25px;">
+<!--                <el-button type="" icon="edit"  @click="oneditpcClick">更新排程</el-button>-->
+                <el-button type="" icon="edit" disabled @click="oneditpcClick">更新排程</el-button>
+                </el-form-item>
               </div>
 
               <el-table ref="paichengRef"
@@ -117,6 +134,8 @@
                 :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                 :header-cell-style="{ padding: '0px' }"
                 style="width: 100%;height: 74vh" border tooltip-effect="dark"
+                highlight-current-row="true"
+                @row-click="cjpc_tableRowClick"
                 :data="paichengData" row-key="ID"
               >
                 <template v-for="(item, idx) in paichengColumns">
@@ -155,9 +174,9 @@
                 </el-form-item>
               </div>
             </div>
-
           </el-dialog>
 
+
         </div>
       </layout-header>
 
@@ -581,11 +600,14 @@ const workbenchdata = async () => {
 workbenchdata();
 //全局获取工单编号
 const _Gd_gdbh = ref(null)
-//点击表格 通过【工单编号】获取下方表格数据
+//点击表格 通过上方表格【工单编号】获取下方表格数据
+const chejianRowClick = async (row) => {
+  _Gd_gdbh.value = row.工单编号;
+  console.log(_Gd_gdbh.value);
+}
 const gdtableRowClick = async (row) => {
   _Gd_gdbh.value = row.工单编号;
   console.log(_Gd_gdbh.value);
-
   if (currentNode.value == "计划中") {
     if(row['statusColumn'] === "*"){
       gytableData.value = [];
@@ -648,36 +670,56 @@ const handleNodeClick = async (node) => {
 const searchInfo = ref('');
 // 提交搜索
 const onSubmit = () => {
-  // console.log(searchInfo.value)
-  // console.log(currentNode.value)
-  // console.log(_machine.value)
-  if(_machine.value){
-    // console.log(2131211111111111111111111111111)
-    _MachineWorkOrderList();
-  }else{
-    if(searchInfo.value === '' || searchInfo.value === null ){
-      ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
-      return false;
-    }
-    if(currentNode.value === '计划中' || currentNode.value === '已完工'){
-      _Project();
-      return false;
-    }
-    if(currentNode.value === '排程中' || currentNode.value === '制程中'){
-      _Schedule();
-      return false;
-    }
+  if (!searchInfo.value || !_machine.value) {
+    ElMessage({ type: 'warning', message: '请输入工单编号和具体条件' });
+    return false;
+  }
+  const isPureNumber = /^\d+$/.test(searchInfo.value);
+  if (!isPureNumber) {
+    ElMessage({ type: 'warning', message: '请输入正确的工单编号' });
+    return false;
+  }
+  if (currentNode.value === '计划中' || currentNode.value === '已完工') {
+    _Project();
+  } else if (currentNode.value === '排程中' || currentNode.value === '制程中') {
+    _Schedule();
+  } else {
+    ElMessage({ type: 'warning', message: '查询不到具体条件的工单' });
   }
-
-
-
 };
+// const onSubmit = () => {
+//   const isPureNumber = /^[\d]+$/.test(searchInfo.value);
+//   if (isPureNumber) {
+//     if(_machine.value){
+//       _MachineWorkOrderList();
+//     }else if(_machine.value === '' || _machine.value === null){
+//       ElMessage({type: 'warning',message: '查询不到具体条件的工单'})
+//       return false;
+//     }else{
+//       {
+//         if(searchInfo.value === '' || searchInfo.value === null ){
+//           ElMessage({type: 'warning',message: '查询不到具体条件的工单'})
+//           return false;
+//         }
+//         if(currentNode.value === '计划中' || currentNode.value === '已完工'){
+//           _Project();
+//           return false;
+//         }
+//         if(currentNode.value === '排程中' || currentNode.value === '制程中'){
+//           _Schedule();
+//           return false;
+//         }
+//       }
+//     }
+//   } else {
+//     ElMessage({type: 'warning',message: '请输入正确的工单编号'})
+//   }
+// };
 // 搜索计划中、已完工一条工单
 const _Project = async () => {
   const status = currentNode.value;
   const search = searchInfo.value;
   const Project_search = await Project({status:status,search:search});
-  console.log(Project_search);
   if(Project_search.msg === '成功'){
     tableData.value = Project_search.data;
   }else{
@@ -689,10 +731,7 @@ const _Project = async () => {
 const _Schedule = async () => {
   const status = currentNode.value;
   const search = searchInfo.value;
-  console.log(status)
-  console.log(search)
   const Schedule_search = await Schedule({status:status,search:search});
-  console.log(Schedule_search);
   if(Schedule_search.msg === '成功'){
     chejianData.value = Schedule_search.data;
   }else{
@@ -702,37 +741,50 @@ const _Schedule = async () => {
 };
 //机台搜索一条工单
 const _MachineWorkOrderList = async () => {
-  console.log(123)
   let params = {}
   params.search = searchInfo.value;
   params.machine = _machine.value;
-  console.log(params)
   const MachineWorkOrderList_search = await MachineWorkOrderList(params);
-  if(MachineWorkOrderList_search.code === 0){
-    chejianfuData.value = MachineWorkOrderList_search.data['制程'];
-    chejianData.value = MachineWorkOrderList_search.data['排程'];
-  }else{
+  if(MachineWorkOrderList_search.msg === ''){
     ElMessage({type: 'warning',message: '查不到具体条件的工单'})
     return false;
+  }else{
+    chejianfuData.value = MachineWorkOrderList_search.data['制程'];
+    chejianData.value = MachineWorkOrderList_search.data['排程'];
   }
 };
 
-// const paichengForm = ref([])
-// const paichengData = ref([
-//   {
-//     优先次序: 1, 工单编号: 1000, 印件名称: 'test',接货数: 111,
-//     小时产能: 1, 产能系数: 1.5, 生产工时: 333, 辅助工时: 222,
-//     班次安排: '1111', 排单备注: '备注备注', 最早开工时间: '2023-01-01 08:08:08',
-//     计划开工时间: '2023-01-01 08:08:08', 计划完工时间: '2023-01-01 08:08:08',
-//     销售订单号: '3335555', '印件/工序': '321312',
-//   }
-// ])
-
-
 // =========== 【工序状态更正】 ===========
+const gxztgzztableColumns = ref(
+    [
+      { label: '印件及工序', prop: '印件及工序', width: '600' },
+      { label: '计划产量/已完成', prop:['计划产量/已完成'], width: '500' },
+      { label: '完成率', prop: '完成率', width: '240' },
+      { label: '完工时间', prop: '完工时间', width: '300' },
+      { label: '设备代号', prop: '设备代号', width: '240' },
+    ]
+)
+const gxztgzz_handleKeyDown = (event, x, y, prop) => {
+  const currentElement = document.getElementById(`input${x}${y}`);
+  if (currentElement === null && currentElement === undefined) return
+  switch (event.keyCode) {
+    case 13: // Enter
+    case 40: // 向下箭头
+      if (y < gxztgzztableData.value.length )
+        document.getElementById(`input${x}${y + 1}`).focus();
+      break;
+    case 38: // 向上箭头
+      if ( y > 0) {
+        document.getElementById(`input${x}${y - 1}`).focus();
+      }
+      break;
+    default:
+      break;
+  }
+}
+const gxztgzztableData = ref([]);
 const gxztgzzlist = ref(false);
 const gxztgzzformData = reactive({gdbh: '',});
-const gxztgzztableData = ref([]);
 //工序状态更正【按钮】
 const ongxztgzClick = () => {
   if(_Gd_gdbh.value == null){
@@ -928,8 +980,9 @@ const handleKeyDown = (event, x, y, prop) => {
   switch (event.keyCode) {
     case 13: // Enter
     case 40: // 向下箭头
-        if (y < paichengData.value.length )
-      document.getElementById(`input${x}${y + 1}`).focus();
+        if (y < paichengData.value.length ){
+          document.getElementById(`input${x}${y + 1}`).focus();
+        }
       break;
     case 38: // 向上箭头
       if ( y > 0) {
@@ -974,9 +1027,9 @@ const onlcdlistClick = async () => {
 //状态设置【按钮】
 const onstatuslist = ref(false);
 const statusformData = reactive({gdbh: '',});
-const status = ref('计划中'); // 默认选择在产
+const status = ref('计划中'); // 默认选择
 const onStatusClick = () => {
-  if(_Gd_gdbh.value == null){
+  if(_Gd_gdbh.value === null || _Gd_gdbh.value === ''){
     onstatuslist.value = false;
     ElMessage({
       type: 'warning',
@@ -1082,6 +1135,9 @@ const enterDialog = async () => {
 const closeDialog = () => {dialogFormVisible.value = false}
 
 
+
+
+//=============车间设备排程================
 const cjsbpclist = ref(false);
 const cjsbpcformData = reactive({
   //设备代号
@@ -1092,8 +1148,6 @@ const cjsbpcformData = reactive({
   banci: '',
   isBanciSelected: false,
 });
-
-//=============车间设备排程================
 //车间设备排程【按钮】
 const oncjsbpcClick = () => {
   cjsbpcformData['sbdh'] = _machine.value;
@@ -1101,27 +1155,42 @@ const oncjsbpcClick = () => {
   _ScheduleSelectiondata();
   cjsbpclist.value = true;
 };
-//班次选择列表
+//调用班次选择列表接口
 const _ScheduleSelectiondata = async ()=>{
   try {
     const ScheduleSelectiondata = await ScheduleSelection();
     // 清空之前的数据
     cjsbpcformData.bancis = [];
-
     // 循环遍历数组并将每个班次的detail添加到bancis数组中
     for (const option of ScheduleSelectiondata.data) {
       cjsbpcformData.bancis.push({ label: option.detail, value: option.detail.split('||')[0], rename:option.detail});
     }
-    console.log("赋值后的数据:", cjsbpcformData.bancis);
+    //班次列表数据
+    // console.log("赋值后的数据:", cjsbpcformData.bancis);
   } catch (error) {
     console.error(error);
   }
 }
 //车间设备排程->数据展示
 const paichengData = ref([])
+//点击车间排程行
+const _bcxz_val = ref(null)
 
+//点击表格行的时候触发的方法
+const cjpc_tableRowClick = (row) => {
+  _bcxz_val.value = row; // 保存点击的行数据
+}
+//班次选择列表下拉框
 const setBanci = (v) => {
-  paichengData.value.map( item => item.班次安排 = v)
+  if(cjsbpcformData['isBanciSelected'] === true){
+    console.log("已选择所有班次")
+    paichengData.value.map( item => item.班次安排 = v)
+  }else{
+    console.log("未选择所有班次")
+    if (_bcxz_val.value) {
+      _bcxz_val.value['班次安排'] = v;
+    }
+  }
 }
 const _EquipmentSchedulingdata = async ()=>{
   // let machine = 'WY01#';
@@ -1139,9 +1208,25 @@ const _EquipmentSchedulingdata = async ()=>{
 
 
 //车间设备排程【更新排程】
-const oneditpcClick = () => {
-  console.log("更新排程")
-  cjsbpclist.value = true;
+const oneditpcClick = async () => {
+  // console.log(paichengData)
+  const rawValueArray = paichengData._rawValue;
+  const formattedData = rawValueArray.map(item => {
+    return {
+      capacity: item.小时产能,
+      ProductionHours: item.生产工时,
+      AuxiliaryHours: item.辅助工时,
+      shift: item.班次安排,
+      remark: item.排单备注,
+      start: item.计划开工时间,
+      projectTime: item.计划完工时间,
+      UniqId: item.UniqId
+    };
+  });
+  console.log(formattedData)
+  // const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
+  // console.log(EquipmentSchedulingEdit_edit)
+  // cjsbpclist.value = true;
 };
 //车间设备排程【退出】
 const cjsbpcCancel = () => {
@@ -1149,9 +1234,37 @@ const cjsbpcCancel = () => {
 };
 
 
+//工序状态更正颜色
+const gxztgzzCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if(row['完工时间'] === ''){
+    return 'lan-plan-usage-low';
+  }else{
+    return 'hui-plan-usage-low';
+  }
+
+}
 
 </script>
 <style scoped>
+/*背景颜色*/
+/* 选中某行时的背景色 */
+:deep(.el-table__body tr.current-row) > td {
+  background: #ff80ff !important;
+}
+/*:deep(.el-table__body .current-row div div) {*/
+/*  background: #ff80ff !important;*/
+/*}*/
+
+/*文字颜色*/
+/*工序状态更正颜色【灰色】*/
+:deep(.hui-plan-usage-low div) {
+  color: #8c939d !important;
+}
+/*工序状态更正颜色【蓝色】*/
+:deep(.lan-plan-usage-low div) {
+  color: blue !important;
+}
+
 :deep(.el-tabs__header){
   margin-bottom: 0;
 }
@@ -1176,10 +1289,6 @@ const cjsbpcCancel = () => {
 .JKWTree-content {
   flex: 1;
 }
-/* 选中某行时的背景色 */
-:deep(.el-table__body tr.current-row) > td {
-  background: #ff80ff !important;
-}
 </style>
 <style scoped>
 

+ 358 - 235
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -6,7 +6,7 @@
 <!--按钮部分-->
         <el-form ref="elSearchFormRef"  class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
           <el-form-item>
-            <el-input v-model="searchInfo" clearable placeholder="搜索工单编号" style="width: 180px;"></el-input>
+            <el-input v-model="searchInfo"  placeholder="搜索工单编号" style="width: 180px;"></el-input>
             <el-button type="primary"  icon="search" @click="onSubmit"></el-button>
             <el-button type="primary"  icon="edit"   @click="ontlssclick"       class="bt">U8投料试算</el-button>
             <el-button type="primary"  icon="edit"   @click="onyycpzlclick"     class="bt">引用产品资料</el-button>
@@ -161,57 +161,57 @@
           <el-button type="primary"  @click="gylctz_fjbzgx" style="margin: 5px;">附加标准工序</el-button>
 
           <!--工艺流程调整中 附加标准工序-->
-          <el-dialog v-model="gdzlfjxx" title="工单工艺流程附加选择"  style="width: 80%;height:80%;bottom: 3%;">
-            <div><el-button  type="primary" @click="addGongyiAttach" :disabled="attachList.length === 0">执行</el-button></div>
+          <el-dialog v-model="gdzlfjxx" title="工单工艺流程附加选择"  style="width: 100%;height:100%;margin: 0">
+            <el-button  type="primary" @click="addGongyiAttach" :disabled="attachList.length === 0">执行</el-button>
+            <el-button  type="" @click="gylcfj_fangqi" >放弃</el-button>
             <div>
               <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
                 <el-form-item label="产品代号 :" prop="currentProcess" class="mab">
-                  <el-input v-model="gdzlfjxxformData['cpdh']" disabled placeholder="" />
-                  <el-input v-model="gdzlfjxxformData['cpmc']" disabled placeholder="" />
+                  <el-input v-model="gdzlfjxxformData['cpdh']" disabled placeholder="" style="width: 200px;"/>
+                  <el-input v-model="gdzlfjxxformData['cpmc']" disabled placeholder="" style="width: 500px;margin-left: 20px"/>
                 </el-form-item>
-                <el-form-item label="工单编号:" prop="originalName"  class="mab">
-                  <el-select v-model="gdzlfjxxformData.cpgyfan" placeholder="请选择" allow-create filterable >
+                <el-form-item label="工单编号:" prop="originalName"  class="mab" style="margin-left: 20px">
+                  <el-select v-model="gdzlfjxxformData.cpgyfan" placeholder="请选择" allow-create filterable  >
                     <el-option v-for="option in gdzlfjxxformData.cpgyfans" @click="ongdzlfanclick" :key="option" :label="option" :value="option" />
                   </el-select>
                 </el-form-item>
               </div>
-
               <el-table ref="multipleTable"
                         :show-overflow-tooltip="true"
                         :row-style="{ height: '0px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                         :header-cell-style="{ padding: '0px' }"
-                        style="width: 100%; height: 57vh" border tooltip-effect="dark"
+                        style="width: 100%; height: 70vh" border tooltip-effect="dark"
                         :data="gdzlfjxxtableData" row-key="ID" @selection-change="attachChange">
-                <el-table-column type="selection" width="55" />
-                <el-table-column v-slot="scope" align="left" label="方案" width="80">
+                <el-table-column type="selection" width="30" />
+                <el-table-column v-slot="scope" align="left" label="方案" width="70">
                   <el-input disabled v-model="scope.row.方案" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="印件号" width="80">
+                <el-table-column v-slot="scope" align="left" label="印件号" width="70">
                   <el-input disabled v-model="scope.row.印件号" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="工序号" width="100">
+                <el-table-column v-slot="scope" align="left" label="工序号" width="70">
                   <el-input disabled v-model="scope.row.工序号" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="工序名称" width="340">
+                <el-table-column v-slot="scope" align="left" label="工序名称" width="350">
                   <el-input disabled v-model="scope.row.工序名称" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="工价系数" width="100">
+                <el-table-column v-slot="scope" align="left" label="工价系数" width="90">
                   <el-input disabled v-model="scope.row.工价系数" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="损耗系数" width="100">
+                <el-table-column v-slot="scope" align="left" label="损耗系数" width="90">
                   <el-input disabled v-model="scope.row.损耗系数" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="开数" width="80">
+                <el-table-column v-slot="scope" align="left" label="开数" width="70">
                   <el-input disabled v-model="scope.row.ks" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="联数" width="80">
+                <el-table-column v-slot="scope" align="left" label="联数" width="70">
                   <el-input disabled v-model="scope.row.ls" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="备注" width="100">
+                <el-table-column v-slot="scope" align="left" label="备注" width="200">
                   <el-input disabled v-model="scope.row.备注" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="车间" width="120">
+                <el-table-column v-slot="scope" align="left" label="车间" width="105">
                   <el-input disabled v-model="scope.row.车间" :clearable="false"/>
                 </el-table-column>
                 <el-table-column v-slot="scope" align="left" label="设备编号" width="100">
@@ -220,7 +220,7 @@
                 <el-table-column v-slot="scope" align="left" label="设备名称" width="100">
                   <el-input disabled v-model="scope.row.设备名称" :clearable="false"/>
                 </el-table-column>
-                <el-table-column v-slot="scope" align="left" label="建档用户" width="160">
+                <el-table-column v-slot="scope" align="left" label="建档用户" width="120">
                   <el-input disabled v-model="scope.row.建档用户" :clearable="false"/>
                 </el-table-column>
                 <el-table-column v-slot="scope" align="left" label="建档时间" width="160">
@@ -230,9 +230,6 @@
                   <el-input disabled v-model="scope.row.更新时间" :clearable="false"/>
                 </el-table-column>
               </el-table>
-
-
-
             </div>
           </el-dialog>
 
@@ -246,58 +243,23 @@
                 <el-input v-model="gylctzformData['gdmc']"  disabled  placeholder="" style="width: 340px;margin-left: 10px;margin: 10px"/>
               </el-form-item>
             </div>
-            <el-table ref="multipleTable"
+            <el-table ref="paichengRef"
                       :show-overflow-tooltip="true"
                       :row-style="{ height: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                       :header-cell-style="{ padding: '0px' }"
-                      style="width: 100%; height: 70vh" border tooltip-effect="dark"
-                      :data="gylctztableData" row-key="ID" @selection-change="handleSelectionChange">
-              <el-table-column v-slot="scope" align="left" label="方案" width="80">
-                <el-input disabled v-model="scope.row.方案" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="印件号" width="80">
-                <el-input disabled v-model="scope.row.印件号" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="工序号" width="100">
-                <el-input v-model="scope.row.工序号" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="工序名称" width="340">
-                <el-input disabled v-model="scope.row.工序名称" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="工价系数" width="100">
-                <el-input disabled v-model="scope.row.工价系数" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="损耗系数" width="100">
-                <el-input disabled v-model="scope.row.损耗系数" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="开数" width="80">
-                <el-input disabled v-model="scope.row.ks" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="联数" width="80">
-                <el-input disabled v-model="scope.row.ls" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="备注" width="100">
-                <el-input disabled v-model="scope.row.备注" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="车间" width="120">
-                <el-input disabled v-model="scope.row.车间" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="设备编号" width="100">
-                <el-input disabled v-model="scope.row.设备编号" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="设备名称" width="100">
-                <el-input disabled v-model="scope.row.设备名称" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="建档用户" width="160">
-                <el-input disabled v-model="scope.row.建档用户" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="建档时间" width="160">
-                <el-input disabled v-model="scope.row.建档时间" :clearable="false"/>
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label="更新时间" width="160">
-                <el-input disabled v-model="scope.row.更新时间" :clearable="false"/>
-              </el-table-column>
+                      style="width: 100%;height: 74vh" border tooltip-effect="dark"
+                      :data="gylctztableData" row-key="ID"
+                      :cell-class-name="gylctzCellClass">
+              <template v-for="(item, idx) in gylctztableColumns">
+                <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+                  <div v-if="['工序号'].includes(item.prop)">
+                    <el-input v-model="row[item.prop]" :clearable="false"
+                              :id="`input${idx}${$index}`" @keyup="gylctz_handleKeyDown($event, idx, $index, item.prop)"/>
+                  </div>
+                  <div v-else>{{ row[item.prop] }}</div>
+                </el-table-column>
+              </template>
             </el-table>
           </div>
         </el-dialog>
@@ -311,9 +273,9 @@
           <div>
             <div style="width: 100%; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;margin: 0px 0px 20px 0px">
               <el-form-item label="当前工单:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
-                <el-input v-model="cgugdformData['gdbh']"  @keyup.enter="cgugdProductValue"  placeholder="" style="width: 160px;"/>
-                <el-input v-model="cgugdformData['cpdh']"  disabled  placeholder="" style="width: 160px;margin-left: 10px"/>
-                <el-input v-model="cgugdformData['gdmc']"  disabled  placeholder="" style="width: 340px;margin-left: 10px"/>
+                <el-input v-model="cgugdformData['gdbh']"  @keyup.enter="cgugdProductValue"  placeholder="" style="width: 200px;"/>
+                <el-input v-model="cgugdformData['cpdh']"  disabled  placeholder="" style="width: 120px;margin-left: 10px"/>
+                <el-input v-model="cgugdformData['gdmc']"  disabled  placeholder="" style="width: 500px;margin-left: 10px"/>
               </el-form-item>
             </div>
             <el-table ref="multipleTable"
@@ -341,74 +303,33 @@
 
         <!--修正核算参数-->
         <el-dialog v-model="xzhscslist"   title="修正核算参数"  style="width: 100%;height: 100%;margin: 0px;padding: 0px">
-
           <el-button type="primary"  @click="xzhscsConfirm">更新</el-button>
           <el-button type="" @click="sxzhscsCancel">退出</el-button>
-
           <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
-            <el-form-item label="关键字 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
+            <el-form-item label="当前工单 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
               <el-input v-model="xzhscsformData['gdbh']"
-                        @keyup.enter="xzhscsgetProductValue" placeholder="" style="width: 500px;"/>
+                        @keyup.enter="xzhscsgetProductValue"  style="width: 200px;"/>
+              <el-input v-model="xzhscsformData['cpdh']"   disabled   style="width: 120px;margin-left: 10px;"/>
+              <el-input v-model="xzhscsformData['gdmc']"   disabled   style="width: 500px;"/>
             </el-form-item>
           </div>
-          <el-table ref="multipleTable"
+          <el-table ref="paichengRef"
                     :show-overflow-tooltip="true"
                     :row-style="{ height: '0px' }"
                     :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                     :header-cell-style="{ padding: '0px' }"
-                    style="width: 100%;height: 70vh" border tooltip-effect="dark"
-                    :data="sxzhscstableData" row-key="ID" @selection-change="handleSelectionChange">
-            <el-table-column v-slot="scope" align="left" label=方案 width="70" >
-              <el-input disabled  v-model="scope.row.方案" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=印件号及工序名称 width="270" >
-              <el-input disabled  v-model="scope.row.印件号及工序名称" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=参照设备 width="94" >
-              <el-input disabled  v-model="scope.row.参照设备" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=难度系数 width="90" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_难度系数" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新难度系数 width="100" >
-              <el-input   v-model="scope.row.难度系数" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原损耗代号 width="150" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_损耗代号" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=基础损耗 width="90" >
-              <el-input disabled  v-model="scope.row.基础损耗" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=损耗率 width="100" >
-              <el-input disabled  v-model="scope.row.损耗率" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新损耗代号 width="150" >
-              <el-input  v-model="scope.row.损耗代号" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原印刷方式 width="100" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_印刷方式" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原来版距 width="90" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_版距" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新印刷方式 width="100" >
-              <el-input   v-model="scope.row.印刷方式" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新来版距 width="90" >
-              <el-input   v-model="scope.row.版距" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原计损色数 width="100" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_计损色数" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=计损色数 width="90" >
-              <el-input   v-model="scope.row.计损色数" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原损耗系数 width="100" >
-              <el-input disabled  v-model="scope.row.sxzhscsold_损耗系数" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=损耗系数 width="90" >
-              <el-input   v-model="scope.row.损耗系数" :clearable="false"/>
-            </el-table-column>
+                    style="width: 100%;height: 74vh" border tooltip-effect="dark"
+                    :data="sxzhscstableData" row-key="ID"
+                    :cell-class-name="sxzhscsCellClass">
+            <template v-for="(item, idx) in xzhstableColumns">
+              <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+                <div v-if="['难度系数', '损耗代号', '印刷方式', '版距','计损色数', '损耗系数'].includes(item.prop)">
+                  <el-input v-model="row[item.prop]" :clearable="false"
+                            :id="`input${idx}${$index}`" @keyup="handleKeyDown($event, idx, $index, item.prop)"/>
+                </div>
+                <div v-else>{{ row[item.prop] }}</div>
+              </el-table-column>
+            </template>
           </el-table>
         </el-dialog>
 
@@ -419,68 +340,89 @@
           <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
             <el-form-item label="关键字 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
               <el-input v-model="scfjfpxsformData['cpdh']"
-                        @keyup.enter="scfjfpxsgetProductValue" placeholder="" style="width: 500px;"/>
+                        @keyup.enter="scfjfpxsgetProductValue" placeholder="" style="width: 200px;"/>
             </el-form-item>
           </div>
-          <el-table ref="multipleTable"
+          <el-table ref="paichengRef"
                     :show-overflow-tooltip="true"
                     :row-style="{ height: '0px' }"
                     :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                     :header-cell-style="{ padding: '0px' }"
-                    style="width: 100%;height: 70vh" border tooltip-effect="dark"
-                    :data="scfjfpxstableData" row-key="ID" @selection-change="handleSelectionChange">
-            <el-table-column v-slot="scope" align="left" label=产品编号 width="120" >
-              <el-input disabled  v-model="scope.row.产品编号" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=产品名称 width="200" >
-              <el-input disabled  v-model="scope.row.产品名称" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=印件工序及工艺 width="220" >
-              <el-input disabled  v-model="scope.row.印件工序及工艺" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原人工正品板 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_人工正品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原人工次品板 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_人工次品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原人工废检 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_人工废检" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原机检正品板 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_机检正品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原机检次品板 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_机检次品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=原机检废检 width="110" >
-              <el-input disabled  v-model="scope.row.scfjfpxsold_机检废检" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新人工正品板 width="110" >
-              <el-input   v-model="scope.row.人工正品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新人工次品板 width="110" >
-              <el-input   v-model="scope.row.人工次品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新人工废检 width="110" >
-              <el-input   v-model="scope.row.人工废检" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新机检正品板 width="110" >
-              <el-input   v-model="scope.row.机检正品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新机检次品板 width="110" >
-              <el-input   v-model="scope.row.机检次品板" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=新机检废检 width="110" >
-              <el-input   v-model="scope.row.机检废检" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=设备编号 width="100" >
-              <el-input disabled  v-model="scope.row.设备编号" :clearable="false"/>
-            </el-table-column>
-            <el-table-column v-slot="scope" align="left" label=客户名称 width="200" >
-              <el-input disabled  v-model="scope.row.客户名称" :clearable="false"/>
-            </el-table-column>
+                    style="width: 100%;height: 74vh" border tooltip-effect="dark"
+                    :data="scfjfpxstableData" row-key="ID"
+                    :cell-class-name="scfjfpxsCellClass">
+            <template v-for="(item, idx) in zjfpxs_tableColumns">
+              <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+                <div v-if="['人工正品板', '人工次品板', '人工废检', '机检正品板','机检次品板', '机检废检'].includes(item.prop)">
+                  <el-input v-model="row[item.prop]" :clearable="false"
+                            :id="`input${idx}${$index}`" @keyup="zjfpxs_handleKeyDown($event, idx, $index, item.prop)"/>
+                </div>
+                <div v-else>{{ row[item.prop] }}</div>
+              </el-table-column>
+            </template>
           </el-table>
+
+
+
+<!--          <el-table ref="multipleTable"-->
+<!--                    :show-overflow-tooltip="true"-->
+<!--                    :row-style="{ height: '0px' }"-->
+<!--                    :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"-->
+<!--                    :header-cell-style="{ padding: '0px' }"-->
+<!--                    style="width: 100%;height: 70vh" border tooltip-effect="dark"-->
+<!--                    :data="scfjfpxstableData" row-key="ID" @selection-change="handleSelectionChange">-->
+<!--            <el-table-column v-slot="scope" align="left" label=产品编号 width="120" >-->
+<!--              <el-input disabled  v-model="scope.row.产品编号" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=产品名称 width="200" >-->
+<!--              <el-input disabled  v-model="scope.row.产品名称" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=印件工序及工艺 width="220" >-->
+<!--              <el-input disabled  v-model="scope.row.印件工序及工艺" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原人工正品板 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_人工正品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原人工次品板 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_人工次品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原人工废检 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_人工废检" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原机检正品板 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_机检正品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原机检次品板 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_机检次品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=原机检废检 width="110" >-->
+<!--              <el-input disabled  v-model="scope.row.scfjfpxsold_机检废检" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新人工正品板 width="110" >-->
+<!--              <el-input   v-model="scope.row.人工正品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新人工次品板 width="110" >-->
+<!--              <el-input   v-model="scope.row.人工次品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新人工废检 width="110" >-->
+<!--              <el-input   v-model="scope.row.人工废检" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新机检正品板 width="110" >-->
+<!--              <el-input   v-model="scope.row.机检正品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新机检次品板 width="110" >-->
+<!--              <el-input   v-model="scope.row.机检次品板" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=新机检废检 width="110" >-->
+<!--              <el-input   v-model="scope.row.机检废检" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=设备编号 width="100" >-->
+<!--              <el-input disabled  v-model="scope.row.设备编号" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--            <el-table-column v-slot="scope" align="left" label=客户名称 width="200" >-->
+<!--              <el-input disabled  v-model="scope.row.客户名称" :clearable="false"/>-->
+<!--            </el-table-column>-->
+<!--          </el-table>-->
         </el-dialog>
       </div>
 
@@ -1041,10 +983,78 @@ import {
 defineOptions({name: 'Company'})
 
 // =========== 修正核算参数 ===========
+const xzhstableColumns = ref(
+    [
+      { label: '方案', prop: '方案', width: '65' },
+      { label: '印件号及工序名称', prop: '印件号及工序名称', width: '300' },
+      { label: '参照设备', prop: '参照设备', width: '90' },
+      { label: '难度系数', prop: 'sxzhscsold_难度系数', width: '90' },
+      { label: '新难度系数', prop: '难度系数', width: '100' },
+      { label: '原损耗代号', prop: 'sxzhscsold_损耗代号', width: '150' },
+      { label: '基础损耗', prop: '基础损耗', width: '90' },
+      { label: '新损耗代号', prop: '损耗代号', width: '150' },
+      { label: '原印刷方式', prop: 'sxzhscsold_印刷方式', width: '150' },
+      { label: '原来版距', prop: 'sxzhscsold_版距', width: '100' },
+      { label: '新印刷方式', prop: '印刷方式', width: '100' },
+      { label: '新来版距', prop: '版距', width: '90' },
+      { label: '原计损色数', prop: 'sxzhscsold_计损色数', width: '100' },
+      { label: '新计损色数', prop: '计损色数', width: '100' },
+      { label: '原损耗系数', prop: 'sxzhscsold_损耗系数', width: '100' },
+      { label: '新损耗系数', prop: '损耗系数', width: '100' },
+    ]
+)
+const handleKeyDown = (event, x, y, prop) => {
+  const currentElement = document.getElementById(`input${x}${y}`);
+  if (currentElement === null && currentElement === undefined) return
+  let move = 0
+  switch (event.keyCode) {
+    case 13: // Enter
+    case 40: // 向下箭头
+      if (y < sxzhscstableData.value.length )
+        document.getElementById(`input${x}${y + 1}`).focus();
+      break;
+    case 38: // 向上箭头
+      if ( y > 0) {
+        document.getElementById(`input${x}${y - 1}`).focus();
+      }
+      break;
+    case 39: // 向左箭头
+      if ( x === 4) {
+        move = x + 3
+      } else if(x === 7){
+        move = x + 3
+      } else if( x === 10){
+        move = x + 1
+      }else if( x === 11){
+        move = x + 2
+      }else if( x === 13){
+        move = x + 2
+      }
+      document.getElementById(`input${move}${y}`).focus();
+      break;
+    case 37: // 向右箭头
+      if ( x === 15) {
+        move = x -  2
+      } else if (x=== 13) {
+        move = x - 2
+      }else if (x=== 11) {
+        move = x - 1
+      }else if (x=== 10) {
+        move = x - 3
+      }else if (x=== 7) {
+        move = x - 3
+      }
+      document.getElementById(`input${move}${y}`).focus();
+      break;
+    default:
+      break;
+  }
+}
 const xzhscslist = ref(false);
-
 const xzhscsformData = reactive({
   gdbh: '',
+  cpdh: '',
+  gdmc: '',
 });
 const sxzhscstableData = ref([]);
 //修正核算参数按钮
@@ -1054,6 +1064,8 @@ const onxzhscsclick = () => {
     ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能' })
   }else{
     xzhscsformData['gdbh'] = _Gd_gdbh.value;
+    xzhscsformData['cpdh'] = _Gd_cpdh.value;
+    xzhscsformData['gdmc'] = _Gd_cpmc.value;
     _AccountingParameterdata();
     xzhscslist.value = true;
   }
@@ -1062,7 +1074,7 @@ const onxzhscsclick = () => {
 const xzhscsgetProductValue = () => {
   _AccountingParameterdata()
 };
-// 修正工单核算参数->数据获取
+// 修正工单核算参数表格数据
 const _AccountingParameterdata = async ()=>{
   let workOrder = xzhscsformData['gdbh'];
   try {
@@ -1081,10 +1093,8 @@ const _AccountingParameterdata = async ()=>{
     console.error(error);
   }
 }
-
 //修正核算参数更新
 const xzhscsConfirm = async () => {
-  console.log(sxzhscstableData)
   const firstCharValid = sxzhscstableData.value.map(item => {
     const firstChar = item["损耗代号"] ? item["损耗代号"].charAt(0) : '';
     return firstChar === '0' || firstChar === '';
@@ -1117,14 +1127,64 @@ const xzhscsConfirm = async () => {
     console.error("数据错误");
   }
 };
-
 //修正核算参数退出
 const sxzhscsCancel = () => {
   xzhscslist.value = false;
 };
 
-
 // =========== 质检废品系数 ===========
+const zjfpxs_tableColumns = ref(
+    [
+      { label: '产品编号', prop: '产品编号', width: '95' },
+      { label: '产品名称', prop: '产品名称', width: '200' },
+      { label: '印件工序及工艺', prop: '印件工序及工艺', width: '220' },
+      { label: '新人工正品板', prop: 'scfjfpxsold_人工正品板', width: '110' },
+      { label: '新人工次品板', prop: 'scfjfpxsold_人工次品板', width: '110' },
+      { label: '新人工废检', prop: 'scfjfpxsold_人工废检', width: '110' },
+      { label: '新机检正品板', prop: 'scfjfpxsold_机检正品板', width: '110' },
+      { label: '新机检次品板', prop: 'scfjfpxsold_机检次品板', width: '110' },
+      { label: '新机检废检', prop: 'scfjfpxsold_机检废检', width: '110' },
+      { label: '人工正品板', prop: '人工正品板', width: '110' },
+      { label: '人工次品板', prop: '人工次品板', width: '110' },
+      { label: '人工废检', prop: '人工废检', width: '110' },
+      { label: '机检正品板', prop: '机检正品板', width: '110' },
+      { label: '机检次品板', prop: '机检次品板', width: '110' },
+      { label: '机检废检', prop: '机检废检', width: '110' },
+      { label: '设备编号', prop: '设备编号', width: '100' },
+      { label: '客户名称', prop: '客户名称', width: '200' },
+    ]
+)
+const zjfpxs_handleKeyDown = (event, x, y, prop) => {
+  const currentElement = document.getElementById(`input${x}${y}`);
+  if (currentElement === null && currentElement === undefined) return
+  let move = 0
+  switch (event.keyCode) {
+    case 13: // Enter
+    case 40: // 向下箭头
+      if (y < scfjfpxstableData.value.length )
+        document.getElementById(`input${x}${y + 1}`).focus();
+      break;
+    case 38: // 向上箭头
+      if ( y > 0) {
+        document.getElementById(`input${x}${y - 1}`).focus();
+      }
+      break;
+    case 39: // 向左箭头
+      if (x >= 9 && x <=14) {
+        move = x + 1
+      }
+      document.getElementById(`input${move}${y}`).focus();
+      break;
+    case 37: // 向右箭头
+      if (x >= 9 && x <=14) {
+        move = x - 1
+      }
+      document.getElementById(`input${move}${y}`).focus();
+      break;
+    default:
+      break;
+  }
+}
 const scfjfpxslist = ref(false);
 const scfjfpxsformData = reactive({
   cpdh: '',
@@ -1280,6 +1340,44 @@ const oncgugdcloneclick = () => {
 
 
 // =========== 工艺流程调整 ===========
+const gylctztableColumns = ref(
+    [
+      { label: '方案', prop: '方案', width: '80' },
+      { label: '印件号', prop: '印件号', width: '90' },
+      { label: '工序号', prop: '工序号', width: '100' },
+      { label: '工序名称', prop: '工序名称', width: '340' },
+      { label: '工价系数', prop: '工价系数', width: '100' },
+      { label: '损耗系数', prop: '损耗系数', width: '100' },
+      { label: '联数', prop: 'ls', width: '80' },
+      { label: '开数', prop: 'ks', width: '80' },
+      { label: '备注', prop: '备注', width: '100' },
+      { label: '车间', prop: '车间', width: '120' },
+      { label: '设备编号', prop: '设备编号', width: '120' },
+      { label: '设备编号', prop: '设备编号', width: '100' },
+      { label: '设备名称', prop: '设备名称', width: '100' },
+      { label: '建档用户', prop: '建档用户', width: '160' },
+      { label: '建档时间', prop: '建档时间', width: '160' },
+      { label: '更新时间', prop: '更新时间', width: '160' },
+    ]
+)
+const gylctz_handleKeyDown = (event, x, y, prop) => {
+  const currentElement = document.getElementById(`input${x}${y}`);
+  if (currentElement === null && currentElement === undefined) return
+  switch (event.keyCode) {
+    case 13: // Enter
+    case 40: // 向下箭头
+      if (y < gylctztableData.value.length )
+        document.getElementById(`input${x}${y + 1}`).focus();
+      break;
+    case 38: // 向上箭头
+      if ( y > 0) {
+        document.getElementById(`input${x}${y - 1}`).focus();
+      }
+      break;
+    default:
+      break;
+  }
+}
 const gylctzlist = ref(false);
 const gylctzformData = reactive({
   gdbh: '',
@@ -1318,40 +1416,26 @@ const _ProcessFlow = async ()=>{
     console.error(error);
   }
 }
-
 //附加标准工序【按钮】
 const gdzlfjxx = ref(false);
 const gdzlfjxxformData = reactive({
-  // cpdh: '',
   gdbh: '',
   cpmc: '',
   // 下拉框选项数据
   cpgyfans: [],
   // 设置默认值
   cpgyfan: '',
-  // cpgyfan: [],
-  // // 默认选择的值
-  // cpgyfans: '',
 });
-//附加标准工序 产品代号【回车】
-// const gdzlfjxxgetProductValue = () => {
-//   // 回车后 先设置下拉框默认值为“请选择”
-//   gdzlfjxxformData.cpgyfan = '请选择';
-//   const workOrder = gdzlfjxxformData.gdbh;
-//    _ProcessFlow_xiala(workOrder);
-// };
 //点击下拉框获取输入框的值
 const ongdzlfanclick = () => {
   const workOrder = gdzlfjxxformData.cpgyfan;
   _ProcessFlow_xiala(workOrder);
 }
-
 // 工艺流程调整->获取当前工单工艺资料
 const gdzlfjxxtableData = ref([]);
 const _ProcessFlow_xiala = async (workOrder)=>{
   try {
     const ProcessFlow_xiala = await ProcessFlow({ workOrder });
-    console.log(ProcessFlow_xiala)
     if (ProcessFlow_xiala.data) {
       gdzlfjxxtableData.value = ProcessFlow_xiala.data.process;
     } else {
@@ -1361,11 +1445,26 @@ const _ProcessFlow_xiala = async (workOrder)=>{
     console.error(error);
   }
 }
+//工艺方案附加【下拉框工单编号数据】
+const attachList = ref([])
+const attachChange = (val) => {
+  attachList.value = val
+}
+//工艺方案附加【执行】
+const addGongyiAttach = () => {
+  attachList.value.map(row => gylctztableData.value.push(row))
+  // gdzlfjxx.value = false
+}
+//工艺方案附加【放弃】
+const gylcfj_fangqi = () => {
+  gdzlfjxx.value = false
+}
+
 //点击附加标准工序【按钮】
 const gylctz_fjbzgx = async () => {
-  gdzlfjxxformData['cpdh'] = _Gd_cpdh.value;
-  gdzlfjxxformData['gdbh'] = _Gd_gdbh.value;
-  gdzlfjxxformData['cpmc'] = _Gd_cpmc.value;
+  console.log(_Gd_cpdh.value)
+  gdzlfjxxformData['cpdh'] = gylctzformData['gddh'];
+  gdzlfjxxformData['cpmc'] = gylctzformData['gdmc'];
   gdzlfjxxtableData.value = [];
   await _ReferenceWorkOrder();
   gdzlfjxx.value = true;
@@ -1373,12 +1472,12 @@ const gylctz_fjbzgx = async () => {
 // 工艺流程调整->参照工单列表获取【展示下拉框的数据】
 const _ReferenceWorkOrder = async ()=>{
   let params = {};
-  params.productCode = _Gd_cpdh.value;
+  params.productCode = gylctzformData['gddh'];
   params.workOrder = _Gd_gdbh.value;
   try {
     const ReferenceWorkOrder_data = await ReferenceWorkOrder(params);
     if(ReferenceWorkOrder_data.code === 0){
-      console.log(ReferenceWorkOrder_data);
+      // console.log(ReferenceWorkOrder_data);
       // 从数据中提取方案
       const schemes = ReferenceWorkOrder_data.data || [];
       // 直接将数组作为工艺方案数组
@@ -1626,7 +1725,7 @@ const _WorkList_page = async () => {
   }
 };
 
-//搜索查询
+//查询
 const searchInfo = ref('')
 //查询按钮
 const onSubmit = () => {
@@ -1640,6 +1739,10 @@ const _cha_WorkList = async (node) => {
   const search = searchInfo.value;
   try {
     const WorkListdata = await WorkList({ search:search,limit:1,page:1});//接口调用函数
+    console.log(WorkListdata.data.total)
+    if(WorkListdata.data.total === 0){
+      ElMessage({type: 'warning',message: '未搜索具体查询条件'})
+    }
     tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
     total.value = tableData.length;//共多少条
   } catch (error) {
@@ -1960,7 +2063,10 @@ const _capacityList = async () => {
 const clickybupdate2 = (row,column,event) => {
   currentGy0_yjno.value = row['印件-工序'].substr(0, 2)
 }
-//背景颜色变黄
+
+
+//===============颜色==================================
+//工艺资料背景颜色变黄
 const currentGy0_yjno = ref(null)
 const rowClassStyle2 = ({row,rowIndex}) =>{
   if(row['印件-工序'].substr(0, 2)==currentGy0_yjno.value){
@@ -1968,22 +2074,31 @@ const rowClassStyle2 = ({row,rowIndex}) =>{
   }
   return "warning-row"
 }
-const attachList = ref([])
-const attachChange = (val) => {
-  attachList.value = val
-}
-const addGongyiAttach = () =>
-{
-  attachList.value.map(row => gylctztableData.value.push(row))
-  gdzlfjxx.value = false
-}
-//表格文字变色
+//表格文字颜色
 const tableDataCellClass = ({row, column, rowIndex, columnIndex}) =>{
   if (column.property === '订单数量') {
     return 'plan-usage-low';
   }
 }
-//根据工艺状态文字变色
+//工艺流程调整颜色
+const gylctzCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (column.label === '工序号') {
+    return 'background-plan-usage-low';
+  }
+}
+//修正核算参数颜色
+const sxzhscsCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (column.label === '新难度系数' || column.label === '新损耗代号' || column.label === '新印刷方式' || column.label === '新来版距' || column.label === '新计损色数'  || column.label === '新损耗系数') {
+    return 'background-plan-usage-low';
+  }
+}
+//质检废品系数颜色
+const scfjfpxsCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (column.label === '人工正品板' || column.label === '人工次品板' || column.label === '人工废检' || column.label === '机检正品板' || column.label === '机检次品板'  || column.label === '机检废检') {
+    return 'background-plan-usage-low';
+  }
+}
+//根据工艺状态文字颜色
 const gysatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
   if(row['status'] === '未完工'){
     return 'status-plan-usage-low';
@@ -1992,7 +2107,7 @@ const gysatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
     return 'statusy-plan-usage-low';
   }
 }
-//bom计划用量文字变
+//bom
 const planUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
   if (column.property === '计划用量') {
     return 'plan-usage-low';
@@ -2031,6 +2146,7 @@ const gdzlent = (event,id1,id2,id3) => {
     }
   }
 }
+
 //修改工艺资料弹窗 键盘 input框跳转
 const gyzlent = (event,id1,id2,id3) => {
   if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
@@ -2066,6 +2182,20 @@ const gyzlent = (event,id1,id2,id3) => {
     text-align: center;
   }
 }
+/*背景颜色*/
+/*印件背景颜色变黄*/
+:deep(.el-table__body .warning-row) {
+  background: #FFFF80 !important;
+}
+/*修正工单核算参数背景*/
+: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;
+}
+/*文字颜色*/
 /*bom计划用量文字变色【表格中单独文字变色】*/
 :deep(.plan-usage-low div) {
   color: red !important;
@@ -2077,10 +2207,6 @@ const gyzlent = (event,id1,id2,id3) => {
 :deep(.statusy-plan-usage-low div) {
   color: #8c939d !important;
 }
-/*印件背景颜色变黄*/
-:deep(.el-table__body .warning-row) {
-  background: #FFFF80 !important;
-}
 /* 在样式表中添加以下样式 */
 .el-input__textarea {
   resize: none; /* 禁止调整大小 */
@@ -2106,10 +2232,7 @@ const gyzlent = (event,id1,id2,id3) => {
 .el-textarea textarea {
   resize: none !important;
 }
-/* 选中某行时的背景色 */
-:deep(.el-table__body tr.current-row) > td {
-  background: #ff80ff !important;
-}
+
 </style>
 <style scoped>
 :deep(.el-table td .cell) {