liuhairui 4 minggu lalu
induk
melakukan
29374dee41

+ 380 - 102
src/view/quality/orderstatus.vue

@@ -1,7 +1,6 @@
 <template>
-	<h3>工单生产批次质量档案查询</h3>
-	
-	<div style="padding: 20px; height: 100%; overflow: auto;">
+	<div style="padding: 0px 20px 20px 20px; height: 100%; overflow: auto;">
+		<h3>工单生产批次质量档案查询</h3>
 	  <div style="margin-top: 10px;">
 	    <!-- 提示信息 -->
 	    <hr>
@@ -11,16 +10,16 @@
 	    
 	    <!-- 输入框和按钮 -->
 	    <div style="display: flex; align-items: center; margin-top: 10px;">
-	      <el-input v-model="searchInfolcd" placeholder="Enter回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="height: 40px;flex: 1;"></el-input>
+	      <el-input v-model="searchInfolcd" placeholder="Enter 回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="height: 40px;flex: 1;"></el-input>
 	      <el-button type="primary" title="搜索"  icon="el-icon-search" style="width: 70px;height: 40px;font-size: 18px;"  @click="onSubmitlcd" >搜索</el-button>
-						<el-button type="primary" title="查看"  icon="el-icon-search" style="width: 110px;height: 40px;font-size: 18px;"  @click="onstatsuclick" >查看流程单</el-button>
+		  <el-button type="primary" title="查看流程单"  icon="el-icon-search" style="width: 110px;height: 40px;font-size: 18px;"  @click="onstatsuclick" >查看流程单</el-button>
 	    </div>
 	    
 	    <!-- 表格展示区域 -->
 	    <div class="gva-table-box" style="margin-top: 15px;">
 	      <el-table 
 				ref="multipleTable"
-				style="width: 100%; max-height: 350px; overflow: auto;" 
+				style="width: 100%; height: 430px; overflow: auto;" 
 				:row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
 				:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 				:data="tableDatalcd" 
@@ -31,9 +30,9 @@
 				@row-click="tableRowClicklcd"
 				@row-dblclick="updateCompanyFunclcd"
 				@selection-change="handleSelectionChange">
-			<el-table-column align="left"  label="工单编号" 	  width="115"	prop="Gd_gdbh" />
-			<el-table-column align="left"  label="行号" 	  width="60"	prop="行号" />
-			<el-table-column align="left"  label="工序名称" 	 	prop="Gd_cpmc"  />
+			<el-table-column align="left"  label="工单编号" 	  width="120"	prop="Gd_gdbh" />
+			<el-table-column align="left"  label="行号" 	  	  width="70"	prop="行号" />
+			<el-table-column align="left"  label="工序名称" 	 			    prop="Gd_cpmc"  />
 	        <!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
 	      </el-table>
 
@@ -50,43 +49,64 @@
 	    </div>
 	  </div>
 	</div>
-	<!-- 机台生产日报表维护弹窗 -->
-	<el-dialog 
-    v-model="popdialog" 
-    destroy-on-close 
-    width="90%" 
-    style="height: 92%; margin-left: 5%; margin-top: 1%;">
+
+	<el-dialog v-model="popdialog" destroy-on-close width="90%" style="height: 92%; margin-left: 5%; margin-top: 1%;">
 	  <div>
-	    <!-- 顶层布局 -->
 	    <layout>
-	      <!-- 顶部的搜索区域 -->
+			<!-- 顶部 -->
 	      <layout-header>
 			<div style="display: flex; justify-content: center; width: 100%;">
-  <h3 style="font-size: 24px; font-weight: bold;">工单批次质量档案</h3>
-</div>
-			<div style="display: flex; justify-content: right;margin-right: 100px;">			
-						<el-button type="primary" class="bt" style="margin-left: 20px;" @click="pd_gdprintonClick" >工单打印</el-button>
+			  <h3 style="font-size: 24px; font-weight: bold;">工单批次质量档案</h3>
 			</div>
-	        <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule">
-	          <!-- 添加按钮 -->
-			  <el-button type="primary" icon="edit" style="color: white;margin-left: 20px;"   @click="ontuicclick"  class="bt" title="退出">退出</el-button>
-	        </el-form>
 	      </layout-header>
 
-	
 	      <!-- 左右布局 -->
 	      <layout style="height: calc(100% - 50px); display: flex;">
-	        <!-- 左侧树形区域 -->
-	        <layout-sider style="width: 140px; margin-right: 10px; overflow: hidden;height: 584px;">
+	        <layout-sider>
 	          <div class="JKWTree-tree" style="height: 100%; max-height: 100vh; overflow-y: auto;">
 	            <h3></h3>
