Эх сурвалжийг харах

分配系数和成品入仓优化

zck2422052614 1 жил өмнө
parent
commit
03e38ed1e3

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

@@ -145,6 +145,16 @@ export const PrintCodeList = (params) => {
     params
   })
 }
+
+// 大废品奖惩开数联数获取
+export const getCouplet = (params) => {
+  return service({
+    url: '/mes_server/work_order/getCouplet',
+    method: 'get',
+    params
+  })
+}
+
 // 大废品奖惩工单工艺获取
 export const ProcessList = (params) => {
   return service({

+ 14 - 3
src/view/job/rewards/rewards.vue

@@ -401,6 +401,7 @@
 		getRewardTabByGd,
 		JunkWorkOrderList,
 		PrintCodeList,
+		getCouplet,
 		ProcessList,
 		MachineClassList,
 		MachineList,
@@ -608,9 +609,9 @@
 		}
 	}
 	//工单编号回车事件
-	const getCPMCsubmit = () => {
+	const getCPMCsubmit = async () => {
 		if (detailData.sczl_gdbh != '') {
-			JunkWorkOrderList({
+			await JunkWorkOrderList({
 				search: detailData.sczl_gdbh
 			}).then(response => {
 				if (response.code === 0) {
@@ -619,7 +620,7 @@
 					detailData.Gd_cpmch = '';
 				}
 			});
-			PrintCodeList({
+			await await PrintCodeList({
 				workorder: detailData.sczl_gdbh
 			}).then(response => {
 				if (response.code === 0) {
@@ -630,6 +631,16 @@
 					detailData.yj_yjmc = ''
 				}
 			});
+			getCouplet({
+				gdbh: detailData.sczl_gdbh,yjno:detailData.sczl_yjno 
+			}).then(response => {
+				if (response.code === 0) {
+					detailData.sczl_ls = response.data.联数
+				} else {
+					detailData.sczl_ls = ''
+				}
+			});
+			
 		} else {
 			ElMessage({
 				type: 'error',

+ 1 - 1
src/view/performance/06-packingDocuments/index.vue

@@ -833,7 +833,7 @@ const SelectClickBz = (row, column, event) => {
 				type: 'success',
 				message: '新增成功',
 			})
-			dialogFormVisible.value = false
+			// dialogFormVisible.value = false
 			if (params.date != '') {
 				getTableData()
 			}

+ 332 - 51
src/view/performance/Dayreports.vue

@@ -49,6 +49,7 @@
               <el-button type="primary" class="bt" @click="synchronous"
                 >同步</el-button
               >
+              <el-button type="primary" icon="edit"   @click="gd_gxclhconClick"  class="bt" title="工序产量核查">工序产量核查</el-button>
               <div style="margin-left: auto">
                 <el-button
                   type="primary"
@@ -955,6 +956,7 @@
                 <el-input
                   v-model="formData.sczl_rate1"
                   id="rate1"
+                  @input="updateTotal"
                   @keydown="rate($event, '1')"
                 />
               </el-col>
@@ -962,6 +964,7 @@
                 <el-input
                   v-model="formData.sczl_rate2"
                   id="rate2"
+                  @input="updateTotal"
                   @keydown="rate($event, '2')"
                 />
               </el-col>
@@ -969,6 +972,7 @@
                 <el-input
                   v-model="formData.sczl_rate3"
                   id="rate3"
+                  @input="updateTotal"
                   @keydown="rate($event, '3')"
                 />
               </el-col>
@@ -976,6 +980,7 @@
                 <el-input
                   v-model="formData.sczl_rate4"
                   id="rate4"
+                  @input="updateTotal"
                   @keydown="rate($event, '4')"
                 />
               </el-col>
@@ -983,6 +988,7 @@
                 <el-input
                   v-model="formData.sczl_rate5"
                   id="rate5"
+                  @input="updateTotal"
                   @keydown="rate($event, '5')"
                 />
               </el-col>
@@ -990,6 +996,7 @@
                 <el-input
                   v-model="formData.sczl_rate6"
                   id="rate6"
+                  @input="updateTotal"
                   @keydown="rate($event, '6')"
                 />
               </el-col>
@@ -997,6 +1004,7 @@
                 <el-input
                   v-model="formData.sczl_rate7"
                   id="rate7"
+                  @input="updateTotal"
                   @keydown="rate($event, '7')"
                 />
               </el-col>
@@ -1004,6 +1012,7 @@
                 <el-input
                   v-model="formData.sczl_rate8"
                   id="rate8"
+                  @input="updateTotal"
                   @keydown="rate($event, '8')"
                 />
               </el-col>
@@ -1011,6 +1020,7 @@
                 <el-input
                   v-model="formData.sczl_rate9"
                   id="rate9"
+                  @input="updateTotal"
                   @keydown="rate($event, '9')"
                 />
               </el-col>
@@ -1018,6 +1028,7 @@
                 <el-input
                   v-model="formData.sczl_rate10"
                   id="rate10"
+                  @input="updateTotal"
                   @keydown="rate($event, '10')"
                 />
               </el-col>
@@ -1026,7 +1037,7 @@
             <template #footer>
               <div class="dialog-footer">
                 <el-button @click="closeDialog">取 消</el-button>
-                <el-button type="primary" @click="enterDialog">确 定</el-button>
+                <el-button type="primary" @click="enterDialog" :disabled="!clickedlist">确 定</el-button>
               </div>
             </template>
           </el-dialog>
@@ -1059,12 +1070,15 @@
             title="选择"
             destroy-on-close
             width="600px"
+            @open="handleDialogOpen"
           >
             <el-aside width="250px">
               <div class="JKWTree-tree">
                 <el-tree
+                  ref="treeRef"
                   :data="GetDedhtreeData"
                   :props="defaultProps"
+                  node-key="sys_bh"
                   highlight-current="true"
                   @node-click="GetDedhhandleNodeClick"
                   @node-dblclick="handleNodeDoubleClick"
@@ -1142,6 +1156,40 @@
 		      <el-table-column prop="yjno" label="印件号" width="170"/>
 		    </el-table>
 		  </el-dialog>
+
+               <!--工序产量核查【弹窗】-->
+               <el-dialog v-model="gd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
+            <el-button type="" @click="gxclhcCancel">退出</el-button>
+            <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+              <div style="width: 100%; height: 60px; padding: 0px;  display: flex; align-items: center;">
+                <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 20px 0 0 0 ">
+                  <el-input v-model="gxclhcformData['gdbh']"  @keyup.enter="gxclhcProductValue"  />
+                </el-form-item> 
+                印件选择:
+                <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px;margin-right: 20px; padding: 0px;">
+                  <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
+                </el-select>
+                <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 0px;" />
+              </div>
+            </div>
+            <el-table ref="paichengRef"
+                      :show-overflow-tooltip="true"
+                      :row-style="{ height: '0px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
+                      :header-cell-style="{ padding: '0px' }"
+                      style="width: 100%;height: 70vh" border tooltip-effect="dark"
+                      highlight-current-row="true"
+                      @row-click="gxclhc_tableRowClick"
+                      :data="gxclhc_Data" row-key="ID"
+                      :cell-class-name="gxclhcCellClass">
+              <template v-for="(item, idx) in gxclhc_Columns">
+                <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+                  {{row[item.prop]}}
+                </el-table-column>
+              </template>
+            </el-table>
+          </el-dialog>
+          
         </el-main>
       </el-container>
     </el-container>
@@ -1190,6 +1238,7 @@ import {
   LayoutHeader,
   LayoutSider,
 } from "@arco-design/web-vue";
+import {getOrderProcessCount,PrintDetailList} from '@/api/yunyin/yunying'
 import { exportExcelFile } from "@/utils/excel";
 import { useUserStore } from "@/pinia/modules/user";
 const userStore = useUserStore();
@@ -1665,7 +1714,7 @@ const getCPMCsubmit = () => {
 const yjnoArr = ref([0]);
 //印件号弹窗
 const selectDataYjh = reactive([]);
-const YjhVisible = ref(false);
+const YjhVisible = ref(false);
 const currentIndex = ref(0);
 
 // 工序名称选择
@@ -1702,16 +1751,16 @@ const setCurrentgxmc = (row) => {
 };
 
 
-const selectYjh = (event) => {
-  if (event.keyCode === 40) {
-    // 向下箭头
-    currentIndex.value = (currentIndex.value + 1) % selectDataYjh.length;
-    setCurrents(selectDataYjh[currentIndex.value]);
-  } else if (event.keyCode === 38) {
-    // 向上箭头
-    currentIndex.value = (currentIndex.value - 1 + selectDataYjh.length) % selectDataYjh.length;
-    setCurrents(selectDataYjh[currentIndex.value]);
-  } else if (event.keyCode === 13) {
+const selectYjh = (event) => {
+  if (event.keyCode === 40) {
+    // 向下箭头
+    currentIndex.value = (currentIndex.value + 1) % selectDataYjh.length;
+    setCurrents(selectDataYjh[currentIndex.value]);
+  } else if (event.keyCode === 38) {
+    // 向上箭头
+    currentIndex.value = (currentIndex.value - 1 + selectDataYjh.length) % selectDataYjh.length;
+    setCurrents(selectDataYjh[currentIndex.value]);
+  } else if (event.keyCode === 13) {
     // Enter 键
 	if (formData.value.sczl_gdbh != "" && formData.value.sczl_yjno != "") {
 	  //获取印件名称
@@ -1750,9 +1799,9 @@ const selectYjh = (event) => {
 	  formData.value.sczl_yjno = yjnoArr.value[0];
 	  formData.value.yj_yjmc = "";
 	  gxmc.value = "";
-	}
-    YjhVisible.value = false;
-  }
+	}
+    YjhVisible.value = false;
+  }
 };
 
 const tablesczl_yjno = ref();
@@ -1993,19 +2042,19 @@ const SelectClickJtbh = (row, column, event) => {
 // 机器上下选择
 const tablesb = ref();
 const currentIndexsb = ref(0);
-const selectSb = (event) => {
-  if (event.keyCode === 40) {
-    // 向下箭头
-    currentIndexsb.value = (currentIndexsb.value + 1) % selectDataJtbh.length;
-    setCurrentsb(selectDataJtbh[currentIndexsb.value]);
-  } else if (event.keyCode === 38) {
-    // 向上箭头
-    currentIndexsb.value = (currentIndexsb.value - 1 + selectDataJtbh.length) % selectDataJtbh.length;
-    setCurrentsb(selectDataJtbh[currentIndexsb.value]);
+const selectSb = (event) => {
+  if (event.keyCode === 40) {
+    // 向下箭头
+    currentIndexsb.value = (currentIndexsb.value + 1) % selectDataJtbh.length;
+    setCurrentsb(selectDataJtbh[currentIndexsb.value]);
+  } else if (event.keyCode === 38) {
+    // 向上箭头
+    currentIndexsb.value = (currentIndexsb.value - 1 + selectDataJtbh.length) % selectDataJtbh.length;
+    setCurrentsb(selectDataJtbh[currentIndexsb.value]);
   } else if (event.keyCode === 13) {
 	// Enter键【关闭机器弹窗】
 	JtbhVisible.value = false;
-  }
+  }
 };
 const setCurrentsb = (row) => {
   setTimeout(() => {
@@ -2082,48 +2131,98 @@ const mult = () => {
 };
 
 let GetDedhtreeData = reactive([]);
+const treeRef = ref(null);
 //定额代号回车事件
-const getDedhsubmit = () => {
-  //弹出选择
-  let treeData = [];
-  productionDedh({
-    sczl_jtbh: formData.value.sczl_jtbh,
-  }).then((response) => {
+// const getDedhsubmit = () => {
+//   //弹出选择
+//   let treeData = [];
+//   productionDedh({
+//     sczl_jtbh: formData.value.sczl_jtbh,
+//   }).then((response) => {
+//     if (response.code === 0) {
+//       if (formData.value.sczl_jtbh == "") {
+//         const data = [];
+//         data[0] = response.data;
+
+//         // 递归函数来构建树形结构
+//         const buildTree = (node) => {
+//           const treeNode = {
+//             label: node.sys_bh + "【" + node.sys_mc + "】",
+//             children: [],
+//           };
+
+//           // 如果存在子节点,递归地添加它们
+//           if (node.bh_mc && Array.isArray(node.bh_mc)) {
+//             node.bh_mc.forEach((childNode) => {
+//               treeNode.children.push(buildTree(childNode)); // 递归调用
+//             });
+//           }
+
+//           return treeNode;
+//         };
+
+//         // 构建树形结构的根节点
+//         const treeData = data.map(buildTree);
+
+//         GetDedhtreeData = treeData; // 假设这是外部可访问的变量
+//         GetDedhVisible.value = true; // 假设这是一个响应式引用
+//         console.log(GetDedhtreeData);
+//       } else {
+//         formData.value.sczl_dedh = response.data["sys_bh"];
+//       }
+//     }
+//   });
+// };
+const getDedhsubmit = async () => {
+  try {
+    const response = await productionDedh({
+      sczl_jtbh: formData.value.sczl_jtbh,
+    });
     if (response.code === 0) {
-      if (formData.value.sczl_jtbh == "") {
-        const data = [];
-        data[0] = response.data;
-
-        // 递归函数来构建树形结构
+      if (formData.value.sczl_jtbh === "") {
+        const data = [response.data];
+        console.log(123,response.data.sys_bh)
         const buildTree = (node) => {
           const treeNode = {
             label: node.sys_bh + "【" + node.sys_mc + "】",
             children: [],
+            key: node.sys_bh // 添加key属性,用于设置当前节点
           };
-
-          // 如果存在子节点,递归地添加它们
+ 
           if (node.bh_mc && Array.isArray(node.bh_mc)) {
             node.bh_mc.forEach((childNode) => {
-              treeNode.children.push(buildTree(childNode)); // 递归调用
+              treeNode.children.push(buildTree(childNode));
             });
           }
-
+ 
           return treeNode;
         };
-
-        // 构建树形结构的根节点
-        const treeData = data.map(buildTree);
-
-        GetDedhtreeData = treeData; // 假设这是外部可访问的变量
-        GetDedhVisible.value = true; // 假设这是一个响应式引用
-        console.log(GetDedhtreeData);
+ 
+        GetDedhtreeData = data.map(buildTree);
+        GetDedhVisible.value = true;
       } else {
-        formData.value.sczl_dedh = response.data["sys_bh"];
+        formData.value.sczl_dedh = response.data.sys_bh;
       }
     }
+  } catch (error) {
+    console.error(error);
+  }
+};
+ 
+const handleDialogOpen = () => {
+  nextTick(() => {
+    if (treeRef.value && GetDedhtreeData.length > 0) {
+      // 假设你希望聚焦到第一个节点,可以使用第一个节点的key
+      console.log(treeRef.value,GetDedhtreeData.length)
+
+      const firstNodeKey = GetDedhtreeData[0].key;
+      console.log(firstNodeKey)
+      treeRef.value.setCurrentKey(firstNodeKey);
+    }
   });
 };
 
+
 //定额代号树形结构单机
 const GetDedhhandleNodeClick = (nodeData, node, component) => {
   //存放当前节点的nodeId
@@ -2497,13 +2596,13 @@ function onAdd() {
     }
     initFormData();
     dialogFormVisible.value = true;
+
   } else {
     // GetInfo(table.value)
     // console.log(['table_type'])
     // console.log('此数据无法新增')
     dialogFormVisible.value = true;
   }
-
   // Productionadd()
 }
 //新增
@@ -2623,6 +2722,131 @@ const CountByGdbh = async () => {
 };
 // ============== 表格控制部分结束 ===============
 
+
+//=========工序产量核查===========
+const gd_gxclhclist = ref(false);
+const gxclhc_Data = ref([]);
+const gxclhc_Columns = ref(
+    [
+      { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
+      // { label: '印件', prop: 'Gy0_yjno', width: '130' },
+      // { label: '工序', prop: 'Gy0_gxh', width: '130' },
+      // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
+      { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
+      { label: '联数', prop: 'Gy0_ls', width: '70' },
+      { label: '折算车头产量', prop: '折算车头产量', width: '120' },
+      { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
+      { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
+      { label: '制程废品率', prop: '制程废品率', width: '120' },
+      { label: '来料异常', prop: '来料异常', width: '90' },
+      { label: '流程单数', prop: 'process_num', width: '90' },
+      { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
+      { label: '工序状态', prop: 'PD_WG', width: '90'},
+      { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
+    ]
+)
+const gxclhcformData = reactive({
+  gdbh: '',
+  gdmc: '',
+});
+const gdwhformData = reactive({
+  // 下拉框选项数据
+  yinjian: [],
+  // 设置默认值
+  yjno: '',
+});
+const inputCpmc = ref('')
+// 工序产量核查按钮
+const gd_gxclhconClick = async () => {
+  if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
+    ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
+    return false;
+  }
+  gxclhcformData['gdbh'] = _Gd_gdbh.value;
+  gxclhcformData['yjno'] = 1;
+  gd_gxclhclist.value = true;
+  const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
+  console.log(response)
+  gdwhformData.yjno = response.data[0].no
+  inputCpmc.value = response.data[0].name
+  if (response.code === 0) {
+	  const noFields = response.data.map(item => item.no);
+	  gdwhformData.yinjian = noFields
+	} else {
+	  console.error('查询失败:', response.msg);
+	}
+  _getOrderProcessCount();
+};
+
+//点击印件下拉框
+const ongdwhfanclick = async() => {
+  _PrintDetailList();
+  _getOrderProcessCount();
+}
+
+//工序产量核查回车
+const gxclhcProductValue = async () => {
+	console.log("工序产量核查回车")
+  _getOrderProcessCount();
+  _PrintDetailList();
+}
+
+//工序产量核查退出
+const gxclhcCancel = async () => {
+  gd_gxclhclist.value = false;
+};
+
+//印件编号获取方法接口
+const _PrintDetailList = async () => {
+  const order = gxclhcformData['gdbh'];
+  const response = await PrintDetailList ({workOrder:order});
+  const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
+    if (matchingItem) {
+		console.log(matchingItem.name)
+		inputCpmc.value = matchingItem.name;
+	} else {
+		console.log(`No matching item found for no: ${gdwhformData.yjno}`);
+	}
+}
+
+//工序产量核查方法接口
+const _getOrderProcessCount = async () => {
+  const order = gxclhcformData['gdbh'];
+  const yjno = gdwhformData.yjno;
+  const getOrderProcessCount_list = await getOrderProcessCount({order:order,yjno:yjno});
+  const concatenatedData = getOrderProcessCount_list.data.map(item => {
+    // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
+    const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
+    const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
+    const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc} 【${item.Add_gxmc} 】`;
+    return {
+      ...item,
+      concatenatedData: concatenatedValue, // 使用新属性名
+    };
+  });
+  gxclhc_Data.value = concatenatedData;
+};
+
+//工序产量核查
+const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (column.label === '实际上报产量' ||column.label === '制程废品'  || column.label === '制程废品率' ||
+      column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
+    return 'lan-plan-usage-lows';
+  }
+  if (column.label === '折算车头产量') {
+    return 'gxclhc—color-column-red';
+  }
+  // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
+  if (column.label === '工序状态'){
+    if(row['PD_WG'] === '完工'){
+      return 'lan-plan-usage-lowshui';
+    }else{
+      return 'pczccolor-column-lan';
+    }
+  }
+}
+
+
 // 获取需要的字典 可能为空 按需保留
 const setOptions = async () => {};
 
@@ -2711,8 +2935,44 @@ const openDialog = () => {
 const closeDialog = () => {
   dialogFormVisible.value = false;
 };
-// 弹窗确定
+
+const fpsum = ref();
+//自动计算分配系数和
+function updateTotal() {
+  // 直接指定要累加的属性名  
+  const relevantKeys = ['sczl_rate1', 'sczl_rate2', 'sczl_rate3', 'sczl_rate4', 'sczl_rate5', 'sczl_rate6', 'sczl_rate7', 'sczl_rate8', 'sczl_rate9', 'sczl_rate10'];  
+  const values = relevantKeys.map(key => parseFloat(formData.value[key], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  fpsum.value = values.reduce((sum, value) => sum + value, 0);  
+}
+
+
+
+
+ //默认启用按钮可点击
+const clickedlist = ref(true);
+ //存储定时器时间
+let clickTimer = null;
+
+//新增确定
 const enterDialog = async () => {
+  //防止重复点击
+  if (!clickedlist.value) {
+    // 如果按钮已经被禁用,则不执行任何操作
+    return;
+  }
+  clickedlist.value = false;
+  // 清除之前的定时器(如果有的话),以避免重复设置
+  if (clickTimer) {
+    clearTimeout(clickTimer);
+  }
+  //设置定时器,在3秒后重新启用按钮
+  clickTimer = setTimeout(() => {
+    clickedlist.value = true;
+    clickTimer = null;
+  }, 3000);
+
+
+
   //弹窗提示确认
   ElMessageBox.confirm("数据存盘?", "提示", {
     confirmButtonText: "确定",
@@ -2863,7 +3123,15 @@ const updateDetailData = async () => {
     sczl_rate10: formData.value.sczl_rate10,
     sys_id: sys_id,
   };
-  // detailData.table.forEach((item, index, array) => {
+  updateTotal()
+  console.log(11123,fpsum.value)
+  if(fpsum.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于0",
+    });
+  }else{
+// detailData.table.forEach((item, index, array) => {
   //   const num = index + 1
   //   restoredData[`sczl_gdbh${num}`] = item.sczl_gdbh
   //   restoredData[`sczl_yjGx${num}`] = item.sczl_yjGx
@@ -2912,6 +3180,8 @@ const updateDetailData = async () => {
   // restoredData.UniqId='5'
 
   // console.log(FormData)
+  }
+  
 };
 let table = ref(5);
 let lastCellValue = ref();
@@ -2936,9 +3206,14 @@ function doubleClick(row, column, event) {
   }
 }
 // 单击表格操作
+
+//全局调用工单编号
+const _Gd_gdbh = ref(null)
+
 function Click(row, column, event) {
   lastCellValue = row["UniqId"];
   console.log(lastCellValue);
+  _Gd_gdbh.value = row.sczl_gdbh;
   table_type = row["table_type"];
   // if(row['table_type']=='db_sczl'){
   // 	 dialogFormVisible.value = true
@@ -3071,4 +3346,10 @@ onMounted(async () => {});
   font-size: 16px;
   font-weight: bold;
 }
+
+/* 工序产量核查高亮 */
+:deep(.lan-plan-usage-lows  div) {
+  color: blue !important;
+  font-weight: bold;
+}
 </style>

+ 55 - 10
src/view/performance/chejianbaogong.vue

@@ -359,14 +359,14 @@
           <el-col :span="3"><el-input v-model="formDatas.name8"  placeholder="" /></el-col>
 			  </el-row>
 			  <el-row :gutter="10" style="margin-top: 1px;font-weight: bold;color:purple">
-          <el-col :span="3"><el-input v-model="formDatas.percentage1"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage2"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage3"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage4"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage5"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage6"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage7"  placeholder="" /></el-col>
-          <el-col :span="3"><el-input v-model="formDatas.percentage8"  placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage1" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage2" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage3" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage4" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage5" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage6" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage7" @input="updateTotal" placeholder="" /></el-col>
+          <el-col :span="3"><el-input v-model="formDatas.percentage8" @input="updateTotal" placeholder="" /></el-col>
 			  </el-row>
 			</div>
 			<div style="height: 50vh; width: 15vh;margin-top: 3vh;">
@@ -1811,7 +1811,7 @@
               </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="dbformData.日期" id="日期" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, 'gxh', '日期', '流程标牌')"  placeholder="" />
+                  <el-input v-model="dbformData.日期" id="日期" readonly style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, 'gxh', '日期', '流程标牌')"  placeholder="" />
                 </el-form-item>
               </el-col>
 
@@ -2502,7 +2502,6 @@ const ybupdateCompanyFunc = async (row) => {
   dbformData.value.流程标牌=row.标牌号
   dbformData.value.上机时间=row.sj1
   dbformData.value.下机时间=row.sj2
-  dbformData.value.下机时间=row.sj2
   dbformData.value.产量=row.产量
   dbformData.value.制程废品=row.制程废品
   dbformData.value.制程次品=row.制程次品
@@ -4935,8 +4934,38 @@ const BZhandle = (val) => {
 	  BZMC.value=val.班组号
   // }
 };
+
+const fpsum = ref();
+const fpsum2 = ref();
+//自动计算分配系数和
+function updateTotal() {
+  // 直接指定要累加的属性名  
+  const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];  
+  const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  fpsum.value = values.reduce((sum, value) => sum + value, 0); 
+//   const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9','组员10',];  
+//   const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+//   fpsum2.value = valuess.reduce((sum, value) => sum + value, 0);  
+}
+
 //机台班组维护新增按钮
 const addBz = async() => {
+  updateTotal()
+  console.log(997666,fpsum.value)
+  if(fpsum.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于1",
+    });
+	return;
+  }
+  if(fpsum.value < 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能小于1",
+    });
+	return;
+  }
   // console.log(selectedOption.value)
   console.log("机台编号"+selectedOption.value.split('|')[0])
   console.log("班组编号"+BZMC.value)
@@ -5056,6 +5085,22 @@ const addBz = async() => {
 }
 //机台班组维护更新当前班组
 const selectBz = async() => {
+	updateTotal()
+  console.log(997666,fpsum.value)
+  if(fpsum.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于1",
+    });
+	return;
+  }
+  if(fpsum.value < 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能小于1",
+    });
+	return;
+  }
   // console.log(currentBz.value)
   // return false;
 	if(currentBz.value){

+ 39 - 29
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -17,7 +17,7 @@
               <el-button type="primary" class="bt" icon="edit"  @click="fjfpxsClick" >质检废品系数</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="pccstzClick" >排产参数调整</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="hscstzClick" >核算参数调整</el-button>
-			  <el-button type="primary" class="bt" icon="edit"  @click="addcp_onclick" >新增产品资料</el-button>
+			        <el-button type="primary" class="bt" icon="edit"  @click="addcp_onclick" >新增产品资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addcpyj_onclick" v-if="addyj=== true">新增印件资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addcpgy_onclick" v-if="addgy=== true">新增工艺资料</el-button>
 <!--              <el-button type="primary" class="bt" icon="edit"  @click="addyb_onclick" v-if="addyb=== true">新增印版资料</el-button>-->
@@ -80,7 +80,10 @@
               <el-input v-model="cpgyfzformData['to_pro']" id="to_pro" v-if="cpgyfzformData['fzgyzl'] !== false" placeholder="目标工艺方案" style="width: 160px;margin-left: 20px"/>
             </el-form-item>
             <el-form-item label="" class="mab" >
-              <el-checkbox  v-model="cpgyfzformData['fzybzl']"  id="fzybzl" @keydown="add_cpgyfzent($event, 'fzgyzl', 'fzybzl', 'process')" >复制印版资料</el-checkbox>
+              <el-checkbox  v-model="cpgyfzformData['fzybzl']"  id="fzybzl" @keydown="add_cpgyfzent($event, 'fzgyzl', 'fzybzl', 'fzyjzl')" >复制印版资料</el-checkbox>
+            </el-form-item>
+            <el-form-item label="" class="mab" >
+              <el-checkbox  v-model="cpgyfzformData['fzyjzl']"  id="fzyjzl" @keydown="add_cpgyfzent($event, 'fzybzl', 'fzyjzl', 'process')" >复制印件资料</el-checkbox>
             </el-form-item>
               <div class="dialog-footer" style="text-align: right ">
                 <el-button @click="cpgyfzhandleCancel">取消</el-button>
@@ -475,12 +478,12 @@
               <el-table-column v-slot="scope"  align="left" label=新损耗代号 width="170" >
                 <el-input   v-model="scope.row.Gy0_shdh" :clearable="false"/>
               </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=新车间 width="110" >
-                <el-input   v-model="scope.row.olds_Gy0_sbbh" :clearable="false" @keyup.enter="cjxz(scope.row, scope.$index)"/>
-              </el-table-column>
               <el-table-column v-slot="scope" align="left" label=车间 width="110" >
-                <el-input disabled  v-model="scope.row.Gy0_site" :clearable="false" />
+                <el-input   v-model="scope.row.Gy0_site" :clearable="false" @keyup.enter="cjxz(scope.row, scope.$index)"/>
               </el-table-column>
+              <!-- <el-table-column v-slot="scope" align="left" label=车间 width="110" >
+                <el-input disabled  v-model="scope.row.Gy0_site" :clearable="false" />
+              </el-table-column> -->
               <el-table-column v-slot="scope"   align="left" label=新机组编号 width="115" >
                 <el-select v-model="scope.row.Gy0_sbbh" >
       <el-option
@@ -1909,8 +1912,9 @@ const cpgyfzformData = reactive({
   mubprocess: '',
   mubprocessName: '',
   to_pro:'',
-  fzgyzl: false,
-  fzybzl: true,
+  fzgyzl: true,
+  fzybzl: false,
+  fzyjzl: false,
 });
 const cpgyfzclick = async () => {
   if(_product_code.value == null){
@@ -1932,6 +1936,7 @@ const cpgyfzhandleCancel = async () => {
 //确定
 const is_copy_gy = ref(0);
 const is_copy_yb = ref(0);
+const is_copy_yj = ref(0);
 const toProUpperCase = ref('');
 const cpgyfzhandleConfirm = async () => {
   // console.log(cpgyfzformData)
@@ -1954,19 +1959,30 @@ const cpgyfzhandleConfirm = async () => {
   //选择复制工艺资料
   if (cpgyfzformData['fzgyzl'] === true) {
     is_copy_gy.value = 1;
+  }else{
+    is_copy_gy.value = 0;
   }
   //选择复制印版资料
   if (cpgyfzformData['fzybzl'] === true) {
     is_copy_yb.value = 1;
+  }else{
+    is_copy_yb.value = 0;
+  }
+   //选择复制印件资料
+   if (cpgyfzformData['fzyjzl'] === true) {
+    is_copy_yj.value = 1;
+  }else{
+    is_copy_yj.value = 0;
   }
-  //选择复制工艺资料、不选择复制印版资料
-  if (cpgyfzformData['fzgyzl'] === true && cpgyfzformData['fzybzl'] === false) {
+  //选择复制工艺资料、不选择复制印版资料和印件资料
+  if (cpgyfzformData['fzgyzl'] === true && cpgyfzformData['fzybzl'] === false && cpgyfzformData['fzyjzl'] === false) {
     if(cpgyfzformData['to_pro'] === ''){
       ElMessage({type: 'warning',message: '目标工艺方案不能为空' })
       return false;
     }
     is_copy_gy.value = 1;
     is_copy_yb.value = 0;
+    is_copy_yj.value = 0;
   }
   //选择复制印版资料、不选择复制工艺资料
   if (cpgyfzformData['fzgyzl'] === false && cpgyfzformData['fzybzl'] === true) {
@@ -1993,6 +2009,7 @@ const cpgyfzhandleConfirm = async () => {
     is_copy_gy: is_copy_gy.value,
     to_pro: toProUpperCase.value,
     is_copy_yb: is_copy_yb.value,
+    is_copy_yj: is_copy_yj.value,
   };
   console.log(formattedData);
   const copyProductGy_add = await copyProductGy(formattedData);
@@ -2009,7 +2026,6 @@ const cpgyfzhandleConfirm = async () => {
 
 
 
-cpgyfzhandleConfirm
 //101201052
 const _getGyTotal = async () => {
   console.log(_product_code.value)
@@ -2308,7 +2324,7 @@ const selectedMachine = ref('');
 let currentRowIndex = null; // 用于存储当前行的索引
 //点击【排产参数调整】按钮
 const pccstzClick = () => {
-  pccstztableData.value.olds_Gy0_sbbh = ''
+  // pccstztableData.value.olds_Gy0_sbbh = ''
   if(_product_code.value == null){
     pccstzlist.value = false;
     ElMessage({type: 'warning',message: '请选择分类项目,再操作此功能'})
@@ -2336,8 +2352,6 @@ const _pccstzgetProductGy = async ()=>{
       item.old_Gy0_shdh = item.Gy0_shdh;
       // 原机组编号
       item.old_Gy0_sbbh = item.Gy0_sbbh;
-      //设备编号
-      item.olds_Gy0_sbbh = item.Gy0_sbbh;
       return item
     });
   } catch (error) {
@@ -2354,7 +2368,7 @@ const pccstzConfirm = async () => {
       shdh: item.Gy0_shdh,
       machine: item.Gy0_sbbh,
       time: item.Gy0_辅助工时,
-      wokershop: item.olds_Gy0_sbbh
+      Gy0_site: item.Gy0_site
     };
   });
   const editGy_edit = await editGy(formattedData);
@@ -2382,30 +2396,26 @@ const apiData = await getDepartName()
       // key是车间名称,value是车间内的操作列表
       const children = Object.entries(value).map(([workshop, operations]) => ({
         label: workshop,
-        children: operations.map(operation => ({
-          label: operation,
-          value: operation // 可以根据需要添加更多属性
-        }))
       }));
       return { label: key, children };
     });
   }
   // 使用ref来管理转换后的数据
   cjList.value = ref(transformDataToTreeFormat(apiData.data));
-
 };
 
 // 选择新车间并获取机台
 const selectHandle = async (node) => {
-console.log('232323',node.label)
-console.log('suoyin',currentRowIndex)
-pccstztableData.value[currentRowIndex].olds_Gy0_sbbh = node.label
-console.log(pccstztableData.value)
-const MachineList_jitai = await gdzl_MachineList({address:node.label});
-  console.log(MachineList_jitai.data)
-  jtList.value = MachineList_jitai.data
-// jtdisplay.value = true;
-cjdisplay.value = false;
+const isTopLevelNode = node.label === '标准工艺';
+if (!isTopLevelNode) {
+    // 处理子节点的点击
+    pccstztableData.value[currentRowIndex].Gy0_site = node.label;
+    console.log(pccstztableData.value);
+    const MachineList_jitai = await gdzl_MachineList({ address: node.label });
+    console.log(MachineList_jitai.data);
+    jtList.value = MachineList_jitai.data;
+    cjdisplay.value = false;
+  }
 };
 
 

+ 509 - 184
src/view/yunyin/shengchanguanli/chengpinrucang.vue

@@ -119,7 +119,7 @@
 			 <el-col :span="24">
 			   <el-form-item label="印件编号" prop="id">
 				 <el-input v-model="formData.jjcp_cpdh" id="印件编号" disabled :clearable="true"  style="width: 120px;"  />
-				<el-input v-model="formData.jjcp_cpmc"  id="jjcp_cpmc" disabled :clearable="true"  style="width: 500px; margin-left: 10px;" />
+				<el-input v-model="formData.jjcp_cpmc"  id="jjcp_cpmc" disabled :clearable="true"  style="width: 500px; margin-left: 10px;" />
 			   </el-form-item>
 			 </el-col>
            </el-row> 
@@ -129,7 +129,7 @@
 			 <el-col :span="24">
 			   <el-form-item label="产品编号" prop="id">
 				 <el-input v-model="formData.成品编码" id="产品编号" disabled :clearable="true"   style="width: 120px;" />
-					<el-input v-model="formData.成品名称" id="成品名称" disabled :clearable="true"   style="width: 500px; margin-left: 10px;" />
+					<el-input v-model="formData.成品名称" id="成品名称" disabled :clearable="true"   style="width: 500px; margin-left: 10px;" />
 			   </el-form-item>
 			 </el-col>
 			</el-row> 
@@ -144,13 +144,13 @@
 			  
 			  <el-row :gutter="24">
 			   <el-col :span="7">
-			     <el-form-item label="首末板" prop="id">
+			     <el-form-item label="首末板" prop="id">
 					 <el-input v-model="formData.jjcp_smb" id="首末板"  @keydown="ent($event, '客户料号', '首末板', '入仓时间')" :clearable="true"   style="width: 120px;" />
 			     </el-form-item>
 			   </el-col>
 			   <el-col :span="17">
-				    <el-form-item label="入仓时间" prop="id">
-						<el-date-picker v-model="formData.jjcp_sj" type="datetime"  format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"id="入仓时间"   @keydown="ent($event, '首末板', '入仓时间', '入仓数量')"  style="width: 200px;"/>
+				    <el-form-item label="入仓时间" prop="id">
+						<el-date-picker v-model="formData.jjcp_sj" type="datetime"  format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"id="入仓时间"   @keydown="ent($event, '首末板', '入仓时间', '入仓数量')"  style="width: 200px;"/>
 						
 						<!-- <el-input type="datetime" v-model="formData.jjcp_sj"  id="入仓时间"   @keydown="ent($event, '首末板', '入仓时间', '入仓数量')" :clearable="true" style="width: 120px;" />	 -->
 					</el-form-item>
@@ -222,32 +222,32 @@
               <el-table-column prop="编号" label="编号" width="200" />
 			  <el-table-column prop="名称" label="名称" width="200" />		      	 
             </el-table>
-          </el-dialog>
+          </el-dialog>
 		  
-		  <!-- 入仓类型选择 -->
-		  <el-dialog v-model="RCVisible" title="选择"
-		    destroy-on-close width="400px" @keydown="selectRC($event)" >
-		    <el-table tooltip-effect="dark"
-		      :data="RCselectData" row-key="ID"
-		      highlight-current-row="true" border style="width:100%"
-		      @row-dblclick="RCSelectClick"
-		  			  ref="tableRC"
-		    >
-		      <el-table-column prop="入仓类型" label="入仓类型" width="360" />		      	 
-		    </el-table>
-		  </el-dialog>
-		  
-		  <!-- 首末板选择 -->
-		  <el-dialog v-model="SMBVisible" title="选择"
-		    destroy-on-close width="200px" @keydown="selectSMB($event)" >
-		    <el-table tooltip-effect="dark" :data="SMBselectData" row-key="ID"
-		      highlight-current-row="true" border style="width:100%"
-		      :row-style="{ height: '30px' }"
-		      @row-dblclick="SMBSelectClick"
-		  			  ref="tableSMB"
-		    >
-		      <el-table-column prop="jjcp_smb" label="" width="160" />		      	 
-		    </el-table>
+		  <!-- 入仓类型选择 -->
+		  <el-dialog v-model="RCVisible" title="选择"
+		    destroy-on-close width="400px" @keydown="selectRC($event)" >
+		    <el-table tooltip-effect="dark"
+		      :data="RCselectData" row-key="ID"
+		      highlight-current-row="true" border style="width:100%"
+		      @row-dblclick="RCSelectClick"
+		  			  ref="tableRC"
+		    >
+		      <el-table-column prop="入仓类型" label="入仓类型" width="360" />		      	 
+		    </el-table>
+		  </el-dialog>
+		  
+		  <!-- 首末板选择 -->
+		  <el-dialog v-model="SMBVisible" title="选择"
+		    destroy-on-close width="200px" @keydown="selectSMB($event)" >
+		    <el-table tooltip-effect="dark" :data="SMBselectData" row-key="ID"
+		      highlight-current-row="true" border style="width:100%"
+		      :row-style="{ height: '30px' }"
+		      @row-dblclick="SMBSelectClick"
+		  			  ref="tableSMB"
+		    >
+		      <el-table-column prop="jjcp_smb" label="" width="160" />		      	 
+		    </el-table>
 		  </el-dialog>
 		  
 		  <el-dialog v-model="GDVisible" title="选择" destroy-on-close width="600px" @keydown="selectGD($event)" >
@@ -320,22 +320,21 @@
 		  </el-dialog>
 		  
 		  
-		  <el-dialog
-		    v-model="SMVisible"
-		    title="选择"
-		    destroy-on-close
-		    width="1200px"
-			
-		  			>
-		    <el-table
-		      tooltip-effect="dark"
-		      :data="SMselectData"
-		      row-key="ID"
-		      highlight-current-row="true"
-		      border
-		      style="width:180%"
-			  height="500px"
-		      @row-dblclick="SMSelectClick"
+		  <el-dialog v-model="SMVisible" title="选择" destroy-on-close style='height: 100%;margin: 0px;' width="100%">
+			<div class="block">
+				<span class="demonstration">月份选择:</span>
+				<el-date-picker v-model="ExcelformData['rq']" type="month" placeholder="选择月份"style='width: 10%;'></el-date-picker>
+				<el-button type="primary" @click="ExcelonSubmit" style='margin-left: 10px;'>查询</el-button>
+				<el-button type="primary" class="bt" icon="download" @click="exportToExcel" >导出Excel</el-button>
+				<el-button type="primary" icon="edit" @click="pd_gxclhconClick" class="bt">工序产量核查</el-button>
+				<el-button type="primary" icon="edit" @click="pd_lcdlistonClick" class="bt">流程单查询</el-button>
+			</div>
+		    <el-table tooltip-effect="dark" :data="SMselectData"
+			style="width: 100%;height: 80vh"
+			row-key="ID" highlight-current-row="true" 
+			borderstyle="width:180%"height="100%"
+			@row-dblclick="SMSelectClick"
+			@row-click="MBRowClick"
 		    >
 				<el-table-column
 				  prop="Yj_Gdbh"
@@ -363,15 +362,20 @@
 				width="200"
 			  />
 			  <el-table-column
-				prop="jjcp_sls"
+				prop="sczl_cls"
 				label="包装产量"
 				width="200"
 			  />
 			  <el-table-column
-				prop="sczl_cls"
+				prop="jjcp_sls"
 				label="入仓数量"
 				width="200"
 			  />
+			  <el-table-column
+				prop="jjcp_smb"
+				label="是否末版"
+				width="200"
+			  />
 			  <el-table-column
 				prop="jjcp_smb"
 				label="缺数"
@@ -389,7 +393,78 @@
 			  />
 		    </el-table>
 		  </el-dialog>
-		  
+		  <!--工序产量核查【弹窗】-->
+          <el-dialog v-model="pd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
+            <el-button type="" @click="gxclhcCancel">退出</el-button>
+
+            <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+              <div style="width: 100%; height: 60px; padding: 0px;  display: flex; align-items: center;">
+                <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 20px 0 0 0">
+                  <el-input v-model="gxclhcformData['gdbh']"  @keyup.enter="gxclhcProductValue" placeholder="" />
+                </el-form-item>
+                印件选择:
+                <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px; margin-right: 10px;">
+                  <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
+                </el-select>
+                <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 10px;" />
+              </div>
+            </div>
+            <el-table ref="paichengRef"
+                      :show-overflow-tooltip="true"
+                      :row-style="{ height: '0px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
+                      :header-cell-style="{ padding: '0px' }"
+                      style="width: 100%;height: 70vh" border tooltip-effect="dark"
+                      highlight-current-row="true"
+                      @row-click="gxclhc_tableRowClick"
+                      :data="gxclhc_Data" row-key="ID"
+                      :cell-class-name="gxclhcCellClass"
+            >
+              <template v-for="(item, idx) in gxclhc_Columns">
+                <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
+                  {{row[item.prop]}}
+                </el-table-column>
+              </template>
+            </el-table>
+          </el-dialog>
+		  <!--流程单查询【弹窗】-->
+          <el-dialog v-model="pd_lcdlist" title="工单工序生产进程" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
+            <div style="width: 100%;height: 100%;">
+              <el-button type="" @click="pd_lcdCancel">退出</el-button>
+            </div>
+            <div style="width: 100%; height: 100%; display: flex; align-items: center;">
+              <el-form-item label="工单编号" style="margin-right: 20px; padding: 0;">
+                <el-input v-model="pd_lcdformData['gdbh']" @keyup.enter="pd_lcdProductValue"/>
+              </el-form-item>
+              <el-form-item label="印件号" style="margin-right: 5px; padding: 0;">
+                <el-input v-model="pd_lcdformData['yjno']" @keyup.enter="pd_lcdProductValue"/>
+              </el-form-item>
+              <el-form-item label="" style="margin-right: 5px; padding: 0;">
+                <el-input v-model="pd_lcdformData['code']" disabled/>
+              </el-form-item>
+              <el-form-item label="" style="margin-right: 5px; padding: 0;">
+                <el-input v-model="pd_lcdformData['name']" disabled style="width: 500px"/>
+              </el-form-item>
+            </div>
+            <div style="width: 100%; height: 70vh; display: flex;">
+              <layout>
+                <layout-sider :resize-directions="['right']" :width="240" style="margin-right: 10px;height: 70vh;">
+                  <div class="JKWTree-tree">
+                    <el-tree :data="pd_lcd_treeData" @node-click="pd_lcd_handleNodeClick" default-expand-all></el-tree>
+                  </div>
+                </layout-sider>
+                <layout-main>
+                  <!-- 这里放右侧的内容 -->
+                  <el-space wrap>
+                    <!-- 右侧内容 -->
+                    <template v-for="item in processList.total_process">
+                      <el-button disabled :type="! processList.process.includes(item) ? 'danger' : 'info'" plain style="width: 50px">{{ item }}</el-button>
+                    </template>
+                  </el-space>
+                </layout-main>
+              </layout>
+            </div>
+          </el-dialog>
         </el-main>
       </el-container>
     </el-container>
@@ -410,18 +485,21 @@ import {
   finisheddel,
   getDayList,
   mbList,
-  finishedadd,
+  finishedadd,
   finishedEdit
 } from '@/api/jixiaoguanli/jitairibaobiao'
 
 // 全量引入格式化工具 请按需保留
+import * as XLSX from 'xlsx'
 import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted, onBeforeMount } from 'vue'
 import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
 import { TRUE } from 'sass'
+import { exportExcelFile } from '@/utils/excel'
 import { useUserStore } from '@/pinia/modules/user'
+import { getOrderProcessCount,PrintDetailList,getOrderProcessLeft,getOrderProcessRight } from "@/api/yunyin/yunying";
 const userStore = useUserStore() 
 const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
 defineOptions({
@@ -452,63 +530,63 @@ const getTabdata = async () => {
 
 	
 	}
-	const rqHandleFocus = () =>{
-		if(formData.value.jjcp_sj==''){
-			formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
-			
-		}
+	const rqHandleFocus = () =>{
+		if(formData.value.jjcp_sj==''){
+			formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
+			
+		}
 	}
 
 getTabdata();
 
 // 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-	入仓类型: "",
-	仓库编号: "",
-	仓库名称: "",
-	jjcp_num: "",
-	jjcp_gdbh: "",
-	jjcp_yjno: "",
-	订单编号: "",
-	jjcp_cpdh: "",
-	jjcp_cpmc: "",
-	成品编码: "",
-	成品名称: "",
-	客户料号: "",
-	jjcp_smb: "",
-	jjcp_sj: "",
-	jjcp_sl: "",
-	jjcp_dw: "张",
-	订单数量: "",
-	jjcp_sls: "",
-	机型备注: "",
-	jjcp_desc: "",
+const formData = ref({
+	入仓类型: "",
+	仓库编号: "",
+	仓库名称: "",
+	jjcp_num: "",
+	jjcp_gdbh: "",
+	jjcp_yjno: "",
+	订单编号: "",
+	jjcp_cpdh: "",
+	jjcp_cpmc: "",
+	成品编码: "",
+	成品名称: "",
+	客户料号: "",
+	jjcp_smb: "",
+	jjcp_sj: "",
+	jjcp_sl: "",
+	jjcp_dw: "张",
+	订单数量: "",
+	jjcp_sls: "",
+	机型备注: "",
+	jjcp_desc: "",
 	
 })
-
-const initFormData = () => {
-	formData.value = {
-		入仓类型: "",
-		仓库编号: "",
-		仓库名称: "",
-		jjcp_num: "",
-		jjcp_gdbh: "",
-		jjcp_yjno: "",
-		订单编号: "",
-		jjcp_cpdh: "",
-		jjcp_cpmc: "",
-		成品编码: "",
-		成品名称: "",
-		客户料号: "",
-		jjcp_smb: "",
-		jjcp_sj: "",
-		jjcp_sl: "",
-		jjcp_dw: "张",
-		订单数量: "",
-		jjcp_sls: "",
-		机型备注: "",
-		jjcp_desc: "",
-	}
+
+const initFormData = () => {
+	formData.value = {
+		入仓类型: "",
+		仓库编号: "",
+		仓库名称: "",
+		jjcp_num: "",
+		jjcp_gdbh: "",
+		jjcp_yjno: "",
+		订单编号: "",
+		jjcp_cpdh: "",
+		jjcp_cpmc: "",
+		成品编码: "",
+		成品名称: "",
+		客户料号: "",
+		jjcp_smb: "",
+		jjcp_sj: "",
+		jjcp_sl: "",
+		jjcp_dw: "张",
+		订单数量: "",
+		jjcp_sls: "",
+		机型备注: "",
+		jjcp_desc: "",
+	}
 }
 // 验证规则
 const rule = reactive({
@@ -560,6 +638,10 @@ const handleCurrentChange = (val) => {
   }
 }
 
+
+const ExcelformData = ref({})
+
+
 // 查询
 const getTableData = async () => {
 	
@@ -592,9 +674,9 @@ function onSearch() {
 const ADD=ref('0')
 //新增
 function onAdd() {
-	// GetInfo(lastCellValue)
-	initFormData()
-	formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
+	// GetInfo(lastCellValue)
+	initFormData()
+	formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
 	type.value='create'
 	dialogFormVisible.value = true
 }
@@ -630,6 +712,13 @@ const GetDayList = async (value) => {
 }
 const SMVisible = ref(false)
 const SMselectData = ref([]);
+const _Gd_gdbh = ref(null)
+const _Gd_yjno = ref(null)
+const MBRowClick = async (row) => {
+	console.log(row)
+  _Gd_gdbh.value = row.Yj_Gdbh;
+  _Gd_yjno.value = row.yj_Yjno;
+}
 //首末版统计
 function onSMB() {
 	MbList()
@@ -643,6 +732,237 @@ const MbList = async (value) => {
 	 console.log(TJselectData)
   }
 }
+
+//=========工序产量核查===========
+const pd_gxclhclist = ref(false);
+const gxclhc_Data = ref([]);
+const gxclhc_Columns = ref(
+    [
+      { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
+      // { label: '印件', prop: 'Gy0_yjno', width: '130' },
+      // { label: '工序', prop: 'Gy0_gxh', width: '130' },
+      // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
+      { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
+      { label: '联数', prop: 'Gy0_ls', width: '70' },
+      { label: '折算车头产量', prop: '折算车头产量', width: '120' },
+      { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
+      { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
+      { label: '制程废品率', prop: '制程废品率', width: '120' },
+      { label: '来料异常', prop: '来料异常', width: '90' },
+      { label: '流程单数', prop: 'process_num', width: '90' },
+      { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
+      { label: '工序状态', prop: 'PD_WG', width: '90'},
+      { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
+    ]
+)
+const gxclhcformData = reactive({
+  gdbh: '',
+  gdmc: '',
+  yjno: '',
+});
+const gdwhformData = reactive({
+  // 下拉框选项数据
+  yinjian: [],
+  // 设置默认值
+  yjno: '',
+});
+const inputCpmc = ref('')
+
+
+//导出excel表
+const exportToExcel = () => {
+	const tableCols1 = [
+		{ label: '工单编号', prop: 'Yj_Gdbh',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '印件号', prop: 'yj_Yjno',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '印件名称', prop: 'yj_yjmc',  width: '600',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '计划交货数量', prop: 'yj_成品数量',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '印件投料', prop: 'yj_实际投料',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '包装产量', prop: 'sczl_cls',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '入仓数量', prop: 'jjcp_sls',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '是否末版', prop: 'jjcp_smb',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+		{ label: '缺数', prop: '',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+    { label: '完工', prop: '',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+    { label: '最近入仓时间', prop: 'jjcp_sj',  width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
+	]
+ 
+	const headers = tableCols1.map(item => ({
+		label: item.label,
+		prop: item.prop
+	}));
+
+	//SMselectData._value table中data属性
+  const data = SMselectData._value.map(item => {
+    const row = {};
+    headers.forEach(({ prop }) => {
+      row[headers.find(h => h.prop === prop).label] = item[prop];
+    });
+    return row;
+  });
+	//引入import { exportExcelFile } from '@/utils/excel'
+  exportExcelFile(data);
+};
+
+// 工序产量核查按钮
+const pd_gxclhconClick = async () => {
+  if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
+    ElMessage({type: 'warning',message: '请选择具体的工单,再进行操作'})
+    return false;
+  }
+  gxclhcformData['gdbh'] = _Gd_gdbh.value;
+  pd_gxclhclist.value = true;
+  const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
+  console.log(response)
+  gdwhformData.yjno = response.data[0].no
+  inputCpmc.value = response.data[0].name
+  if (response.code === 0) {
+	  const noFields = response.data.map(item => item.no);
+	  gdwhformData.yinjian = noFields
+	} else {
+	  console.error('查询失败:', response.msg);
+	}
+  _getOrderProcessCount();
+};
+
+//点击印件下拉框
+const ongdwhfanclick = async() => {
+	_PrintDetailList();
+  _getOrderProcessCount();
+}
+
+//工序产量核查回车
+const gxclhcProductValue = async () => {
+  _getOrderProcessCount();
+  _PrintDetailList();
+}
+//工序产量核查退出
+const gxclhcCancel = async () => {
+  pd_gxclhclist.value = false;
+};
+
+//印件编号获取方法接口
+const _PrintDetailList = async () => {
+  const order = gxclhcformData['gdbh'];
+  const response = await PrintDetailList ({workOrder:order});
+  const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
+    if (matchingItem) {
+		console.log(matchingItem.name)
+		inputCpmc.value = matchingItem.name;
+	} else {
+		console.log(`No matching item found for no: ${gdwhformData.yjno}`);
+	}
+}
+
+//工序产量核查方法接口
+const _getOrderProcessCount = async () => {
+  const order = gxclhcformData['gdbh'];
+  const yjno = gdwhformData.yjno;
+  const getOrderProcessCount_list = await getOrderProcessCount({order:order,yjno:yjno});
+  const concatenatedData = getOrderProcessCount_list.data.map(item => {
+    // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
+    const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
+    const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
+    const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc}`;
+    return {
+      ...item,
+      concatenatedData: concatenatedValue, // 使用新属性名
+    };
+  });
+  gxclhc_Data.value = concatenatedData;
+};
+//工序产量核查
+const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if (column.label === '实际上报产量' ||column.label === '制程废品'  || column.label === '制程废品率' ||
+      column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
+    return 'lan-plan-usage-lows';
+  }
+  if (column.label === '折算车头产量') {
+    return 'gxclhc—color-column-red';
+  }
+  // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
+  if (column.label === '工序状态'){
+    if(row['PD_WG'] === '完工'){
+      return 'lan-plan-usage-lowshui';
+    }else{
+      return 'pczccolor-column-lan';
+    }
+  }
+}
+
+// =========== 流程单查询 ===========
+
+const pd_lcdlist = ref(false);
+const pd_lcdformData = reactive({
+  gdbh: '',
+  code: '',
+  name: '',
+  yjno: '',
+});
+// 流程单查询按钮
+const processList = ref([]);
+const pd_lcdlistonClick = async () => {
+  if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
+    ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
+    return false;
+  }else{
+    pd_lcdformData['gdbh'] = _Gd_gdbh.value;
+    pd_lcdformData['yjno'] = _Gd_yjno.value;
+    pd_lcdlist.value = true;
+    processList.value = []
+    _getOrderProcessLeft_list();
+  }
+}
+const pd_lcdProductValue = async () => {
+  _getOrderProcessLeft_list();
+}
+const pd_lcd_treeData = ref([]);
+const _getOrderProcessLeft_list = async () => {
+  const order = pd_lcdformData['gdbh'];
+  const yjno = pd_lcdformData['yjno']
+  // console.log(order)
+  try {
+    //5.1流程单查询-工单工序生产进程菜单栏
+    const getOrderProcessLeft_list = await getOrderProcessLeft({ order:order,yjno:yjno});
+    console.log(getOrderProcessLeft_list)
+    pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code'];
+    pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name'];
+    pd_lcd_treeData.value = [{
+      label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+      // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+      value: undefined,
+      children: []
+    }]
+    const newData = [];
+    for (let key in getOrderProcessLeft_list.data.Gy_info) {
+      let temp = getOrderProcessLeft_list.data.Gy_info[key];
+      let concatenatedValue = `${temp.Gy0_yjno}-${temp.Gy0_gxh} ---> ${temp.Gy0_gxmc}`;
+      newData.push({ label: concatenatedValue,value: temp.Gy0_gxh });
+    }
+    pd_lcd_treeData.value[0].children = newData;
+    //5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
+    const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:newData[0].value,yjno:yjno});
+    processList.value = getOrderProcessRight_list.data
+  } catch (error) {
+    console.error(error);
+  }
+};
+
+const pd_lcd_handleNodeClick = async (node) => {
+  if (node.value === undefined) return
+  const order = pd_lcdformData['gdbh'];
+  const yjno = pd_lcdformData['yjno'];
+  ////5.2流程单查询-获取工单工序生产进程右侧
+  const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:node.value,yjno:yjno});
+  console.log(getOrderProcessRight_list)
+  processList.value = getOrderProcessRight_list.data
+};
+
+// 流程单查询退出
+const pd_lcdCancel = async () => {
+  pd_lcdlist.value = false;
+}
+
+
+
 //定位
 const GetmachineLocate = async () => {
   const response = await finishedlocate({
@@ -661,8 +981,8 @@ const GetmachineLocate = async () => {
 	  total.value = response.data.total
     tableData.splice(0, tableData.length, ...processedData);
   }
-}
-
+}
+
 //入仓类型回车事件
 const getRCsubmit = (event) => {
 	GetRC()
@@ -712,8 +1032,8 @@ const selectRC = (event) => {
     } else if (event.keyCode === 13) { // 回车键
         RCVisible.value = false
     }
-}
-
+}
+
 
 //仓库编号回车事件
 const getCKsubmit = (event) => {
@@ -771,10 +1091,10 @@ const selectCK = (event) => {
 }
   
 //工单编号回车事件
-const getGDsubmit = (event) => {
-	if(formData.value.jjcp_gdbh==''){
-		ElMessage({type: 'warning',message: '请填写工单编号'});
-		return
+const getGDsubmit = (event) => {
+	if(formData.value.jjcp_gdbh==''){
+		ElMessage({type: 'warning',message: '请填写工单编号'});
+		return
 	}
 	GetGD()
 }
@@ -790,7 +1110,7 @@ const GetGD = async () => {
   }
 }
 //选择
-const GDSelectClick = (row, column, event) => {
+const GDSelectClick = (row, column, event) => {
 	console.log(111)
   const { Gd_gdbh,yj_yjno,销售订单号,yj_Yjdh,yj_yjmc,成品代号,成品名称,客户料号,gdyj } = row
   formData.value.jjcp_gdbh=Gd_gdbh
@@ -800,12 +1120,12 @@ const GDSelectClick = (row, column, event) => {
   formData.value.jjcp_cpmc=yj_yjmc
   formData.value.成品编码=成品代号
   formData.value.成品名称=成品名称
-  formData.value.客户料号=客户料号
-  finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
-	  if (res.code === 0) {
-		  formData.value.订单数量 = res.data.订单数量
-		  formData.value.jjcp_sls = res.data.jjcp_sls
-	   }
+  formData.value.客户料号=客户料号
+  finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
+	  if (res.code === 0) {
+		  formData.value.订单数量 = res.data.订单数量
+		  formData.value.jjcp_sls = res.data.jjcp_sls
+	   }
   });
   GDVisible.value = false
 }
@@ -822,12 +1142,12 @@ const setGDCurrent = (row) => {
 	  formData.value.jjcp_cpmc=yj_yjmc
 	  formData.value.成品编码=成品代号
 	  formData.value.成品名称=成品名称
-	  formData.value.客户料号=客户料号	
-		finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
-			  if (res.code === 0) {
-				  formData.value.订单数量 = res.data.订单数量
-				  formData.value.jjcp_sls = res.data.jjcp_sls
-			   }
+	  formData.value.客户料号=客户料号	
+		finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
+			  if (res.code === 0) {
+				  formData.value.订单数量 = res.data.订单数量
+				  formData.value.jjcp_sls = res.data.jjcp_sls
+			   }
 		});
   })
 }
@@ -860,8 +1180,8 @@ const getSLsubmit = (event) => {
 }
 //获取工单数量信息
 const GetSL = async () => {
-	if(formData.value.jjcp_cpdh){
-		
+	if(formData.value.jjcp_cpdh){
+		
 	}
   const response = await finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh});
   console.log(response) 
@@ -869,8 +1189,8 @@ const GetSL = async () => {
  formData.value.订单数量=response.data.订单数量
  formData.value.jjcp_sls=response.data.jjcp_sls
   }
-}
-
+}
+
 //入仓类型回车事件
 const getSMBsubmit = (event) => {
 	GetSMB()
@@ -920,8 +1240,8 @@ const selectSMB = (event) => {
     } else if (event.keyCode === 13) { // 回车键
         SMBVisible.value = false
     }
-}
-
+}
+
 
 // ============== 表格控制部分结束 ===============
 
@@ -1015,56 +1335,56 @@ const closeDialog = () => {
   }
 }
 // 弹窗确定
-const enterDialog = async () => {
-	if(formData.value.入仓类型==''){
-		ElMessage({type: 'warning',message: '请选择入仓类型'});
-		return;
-	}
-	if(formData.value.仓库编号==''){
-		ElMessage({type: 'warning',message: '请选择仓库'});
-		return;
-	}
-	if(formData.value.jjcp_gdbh==''){
-		ElMessage({type: 'warning',message: '请填写工单编号'});
-		return;
-	}
-	if(formData.value.jjcp_cpdh==''){
-		ElMessage({type: 'warning',message: '请选择印件'});
-		return;
-	}
-	if(formData.value.jjcp_sl==''){
-		ElMessage({type: 'warning',message: '请填写入仓数量'});
-		return;
-	}
-	
-	const restoredData = {
-		 Sys_id:sys_id,
-		 入仓类型:formData.value.入仓类型,
-		 仓库编号:formData.value.仓库编号,
-		 仓库名称:formData.value.仓库名称,
-		 jjcp_num:formData.value.jjcp_num,
-		 jjcp_gdbh:formData.value.jjcp_gdbh,
-		 jjcp_yjno:formData.value.jjcp_yjno,
-		 订单编号:formData.value.订单编号,
-		 jjcp_cpdh:formData.value.jjcp_cpdh,
-		 jjcp_cpmc:formData.value.jjcp_cpmc,
-		 成品编码:formData.value.成品编码,
-		 成品名称:formData.value.成品名称,
-		 客户料号:formData.value.客户料号,
-		 jjcp_smb:formData.value.jjcp_smb,
-		 jjcp_sj:formData.value.jjcp_sj,
-		 jjcp_sl:formData.value.jjcp_sl,
-		 jjcp_dw:formData.value.jjcp_dw,
-		 机型备注:formData.value.机型备注,
-		 jjcp_desc:formData.value.jjcp_desc,
-	}
+const enterDialog = async () => {
+	if(formData.value.入仓类型==''){
+		ElMessage({type: 'warning',message: '请选择入仓类型'});
+		return;
+	}
+	if(formData.value.仓库编号==''){
+		ElMessage({type: 'warning',message: '请选择仓库'});
+		return;
+	}
+	if(formData.value.jjcp_gdbh==''){
+		ElMessage({type: 'warning',message: '请填写工单编号'});
+		return;
+	}
+	if(formData.value.jjcp_cpdh==''){
+		ElMessage({type: 'warning',message: '请选择印件'});
+		return;
+	}
+	if(formData.value.jjcp_sl==''){
+		ElMessage({type: 'warning',message: '请填写入仓数量'});
+		return;
+	}
+	
+	const restoredData = {
+		 Sys_id:sys_id,
+		 入仓类型:formData.value.入仓类型,
+		 仓库编号:formData.value.仓库编号,
+		 仓库名称:formData.value.仓库名称,
+		 jjcp_num:formData.value.jjcp_num,
+		 jjcp_gdbh:formData.value.jjcp_gdbh,
+		 jjcp_yjno:formData.value.jjcp_yjno,
+		 订单编号:formData.value.订单编号,
+		 jjcp_cpdh:formData.value.jjcp_cpdh,
+		 jjcp_cpmc:formData.value.jjcp_cpmc,
+		 成品编码:formData.value.成品编码,
+		 成品名称:formData.value.成品名称,
+		 客户料号:formData.value.客户料号,
+		 jjcp_smb:formData.value.jjcp_smb,
+		 jjcp_sj:formData.value.jjcp_sj,
+		 jjcp_sl:formData.value.jjcp_sl,
+		 jjcp_dw:formData.value.jjcp_dw,
+		 机型备注:formData.value.机型备注,
+		 jjcp_desc:formData.value.jjcp_desc,
+	}
 	console.log(lastCellValue)
     let res
     switch (type.value) {
       case 'create':
         res = await finishedadd(restoredData)
         break
-      case 'update':
+      case 'update':
 		restoredData.UniqId = lastCellValue;
         res = await finishedEdit(restoredData)
         break
@@ -1087,19 +1407,19 @@ const enterDialog = async () => {
 const ent = (event,id1,id2,id3) => {
 
   if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
-    if(id2=='入仓类型'){
-    	getRCsubmit()
-    }
+    if(id2=='入仓类型'){
+    	getRCsubmit()
+    }
 	if(id2=='仓库编号'){
 		getCKsubmit()
-	}
+	}
 	if(id2=='工单编号'){
 		getGDsubmit()
-	}
-	if(id2=='首末板'){
-		console.log(1111)
-		getSMBsubmit()
-	}
+	}
+	if(id2=='首末板'){
+		console.log(1111)
+		getSMBsubmit()
+	}
 	if(id3!=''){
       document.getElementById(id3).focus()
     }
@@ -1189,7 +1509,7 @@ onMounted(async () => {
   background: #ff80ff !important;
   /* 背景颜色 */
 }
-</style>
+</style>
 <style scoped>
 :deep(.el-table td .cell) {
   line-height: 20px !important;
@@ -1215,4 +1535,9 @@ onMounted(async () => {
 .mab{
   margin-bottom: 5px;
 }
+/* 工序产量核查高亮 */
+:deep(.lan-plan-usage-lows  div) {
+  color: blue !important;
+  font-weight: bold;
+}
 </style>

+ 1 - 1
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -3778,7 +3778,7 @@ const gdgyenterDialog = async () => {
 	  Gy0_gxh: gdgyformData['工序'] ? gdgyformData['工序'] : "",
 	  Gy0_gxmc:gdgyformData['工艺名称'] ? gdgyformData['工艺名称'] : "",
 	  Add_gxmc:gdgyformData['工序名称'] ? gdgyformData['工序名称'] : "",
-	  备选工序: gdgyformData['备选工序'] ? "1" : "0",
+	  备选工序: gdgyformData['备选工序'] ? "1" : "",
 	  重点工序: gdgyformData['重点工序'] ? gdgyformData['重点工序'] : "",
 	  Gy0_sbbh: sbbh ? sbbh : "",
 	  Gy0_sbmc: "",

+ 101 - 40
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -283,14 +283,14 @@
                     <el-col :span="3"><el-input v-model="formDatas.name8"/></el-col>
           			  </el-row>
           			  <el-row :gutter="10" style="margin-top: 1px;">
-                    <el-col :span="3"><el-input v-model="formDatas.percentage1"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage2"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage3"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage4"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage5"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage6"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage7"/></el-col>
-                    <el-col :span="3"><el-input v-model="formDatas.percentage8"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage1"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage2"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage3"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage4"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage5"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage6"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage7"/></el-col>
+                    <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage8"/></el-col>
           			  </el-row>
           			</div>
           			<div style="height: 50vh; width: 15vh;margin-top: 3vh;">
@@ -1665,16 +1665,16 @@
 
         <el-row :gutter="10" style="margin-top: 10px;">
           <el-col :span="2"></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员1['比例']" id="rate1"  @keydown="ent($event, 'bh11', 'rate1', 'rate2')"   placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员2['比例']" id="rate2"  @keydown="ent($event, 'rate1', 'rate2', 'rate3')"   placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员3['比例']" id="rate3"  @keydown="ent($event, 'rate2', 'rate3', 'rate4')"   placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员4['比例']" id="rate4"  @keydown="ent($event, 'rate3', 'rate4', 'rate5')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员5['比例']" id="rate5"  @keydown="ent($event, 'rate4', 'rate5', 'rate6')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员6['比例']" id="rate6"  @keydown="ent($event, 'rate5', 'rate6', 'rate7')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员7['比例']" id="rate7"  @keydown="ent($event, 'rate6', 'rate7', 'rate8')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员8['比例']" id="rate8"  @keydown="ent($event, 'rate7', 'rate8', 'rate9')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员9['比例']" id="rate9"  @keydown="ent($event, 'rate8', 'rate9', 'rate10')"  placeholder="" /></el-col>
-          <el-col :span="2"><el-input v-model="formdata3.value.组员10['比例']" id="rate10"  @keydown="ent($event, 'rate9', 'rate10', '工单编号')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员1['比例']" id="rate1" @input="updateTotal"  @keydown="ent($event, 'bh11', 'rate1', 'rate2')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员2['比例']" id="rate2" @input="updateTotal" @keydown="ent($event, 'rate1', 'rate2', 'rate3')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员3['比例']" id="rate3" @input="updateTotal" @keydown="ent($event, 'rate2', 'rate3', 'rate4')"   placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员4['比例']" id="rate4" @input="updateTotal" @keydown="ent($event, 'rate3', 'rate4', 'rate5')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员5['比例']" id="rate5" @input="updateTotal" @keydown="ent($event, 'rate4', 'rate5', 'rate6')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员6['比例']" id="rate6" @input="updateTotal" @keydown="ent($event, 'rate5', 'rate6', 'rate7')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员7['比例']" id="rate7" @input="updateTotal" @keydown="ent($event, 'rate6', 'rate7', 'rate8')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员8['比例']" id="rate8" @input="updateTotal" @keydown="ent($event, 'rate7', 'rate8', 'rate9')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员9['比例']" id="rate9" @input="updateTotal" @keydown="ent($event, 'rate8', 'rate9', 'rate10')"  placeholder="" /></el-col>
+          <el-col :span="2"><el-input v-model="formdata3.value.组员10['比例']" id="rate10" @input="updateTotal" @keydown="ent($event, 'rate9', 'rate10', '工单编号')"  placeholder="" /></el-col>
           <el-col :span="2"></el-col>
          </el-row>
 		  <!-- </el-scrollbar> -->
@@ -4672,7 +4672,7 @@ const getbzyg = async (value,key) => {
   let bzxm=''
   bzxm=`name${key}`
   const response = await getYg({sczl_bh:formDatas.value[bzyg]});
-  console.log(response)
+  console.log(1134,response)
   if (response.code === 0) {
     if(response.data.length === 1){
       formDatas.value[bzxm]= response.data[0].ygxm
@@ -4725,12 +4725,41 @@ const JPblplanUsageCellClassedit = ({row, column, rowIndex, columnIndex}) =>{
   }
 }
 
+const fpsum = ref();
+const fpsum2 = ref();
+//自动计算分配系数和
+function updateTotal() {
+  // 直接指定要累加的属性名  
+  const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];  
+  const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  fpsum.value = values.reduce((sum, value) => sum + value, 0);
+  const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9','组员10',];  
+  const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) || 0); // 使用 || 0 来处理可能的 NaN 或 undefined/null  
+  fpsum2.value = valuess.reduce((sum, value) => sum + value, 0);  
+}
 
 const addBz = async() => {
   // selectedOption.value='YS-JY06-002||印品质量检测机(JP1020-18)'
   // console.log(selectedOption.value)
   // console.log(BZMC.value)
   // console.log(selectedOption.value.split('|')[0])
+  initfordata3()
+  updateTotal()
+  console.log(997666,fpsum.value)
+  if(fpsum.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于1",
+    });
+	return;
+  }
+  if(fpsum.value < 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能小于1",
+    });
+	return;
+  }
   const response = await MachineTeamAdd({
     sczl_jtbh:  selectedOption.value.split('|')[0],
     sczl_bzdh:  BZMC.value,
@@ -4756,7 +4785,6 @@ const addBz = async() => {
     sczl_rate10: formDatas.value.percentage8,
     sys_id: sys_id
   })
-  // console.log()
   if (response.code === 0) {
     ElMessage({
       type: 'success',
@@ -4769,6 +4797,23 @@ const addBz = async() => {
 }
 const currentBz ={}
 const selectBz = async() => {
+	initfordata3()
+  updateTotal()
+  console.log(997666,fpsum.value)
+  if(fpsum.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于1",
+    });
+	return;
+  }
+  if(fpsum.value < 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能小于1",
+    });
+	return;
+  }
 	if(currentBz.value){
 		BZMC.value=currentBz.value.班组号
 		let sczl_bhkey=''
@@ -5497,6 +5542,22 @@ const tablebllickHandlerlist = async (row, column, event) => {
  }
  //日报表修改弹窗确定
  const chanliangenterDialog = async () => {
+	updateTotal()
+	console.log(156,fpsum2.value)
+	if(fpsum2.value > 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能大于1",
+    });
+	return;
+  }
+  if(fpsum2.value < 1){
+    ElMessage({
+      type: "error",
+      message: "分配系数相加不能小于1",
+    });
+	return;
+  }
   // SubmitDailyProduction()
   if (type2.value === 'update') {
   	  SubmitDailyProduction()
@@ -5507,16 +5568,16 @@ const tablebllickHandlerlist = async (row, column, event) => {
  //日报表新增
  const add = async () => {
 	 // console.log(date+''+formdata3.value.starttime)
-	 const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
-	 const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
-	 const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
-	 const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
-	 const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
-	 const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
-	 const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
-	 const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
-	 const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
-	 const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
+	 const rate1=(parseFloat(formdata3.value.组员1['比例'])).toFixed(5)
+	 const rate2=(parseFloat(formdata3.value.组员2['比例'])).toFixed(5)
+	 const rate3=(parseFloat(formdata3.value.组员3['比例'])).toFixed(5)
+	 const rate4=(parseFloat(formdata3.value.组员4['比例'])).toFixed(5)
+	 const rate5=(parseFloat(formdata3.value.组员5['比例'])).toFixed(5)
+	 const rate6=(parseFloat(formdata3.value.组员6['比例'])).toFixed(5)
+	 const rate7=(parseFloat(formdata3.value.组员7['比例'])).toFixed(5)
+	 const rate8=(parseFloat(formdata3.value.组员8['比例'])).toFixed(5)
+	 const rate9=(parseFloat(formdata3.value.组员9['比例'])).toFixed(5)
+	 const rate10=(parseFloat(formdata3.value.组员10['比例'])).toFixed(5)
    const restoredData = {
      sczl_gdbh:formdata3.value.工单编号,
      sczl_yjno:formdata3.value.yjno,
@@ -5591,16 +5652,16 @@ const tablebllickHandlerlist = async (row, column, event) => {
  const SubmitDailyProduction = async () => {
 // console.log(formdata3.value.rq)
 // return
-    const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
-    const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
-    const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
-    const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
-    const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
-    const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
-    const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
-    const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
-    const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
-    const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
+    const rate1=(parseFloat(formdata3.value.组员1['比例'])).toFixed(5)
+    const rate2=(parseFloat(formdata3.value.组员2['比例'])).toFixed(5)
+    const rate3=(parseFloat(formdata3.value.组员3['比例'])).toFixed(5)
+    const rate4=(parseFloat(formdata3.value.组员4['比例'])).toFixed(5)
+    const rate5=(parseFloat(formdata3.value.组员5['比例'])).toFixed(5)
+    const rate6=(parseFloat(formdata3.value.组员6['比例'])).toFixed(5)
+    const rate7=(parseFloat(formdata3.value.组员7['比例'])).toFixed(5)
+    const rate8=(parseFloat(formdata3.value.组员8['比例'])).toFixed(5)
+    const rate9=(parseFloat(formdata3.value.组员9['比例'])).toFixed(5)
+    const rate10=(parseFloat(formdata3.value.组员10['比例'])).toFixed(5)
    const restoredData = {
     sczl_gdbh:formdata3.value.工单编号,
      sczl_yjno:formdata3.value.yjno,