-	            <el-tree
-	              :data="treeDatalcd"
-	              node-key="num"
-	              highlight-current
-	              :props="defaultProps"
-	              @node-click="handleNodeClicklcd"
-	            />
+	            <div v-if="useDateNav && dateTree.length" class="os-date-dates">
+	              <template v-for="(y, yi) in dateTree" :key="'y-' + yi + '-' + y.year">
+	                <template v-if="isFlatDateOnlyGroup(y)">
+	                  <div
+	                    v-for="d in y.months[0].days"
+	                    :key="d"
+	                    class="os-date-node os-date-day"
+	                    :class="{ 'is-current': selectedDate === d }"
+	                    @click="selectDate(d)"
+	                  >
+	                    {{ d }}
+	                  </div>
+	                </template>
+	                <template v-else>
+	                  <div class="os-date-fold-hd os-date-year" @click="toggleYearFold(yi)">
+	                    <span class="os-date-caret" :class="{ 'is-open': isYearFoldOpen(yi) }" />
+	                    <span>{{ y.year }}</span>
+	                  </div>
+	                  <div v-show="isYearFoldOpen(yi)" class="os-date-fold-body">
+	                    <template v-for="(m, mi) in y.months" :key="'m-' + yi + '-' + mi + '-' + m.month">
+	                      <div class="os-date-fold-hd os-date-month"
+	                        :class="{ 'is-current': selectedMonthKey === monthFoldKey(yi, mi) && !selectedDate }"
+	                        @click="selectMonth(yi, mi, m)" >
+	                        <span class="os-date-caret" :class="{ 'is-open': isMonthFoldOpen(yi, mi) }" @click.stop="toggleMonthFold(yi, mi)" />
+	                        <span>{{ formatMonthYmDisplay(m.month) }}</span>
+	                      </div>
+	                      <div v-show="isMonthFoldOpen(yi, mi)" class="os-date-fold-days">
+	                        <div
+	                          v-for="d in m.days"
+	                          :key="d"
+	                          class="os-date-node os-date-day"
+	                          :class="{ 'is-current': selectedDate === d }"
+	                          @click="selectDate(d)" >
+	                          {{ d }}
+	                        </div>
+	                      </div>
+	                    </template>
+	                  </div>
+	                </template>
+	              </template>
+	            </div>
+	            <el-tree v-else :data="treeDatalcd" node-key="num" highlight-current :props="defaultProps" @node-click="handleNodeClicklcd"/>
 	          </div>
 	        </layout-sider>
 	
@@ -94,6 +114,10 @@
 	        <!-- 右侧表格区域 -->
 	        <layout-content style="flex: 1; overflow: auto;">
 	          <el-main>
+				  <div style="display: flex; justify-content: right;">
+				  	<el-button type="primary" class="bt" style="width: 60px;" @click="pd_gdprintonClick" >工单打印</el-button>
+				  	<el-button type="danger"  style="color: white;width: 60px;"   @click="ontuicclick"  class="bt" title="退出">退出</el-button>
+				  </div>
 				 <div style="width: 100%; font-family: Arial, sans-serif; font-size: 14px;">
 					 <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
 					   <p style="flex: 0.4; margin: 0;">工单编号:<span style="color: red;">{{ _GetorderDetail['Gd_gdbh'] }}</span></p>
@@ -123,7 +147,7 @@
 						    <el-table-column align="left"  label="流程单号" 	  width="81"	prop="流程单号" />
 						    <el-table-column align="left"  label="工序号" 	  width="68"	prop="工序号" />
 						    <el-table-column align="left"  label="工序名称" 	  width="240"	prop="工序名称"  />
-						    <el-table-column align="left"  label="生产日期" 	  width="120"	prop="生产日期"  />
+						    <el-table-column align="left"  label="生产日期" 	  width="117"	prop="生产日期"  />
 						    <el-table-column align="left"  label="机台编号" 	  width="81"	prop="机台编号"  />
 						    <el-table-column align="left"  label="班组人员01"  width="105"  :formatter="(row) => `${row.sczl_bh1 || ''} ${row.name1 || ''}`"/>
 						    <el-table-column align="left"  label="班组人员02"  width="105"  :formatter="(row) => `${row.sczl_bh2 || ''} ${row.name2 || ''}`"/>
@@ -137,8 +161,8 @@
 						    <el-table-column align="left"  label="班组人员10"  width="105"  :formatter="(row) => `${row.sczl_bh10 || ''} ${row.name10 || ''}`"/>
 						  </el-table>
 						  <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
-		共 {{ lcdTableTotal }} 条记录
-		</div>
+							共 {{ lcdTableTotal }} 条记录
+						  </div>
 						</el-tab-pane>
 
 						<el-tab-pane label="制程检验记录"  @click="showTable('制程检验记录')"  name="second">
@@ -160,8 +184,8 @@
 						    <el-table-column align="left"  label="修改标准" width="160"	prop="修改标准"  />
 						  </el-table>
 						  <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
-		共 {{ zcjyjlTotal }} 条记录
-		</div>
+							共 {{ zcjyjlTotal }} 条记录
+						  </div>
 						</el-tab-pane>
 						
 						<el-tab-pane label="制程异常记录"  @click="showTable('制程异常记录')"  name="third">
@@ -179,8 +203,8 @@
 						    <el-table-column align="left"  label="用户" 	  	  width="160"	prop="用户"  />
 						  </el-table>
 						  <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
-		共 {{ zcycjlTotal }} 条记录
-		</div>
+							共 {{ zcycjlTotal }} 条记录
+						  </div>
 						</el-tab-pane>
 
 						<el-tab-pane label="物料批次信息"  @click="showTable('物料批次信息')"  name="fourth">
@@ -193,14 +217,14 @@
 						    style="width: 100%;height: 56vh" ref="tablzcycjl_gxmc"
 						    @row-dblclick="wlpcxxSelectClick">
 						    <el-table-column align="left"  label="流程单号"  width="100"	prop="流程单号" />
-						    <el-table-column align="left"  label="物料编号"  width="100"	prop="物料编号" />
+						    <el-table-column align="left"  label="物料编号"  width="160"	prop="物料编号" />
 						    <el-table-column align="left"  label="物料名称"  width="400"	prop="物料名称"  />
 						    <el-table-column align="left"  label="供方批次"  width="160"	prop="供方批次"  />
-							<el-table-column align="left"  label="工序名称"  width="160"	prop="工序名称"  />
+							<el-table-column align="left"  label="工序名称"  	prop="工序名称"  />
 						  </el-table>
 						  <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
-		共 {{ wlpcxxTotal }} 条记录
-		</div>
+							共 {{ wlpcxxTotal }} 条记录
+						  </div>
 						</el-tab-pane>
 
 						<el-tab-pane label="印版记录"  @click="showTable('印版记录')"  name="fifth">
@@ -221,8 +245,8 @@
 							<el-table-column align="left"  label="用户" 	 width="160"	prop="用户"  />
 						  </el-table>
 						  <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
-		共 {{ ybTotal }} 条记录
-		</div>
+							共 {{ ybTotal }} 条记录
+						   </div>
 						</el-tab-pane>
 	
 				  </el-tabs>
@@ -354,11 +378,175 @@ const defaultProps = {
   label: '流程单',
   children: 'children',
 };
-//全局调用工单编号、印件号
-const _Gd_gdbhlcd = ref(null)
-const _Gd_yjnolcd = ref(null)
-const _GetorderDetail = ref(null)
 
+//全局调用工单编号、印件号(须早于 buildNavParams)
+const _Gd_gdbhlcd = ref(null);
+const _Gd_yjnolcd = ref(null);
+const _GetorderDetail = ref(null);
+
+/** 左侧:GetList 返回年/月/日嵌套时用日期折叠,否则用 el-tree */
+const useDateNav = ref(false);
+const dateTree = ref([]);
+const selectedDate = ref('');
+const selectedMonthKey = ref('');
+const selectedMonthStr = ref('');
+const dateFoldYearOpen = ref({});
+const dateFoldMonthOpen = ref({});
+
+/** 导航:legacy 用 num;day/month 用 Sys_rq */
+const navMode = ref('legacy');
+const navNum = ref(null);
+const navSysRq = ref('');
+
+const isNestedDateList = (data) =>
+  Array.isArray(data) &&
+  data.length > 0 &&
+  data[0] &&
+  typeof data[0] === 'object' &&
+  'year' in data[0];
+
+const isFlatDateOnlyGroup = (y) =>
+  !y.year &&
+  Array.isArray(y.months) &&
+  y.months.length === 1 &&
+  !y.months[0].month;
+
+const monthFoldKey = (yi, mi) => `${yi}-${mi}`;
+const isYearFoldOpen = (yi) => dateFoldYearOpen.value[String(yi)] === true;
+const isMonthFoldOpen = (yi, mi) => dateFoldMonthOpen.value[monthFoldKey(yi, mi)] === true;
+
+const toggleYearFold = (yi) => {
+  const k = String(yi);
+  const cur = isYearFoldOpen(yi);
+  dateFoldYearOpen.value = { ...dateFoldYearOpen.value, [k]: !cur };
+};
+
+const toggleMonthFold = (yi, mi) => {
+  const k = monthFoldKey(yi, mi);
+  const cur = isMonthFoldOpen(yi, mi);
+  dateFoldMonthOpen.value = { ...dateFoldMonthOpen.value, [k]: !cur };
+};
+
+const applyFoldForSelectedDate = (dateStr) => {
+  const yMap = {};
+  const mMap = {};
+  const d = dateStr ? String(dateStr) : '';
+  dateTree.value.forEach((y, yi) => {
+    if (isFlatDateOnlyGroup(y)) return;
+    let yearHas = false;
+    y.months.forEach((m, mi) => {
+      const open = Boolean(d && m.days.includes(d));
+      mMap[monthFoldKey(yi, mi)] = open;
+      if (open) yearHas = true;
+    });
+    yMap[String(yi)] = yearHas;
+  });
+  dateFoldYearOpen.value = yMap;
+  dateFoldMonthOpen.value = mMap;
+};
+
+const applyFoldForMonth = (yi, mi) => {
+  const yMap = {};
+  const mMap = {};
+  dateTree.value.forEach((y, yIdx) => {
+    if (isFlatDateOnlyGroup(y)) return;
+    yMap[String(yIdx)] = yIdx === yi;
+    y.months.forEach((_, mIdx) => {
+      mMap[monthFoldKey(yIdx, mIdx)] = yIdx === yi && mIdx === mi;
+    });
+  });
+  dateFoldYearOpen.value = yMap;
+  dateFoldMonthOpen.value = mMap;
+};
+
+const formatMonthYmDisplay = (monthStr) => {
+  if (!monthStr) return '';
+  const s = String(monthStr);
+  const m = s.match(/^(\d{4})-(\d{2})$/);
+  if (m) return `${m[1]}${m[2]}`;
+  return s;
+};
+
+const formatTodayYMD = () => {
+  const d = new Date();
+  const y = d.getFullYear();
+  const mo = String(d.getMonth() + 1).padStart(2, '0');
+  const day = String(d.getDate()).padStart(2, '0');
+  return `${y}-${mo}-${day}`;
+};
+
+const normalizeDateListPayload = (raw) => {
+  const flatDays = [];
+  const tree = [];
+  if (!raw) return { tree, flatDays };
+  if (Array.isArray(raw) && raw.length > 0 && typeof raw[0] === 'string') {
+    raw.forEach((d) => {
+      if (d) flatDays.push(String(d));
+    });
+    if (flatDays.length) {
+      tree.push({ year: '', months: [{ month: '', days: [...flatDays] }] });
+    }
+    return { tree, flatDays };
+  }
+  if (!Array.isArray(raw)) return { tree, flatDays };
+  for (const yNode of raw) {
+    if (!yNode || typeof yNode !== 'object') continue;
+    const year = String(yNode.year ?? '');
+    const mList = Array.isArray(yNode.children) ? yNode.children : [];
+    const months = [];
+    for (const mNode of mList) {
+      if (!mNode || typeof mNode !== 'object') continue;
+      const month = String(mNode.month ?? '');
+      const dayArr = Array.isArray(mNode.children) ? mNode.children : [];
+      const days = dayArr.map((x) => String(x)).filter(Boolean);
+      days.forEach((x) => flatDays.push(x));
+      if (days.length) months.push({ month, days });
+    }
+    if (months.length) tree.push({ year, months });
+  }
+  return { tree, flatDays };
+};
+
+const buildNavParams = () => {
+  const p = { gdbh: _Gd_gdbhlcd.value, yjno: _Gd_yjnolcd.value };
+  if (navMode.value === 'legacy') {
+    p.num = navNum.value;
+    return p;
+  }
+  p.num = '';
+  if (navSysRq.value) p.Sys_rq = navSysRq.value;
+  return p;
+};
+
+const refreshAllTabs = async () => {
+  await _StaProcessList();
+  await _StaProcessInspection();
+  await _StaProcessAnomaly();
+  await _MaterialsBatch();
+  await _PrintingPlateList();
+};
+
+const selectDate = async (d) => {
+  selectedDate.value = d;
+  selectedMonthKey.value = '';
+  selectedMonthStr.value = '';
+  navMode.value = 'day';
+  navSysRq.value = d;
+  navNum.value = null;
+  applyFoldForSelectedDate(d);
+  await refreshAllTabs();
+};
+
+const selectMonth = async (yi, mi, m) => {
+  selectedDate.value = '';
+  selectedMonthKey.value = monthFoldKey(yi, mi);
+  selectedMonthStr.value = m.month;
+  navMode.value = 'month';
+  navSysRq.value = m.month;
+  navNum.value = null;
+  applyFoldForMonth(yi, mi);
+  await refreshAllTabs();
+};
 
 /*
 	弹窗页面
@@ -372,13 +560,14 @@ const tableRowClicklcd = (row) => {
 
 // 按钮点击逻辑
 const onstatsuclick  = async () => {
-	console.log(currentRow)
+  console.log(currentRow)
   if (!currentRow.value) {
-	ElMessage({
-	  type: "warning",
-	  message: "请先点击选择一行数据",
-	});
-	return;
+    ElMessage({
+      type: "warning",
+      message: "请先点击选择一行数据",
+      duration: 3000, // 停留 X 秒
+    });
+    return;
   }
   await updateCompanyFunclcd(currentRow.value);
 };
@@ -401,48 +590,75 @@ const updateCompanyFunclcd = async (row) => {
 	_StaGetList(row)
 }
 
-//左侧树形节点点击事件
+//左侧树形节点点击事件(旧 el-tree)
 const handleNodeClicklcd = (node) => {
-  _StaProcessList(node['num'])
-  _StaProcessInspection(node['num'])
-  _StaProcessAnomaly(node['num'])
-  _MaterialsBatch(node['num'])
-  _PrintingPlateList(node['num'])
+  navMode.value = 'legacy';
+  navNum.value = node['num'];
+  navSysRq.value = '';
+  refreshAllTabs();
 };
 
 // 获取左侧菜单栏
 const _StaGetList = async (row) => {
-  const StaGetListdata = await StaGetList({gdbh:row['Gd_gdbh'],yjno:row['行号']});
-  console.log(StaGetListdata.msg)
-  
-  if(StaGetListdata.msg === '成功'){
-    treeDatalcd.splice(0, treeDatalcd.length, ...StaGetListdata.data);
-    popdialog.value = true
-    
-    // 使用 nextTick 等待 DOM 更新完成后自动选择第一条
-    await nextTick()
-    
-    // 方法1:直接触发点击事件
-    if (treeDatalcd.length > 0) {
-      // 自动点击第一条数据
-      const firstNode = treeDatalcd[0]
-      // 等待一个微小的延迟确保树已渲染
-      setTimeout(() => {
-        handleNodeClicklcd(firstNode)
-      }, 50)
+  const StaGetListdata = await StaGetList({ gdbh: row['Gd_gdbh'], yjno: row['行号'] });
+  console.log(StaGetListdata.msg);
+
+  if (StaGetListdata.msg === '成功') {
+    const raw0 = StaGetListdata.data;
+    const raw = Array.isArray(raw0) ? raw0 : raw0?.list;
+    if (isNestedDateList(raw)) {
+      useDateNav.value = true;
+      const { tree, flatDays } = normalizeDateListPayload(raw);
+      dateTree.value = tree;
+      treeDatalcd.splice(0, treeDatalcd.length);
+      const todayStr = formatTodayYMD();
+      const pickDay = flatDays.includes(todayStr) ? todayStr : flatDays[0] || '';
+      selectedMonthKey.value = '';
+      selectedMonthStr.value = '';
+      if (pickDay) {
+        selectedDate.value = pickDay;
+        navMode.value = 'day';
+        navSysRq.value = pickDay;
+        navNum.value = null;
+        applyFoldForSelectedDate(pickDay);
+      } else {
+        selectedDate.value = '';
+        navMode.value = 'day';
+        navSysRq.value = '';
+        navNum.value = null;
+        applyFoldForSelectedDate('');
+      }
+      popdialog.value = true;
+      await nextTick();
+      if (pickDay) {
+        await refreshAllTabs();
+      }
+    } else {
+      useDateNav.value = false;
+      dateTree.value = [];
+      const legacy = Array.isArray(raw) ? raw : Array.isArray(raw0) ? raw0 : [];
+      treeDatalcd.splice(0, treeDatalcd.length, ...legacy);
+      popdialog.value = true;
+      await nextTick();
+      if (treeDatalcd.length > 0) {
+        const firstNode = treeDatalcd[0];
+        setTimeout(() => {
+          handleNodeClicklcd(firstNode);
+        }, 50);
+      }
     }
   } else {
-    console.log(StaGetListdata.msg)
-    ElMessage({type: 'warning',message: StaGetListdata.msg})
+    console.log(StaGetListdata.msg);
+    ElMessage({ type: 'warning', message: StaGetListdata.msg });
   }
 };
 
 const lcdtableData = reactive([])
 const lcdTableTotal = ref(0) // 添加总数变量
 
-const _StaProcessList = async (node) => {
+const _StaProcessList = async () => {
   try {
-    const StaProcessListdata = await StaProcessList({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
+    const StaProcessListdata = await StaProcessList(buildNavParams());
     console.log('接口返回数据:', StaProcessListdata)
     if (StaProcessListdata.code === 0) {
       // 正确获取数据数组和总数
@@ -467,9 +683,9 @@ const _StaProcessList = async (node) => {
 const zcjyjltableData = reactive([])
 const zcjyjlTotal = ref(0) // 添加总数变量
 
-const _StaProcessInspection = async (node) => {
+const _StaProcessInspection = async () => {
   try {
-    const StaProcessInspectiondata = await StaProcessInspection({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
+    const StaProcessInspectiondata = await StaProcessInspection(buildNavParams());
     
     
     if (StaProcessInspectiondata.code === 0) {
@@ -493,9 +709,9 @@ const _StaProcessInspection = async (node) => {
 //制程异常记录
 const zcycjltableData = reactive([])
 const zcycjlTotal = ref(0) // 添加总数变量
-const _StaProcessAnomaly = async (node) => {
+const _StaProcessAnomaly = async () => {
   try {
-    const StaProcessAnomalydata = await StaProcessAnomaly({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
+    const StaProcessAnomalydata = await StaProcessAnomaly(buildNavParams());
     console.log('制程异常接口返回:', StaProcessAnomalydata)
     
     if (StaProcessAnomalydata.code === 0) {
@@ -519,9 +735,12 @@ const _StaProcessAnomaly = async (node) => {
 //物料批次信息
 const wlpcxxtableData = reactive([])
 const wlpcxxTotal = ref(0) // 添加总数变量
-const _MaterialsBatch = async (node) => {
+const _MaterialsBatch = async () => {
   try {
-    const MaterialsBatchdata = await MaterialsBatch({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node,cpdh:_GetorderDetail.value['Gd_cpdh']});
+    const MaterialsBatchdata = await MaterialsBatch({
+      ...buildNavParams(),
+      cpdh: _GetorderDetail.value['Gd_cpdh']
+    });
     console.log('物料批次接口返回:', MaterialsBatchdata)
     
     if (MaterialsBatchdata.code === 0) {
@@ -545,17 +764,14 @@ const _MaterialsBatch = async (node) => {
 //印版记录
 const ybtableData = reactive([])
 const ybTotal = ref(0) // 添加总数变量
-const _PrintingPlateList = async (node) => {
+const _PrintingPlateList = async () => {
   try {
-    const PrintingPlateListdata = await PrintingPlateList({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value});
+    const PrintingPlateListdata = await PrintingPlateList(buildNavParams());
     console.log('印版记录接口返回:', PrintingPlateListdata)
     
     if (PrintingPlateListdata.code === 0) {
       const tableData = PrintingPlateListdata.data?.data || []
-      const total = PrintingPlateListdata.data?.total || 
-	  
-	  
-	  0
+      const total = PrintingPlateListdata.data?.total || 0
       ybtableData.splice(0, ybtableData.length, ...tableData)
 	  console.log('印版记录接口返回数据:', ybtableData)
       ybTotal.value = total
@@ -582,7 +798,7 @@ const ontuicclicks = async () => {
   scpconlist.value = false
 };
 
-// 2. 添加 props 定义
+//添加 props 定义
 const props = defineProps({
   defaultSearchValue: {
     type: String,
@@ -596,13 +812,12 @@ watch(() => props.defaultSearchValue, (newVal) => {
     searchInfolcd.value = newVal;
     onSubmitlcd(); // 自动调用搜索方法
   }
-}, { immediate: true }) // immediate: true 表示组件挂载时就执行一次
-
+}, { immediate: true }) 
 
 // 分页
 const OSpage = ref(1)
 const OStotal = ref(0)
-const OSpageSize = ref(15)
+const OSpageSize = ref(20)
 const OShandleCurrentChange = (val) => {
   OSpage.value = val;
   _StaGetOrderList();
@@ -654,6 +869,69 @@ const pd_gdprintonClick = () => {
 		margin: 10px 0;
 	}
 
+	/* 弹窗左侧:年/月/日折叠(沿用 JKWTree 白底,不改变整体风格) */
+	.os-date-dates {
+		font-size: 13px;
+		color: #606266;
+	}
+	.os-date-fold-hd {
+		display: flex;
+		align-items: center;
+		gap: 8px;
+		cursor: pointer;
+		user-select: none;
+		border-radius: 2px;
+		padding: 2px 4px;
+	}
+	.os-date-fold-hd:hover {
+		background: #f0f2f5;
+	}
+	.os-date-caret {
+		display: inline-block;
+		width: 0;
+		height: 0;
+		border-top: 5px solid transparent;
+		border-bottom: 5px solid transparent;
+		border-left: 6px solid #909399;
+		flex-shrink: 0;
+		transition: transform 0.15s ease;
+		transform: rotate(0deg);
+		transform-origin: 40% 50%;
+	}
+	.os-date-caret.is-open {
+		transform: rotate(90deg);
+	}
+	.os-date-fold-body {
+		padding-left: 4px;
+	}
+	.os-date-fold-days {
+		padding-left: 14px;
+	}
+	.os-date-year {
+		font-weight: 700;
+		color: #303133;
+		line-height: 26px;
+	}
+	.os-date-month {
+		font-weight: 600;
+		line-height: 24px;
+		padding-left: 6px;
+	}
+	.os-date-fold-hd.os-date-month.is-current {
+		color: red !important;
+		font-weight: 700;
+	}
+	.os-date-node {
+		line-height: 24px;
+		padding: 2px 4px;
+		cursor: pointer;
+		word-break: break-all;
+	}
+	.os-date-node.is-current {
+		color: red;
+		font-weight: 700;
+	}
+
 	.JKWTree-content {
 		flex: 1;
 	}

+ 2 - 2
src/view/yunyin/shengchanguanli/PrintingPlateRequisition.vue

@@ -6,8 +6,8 @@
             <!--          按钮部分-->
             <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
               <el-form-item>
-                <el-input v-model="searchInfo" placeholder="搜索物料名称" clearable style="width: 200px;margin: 5px"></el-input>
-                <el-button type="primary" class="bt" icon="search" @click="on_search">查询</el-button>
+                <el-input v-model="searchInfo" placeholder="搜索物料名称" clearable style="width: 180px;margin: 5px"></el-input>
+                <el-button type="primary" class="bt" icon="search" @click="on_search">搜索</el-button>
                 <el-button type="primary" class="bt" icon="edit" :disabled="!yblyselectedvalue" @click="onout">领出</el-button>
                 <el-button type="primary" class="bt" icon="document" :disabled="!yblyselectedvalue" @click="onwithdraw">收回</el-button>
                 <!-- <el-button type="primary" class="bt" icon="delete" :disabled="!selectedIds" @click="on_delete">删除</el-button> -->

+ 14 - 22
src/view/yunyin/shengchanguanli/chengpinrucang.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-		  
 		<!-- 左侧树形结构 -->
 		<el-container>
 		  <el-aside width="250px" class="aside-container">
@@ -16,22 +15,18 @@
           <!-- 按钮区域 -->
           <div class="gva-table-box">
             <el-form-item>
-              <el-input v-model="positionvalue" placeholder="输入工单编号或产品名称" style="width: 180px;"/>
-              <el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
-              <el-button type="primary" class="bt" @click="onDel">删除</el-button>
+              <el-input v-model="positionvalue" placeholder="搜索工单编号或产品名称" style="width: 180px;"/>
+              <el-button type="primary" class="search" icon="search" @click="onSearch">搜索</el-button>
+              <el-button type="danger" icon="delete" class="bt" @click="onDel">删除</el-button>
 			  <el-button type="primary" class="bt" @click="onSMB">入仓末板数据统计</el-button>
 			  <el-button type="primary" class="bt" @click="onDay">各日统计</el-button>
 			  <el-button type="primary" class="bt" @click="onAdd">新增</el-button>
-        <el-button type="primary" class="bt" @click="scpconClick" >工单生产批次质量档案查询</el-button>
-			  
+			  <el-button type="primary" class="bt" @click="scpconClick" >工单生产批次质量档案查询</el-button>
               <div style="margin-left: auto;">			
                 <el-button type="primary" class="bt" icon="Download" @click="exportExcel">导出到Excel</el-button>
               </div>
-			  
-			  
-			  
             </el-form-item>
-            <!-- 数据展示 -->
+			
             <el-table ref="multipleTable" height=68vh style="width: 100%" tooltip-effect="dark" :data="tableData" row-key="ID" @row-click="Click"
               highlight-current-row="true" border @selection-change="handleSelectionChange" :show-overflow-tooltip="true" @row-dblclick="doubleClick">
               <el-table-column type="selection" width="45" />
@@ -63,25 +58,22 @@
 			  <el-table-column align="left"  label="修改时间" prop="mod_rq" width="140"/>
 			  <el-table-column align="left"  label="UNIQID" prop="UniqId" width="90"/>
             </el-table>
-            <!-- 分页 -->
             <div class="gva-pagination">
-                  <el-pagination
-                    @size-change="handleSizeChange"
-                    @current-change="handleCurrentChange"
-                    :current-page="page"
-                    :page-size="limit"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="total">
-                  </el-pagination>
-                </div>
+			  <el-pagination
+				@size-change="handleSizeChange"
+				@current-change="handleCurrentChange"
+				:current-page="page"
+				:page-size="limit"
+				layout="total, sizes, prev, pager, next, jumper"
+				:total="total">
+			  </el-pagination>
+			</div>
           </div>
 		  
           <!-- 弹出框 -->
           <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '添加' : '详情'"
             destroy-on-close width="800px">
-            <!-- <el-scrollbar height="500px"> -->
             <el-form :model="formData" label-position="right" label-width="75px" ref="elFormRef" :rules="rule">
-
               <el-row :gutter="24">
 			 <el-col :span="7">
 			   <el-form-item label="入仓类型" prop="id">

+ 2 - 2
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -8,7 +8,7 @@
             <el-form-item>
               <!--按钮-->
               <el-input v-model="searchInfo" placeholder="搜索工单编号"  style="width: 180px;"></el-input>
-              <el-button type="primary" title="搜索" icon="search"  @click="onSubmit"></el-button>
+              <el-button type="primary" title="搜索" icon="search"  @click="onSubmit">搜索</el-button>
               <el-button type="primary" title="设置工单的状态-->【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
 
               <div v-if="treeType === 'customTree'">
@@ -27,7 +27,7 @@
                 <el-button type="primary" title="可【批量设置】所选择的生产任务的生产机台" icon="edit"  @click="onjztzClick" class="bt">机组调整</el-button>
                 <el-button type="primary" title="给担负起那设备做生产任务排程" icon="edit"  @click="oncjsbpcClick" class="bt">车间设备制程排序</el-button>
               </div>
-              <el-button type="primary" title="打印生产工单" icon="edit" @click="pd_gdprintonClick" class="bt">工单打印</el-button>
+              <el-button type="primary" title="打印生产工单" icon="printer" @click="pd_gdprintonClick" class="bt">工单打印</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>
             </el-form-item>

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

@@ -7,10 +7,10 @@
           <el-form ref="elSearchFormRef"  class="demo-form-inline">
             <el-form-item>
               <el-input v-model="searchInfo"  placeholder="搜索工单编号、产品代号" style="width: 180px;" @keyup.enter="handleSearch"></el-input>
-              <el-button type="primary" icon="search" @click="onSubmit" title="搜索"  ></el-button>
+              <el-button type="primary" icon="search" @click="onSubmit" title="搜索">搜索</el-button>
 			  <el-button type="primary" title="设置工单的状态-->【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
 <!--              <el-button type="primary" icon="edit"   @click="ontlssclick"       class="bt" title="按工序投料反馈,试算某产量的投料">U8投料试算</el-button>-->
-              <el-button type="primary" class="bt" icon="edit"  @click="jsfjClick">技术附件</el-button>
+              <el-button type="primary" class="bt" icon="upload"  @click="jsfjClick">技术附件</el-button>
               <el-button type="primary" icon="edit"   @click="onyycpzlclick"     class="bt" title="重新引用 产品资料!">引用产品资料</el-button>
 <!--              <el-button type="primary" icon="edit"   @click="oneditgxclhsclick" class="bt" title="工序产量核算">工序产量核算</el-button>-->
               <el-button type="primary" icon="edit"   @click="oneditgylctzclick" class="bt" title="根据实际生产需要,对工艺流程做调整">工艺流程调整</el-button>
@@ -18,15 +18,15 @@
               <!--<el-button type="primary" icon="edit"   @click="oneditztfwclick"   class="bt" title="初始化中间表更新状态,便于数据重新获取">状态复位</el-button>-->
               <el-button type="primary" icon="edit"   @click="onxzhscsclick"     class="bt" title="修正核算参数">修正核算参数</el-button>
               <el-button type="primary" icon="edit"   @click="onzjfpxsclick"     class="bt" title="批量调整质检废品系数">质检废品系数</el-button>
-              <el-button type="primary" icon="edit"   @click="cp_gdprintonClick" class="bt" title="打印生产工单" >工单打印</el-button>
+              <el-button type="primary" icon="printer"   @click="cp_gdprintonClick" class="bt" title="打印生产工单" >工单打印</el-button>
               <el-button type="primary" icon="edit"   @click="gd_gxclhconClick"  class="bt" title="工序产量核查">工序产量核查</el-button>
               <el-button type="primary" icon="edit"   @click="gdlcdcxconlick"    class="bt" title="流程单查询">流程单查询</el-button>
               <el-button type="primary" icon="edit"   @click="addgd_onclick"   class="bt"   title="新增工单资料">新增工单资料</el-button>
               <el-button type="primary" icon="edit"   @click="addgdyj_onclick"   class="bt" title="新增印件资料">新增印件资料</el-button>
               <el-button type="primary" icon="edit"   @click="addgdgy_onclick"   class="bt" title="新增工艺资料" >新增工艺资料</el-button>
-              <el-button type="primary" icon="edit"   @click="delgdzl_onclick" :disabled="gdSelection === ''"   class="bt" title="工单资料删除" >工单资料删除</el-button>
-              <el-button type="primary" icon="edit"   @click="delgd_delclick"  :disabled="yjSelection === '' && gySelection === ''"  class="bt" title="选择批量删除(印件资料或工艺资料)"  >删除</el-button>
-              <el-button type="primary" icon="edit"   @click="gdtb_onclick"   class="bt" title="工单资料同步" >工单同步</el-button>
+              <el-button type="danger"  icon="delete"   @click="delgdzl_onclick" :disabled="gdSelection === ''"   class="bt" title="工单资料删除" >工单资料删除</el-button>
+              <el-button type="danger"  icon="delete" @click="delgd_delclick"  :disabled="yjSelection === '' && gySelection === ''"  class="bt" title="选择批量删除(印件资料或工艺资料)"  >印件工艺删除</el-button>
+              <el-button type="primary"  @click="gdtb_onclick"   class="bt" title="工单资料同步" >工单同步</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="cpgyfzclick">糊盒工单工艺复制</el-button>
             </el-form-item>
           </el-form>
@@ -60,7 +60,7 @@
             <el-button type="primary" icon="" disabled @click="ontlssclicks" class="bt">投料试算</el-button>
             <el-button type="primary" icon="" disabled @click="onbxgxclicks" class="bt">备选工序</el-button>
             <el-button type="primary" icon="" disabled @click="onsjgxclicks" class="bt">实际工序</el-button>
-            <el-button type="primary" icon="" @click="oncloneclick" style="margin: 5px">退出</el-button>
+            <el-button type="danger" icon="delete" @click="oncloneclick" style="margin: 5px">退出</el-button>
             <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
               <el-form-item class="mab" label="产品代码 :" prop="currentProcess">
                 <el-input v-model="tlssformData['cpdh']" @keyup.enter="tlssgetProductValue" placeholder="" style="width: 200px;"/>
@@ -299,7 +299,7 @@
 
           <!--查改U8工单-->
           <el-dialog v-model="cgugdlist"    title="查改U8工单"   style="width: 100%;height: 100%;margin: 0;padding: 0">
-            <el-button type="primary"  icon=""  @click="oncgugdclickdel" :disabled="multipleSelection.length === 0" style="margin: 0px 0px 20px 0px">删除</el-button>
+            <el-button type="danger"  icon="delete"  @click="oncgugdclickdel" :disabled="multipleSelection.length === 0" style="margin: 0px 0px 20px 0px">删除</el-button>
             <el-button type="primary"  icon="" @click="oncgugdcloneclick" style="margin: 0px 0px 20px 10px">退出</el-button>
             <div>
               <div style="width: 100%; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;margin: 0px 0px 20px 0px">

+ 20 - 6
src/view/yunyin/shengchanguanli/shengchanjincheng.vue

@@ -3,16 +3,16 @@
     <layout>
       <layout-header>
         <div class="">
-          <!--          按钮部分-->
+          <!--按钮部分-->
           <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
             <el-form-item>
-              <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
-              <el-button type="primary" icon="search" @click="onSubmit" style="margin: 5px">查询</el-button>
+              <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 180px;margin: 5px"></el-input>
+              <el-button type="primary" icon="search" @click="onSubmit">搜索</el-button>
 			  <!-- <el-button type="primary" icon="edit"   @click="gd_gxcltjonClick"  class="bt" title="工序产量核查">工序产量统计</el-button> -->
-			  <el-button type="primary" icon="edit"   @click="cp_gdprintonClick" class="bt" title="打印生产工单" >工单打印</el-button>
+			  <el-button type="primary" icon="printer"   @click="cp_gdprintonClick" class="bt" title="打印生产工单" >工单打印</el-button>
 			  <el-button type="primary" title="设置工单的状态-->【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
 			  <el-button type="primary" icon="edit"   @click="gd_gxclhconClick"  class="bt" title="工序产量核查">工序产量核查</el-button>
-        <el-button type="primary" class="bt" icon="download" @click="jcToExcel" >进程导出</el-button>
+			  <el-button type="primary" class="bt" icon="download" @click="jcToExcel" >进程导出</el-button>
             </el-form-item>
           </el-form>
 		  
@@ -80,7 +80,7 @@
         <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
           <div class="JKWTree-tree" style="height: 200px">
             <h3>生产进程查询</h3>
-            <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+            <el-tree :data="treeData"  :props="defaultProps" class="treecolor" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
             </el-tree>
           </div>
         </layout-sider>
@@ -185,6 +185,19 @@ getDepartmentdata();
 const tableData = reactive([]);
 const _code = ref(null);  //左侧菜单编号
 const handleNodeClick = async (node) => {
+	// 取消所有节点的颜色
+	const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
+	allNodes.forEach(node => {
+	  node.querySelector('.el-tree-node__label').style.color = '';
+	});
+	// 获取点击的节点
+	const clickedNodeId = node['$treeNodeId'];
+	const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
+	if (clickedNode) {
+	  // 给当前点击的节点改变颜色
+	  clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
+	}
+	
   let prefixLength = 4; // 默认截取4位
   let prefix = '';
 	if(node.label === '印刷工单'  || node.label === '糊盒工单'){
@@ -743,4 +756,5 @@ const formDataTest = ref({})
 .mab{
   margin-bottom: 5px;
 }
+
 </style>