Browse Source

first commit

liuhairui 9 months ago
parent
commit
42c559c634
2 changed files with 22 additions and 7 deletions
  1. 17 3
      src/view/inventory/fabricsummary.vue
  2. 5 4
      src/view/performance/chukubaogong.vue

+ 17 - 3
src/view/inventory/fabricsummary.vue

@@ -3,7 +3,7 @@
     <el-form>
         <el-form-item>
           <el-input v-model="searchInfo" placeholder="搜索订单编号或生产款号" @keyup.enter="handleSearch()" style="width: 180px;" />
-          <el-button type="primary" icon="Search" class="search" @click="handleSearch"  />
+ 		  <el-button type="primary" icon="search" class="search" @click="handleSearch">搜索</el-button>
           <el-button  type="primary" icon="Download" @click="exportToExcel" style="margin: 5px;float: right;">导出库存Excel</el-button>
         </el-form-item>
     </el-form>
@@ -12,14 +12,14 @@
 			<layout-sider :resize-directions="['right']" :width="200" style="margin-right: 10px;">
 				<div class="JKWTree-tree" style="height: 70vh;">
 					<h3>面料库存</h3>
-					<el-tree :data="treeData" highlight-current="true" @node-click="handleNodeClick"  />
+					<el-tree :data="treeData" class="treecolor" highlight-current="true" @node-click="handleNodeClick"  />
 				</div>
 			</layout-sider>
 
       <layout>
         <layout-content>
           <div class="gva-table-box">
-           <el-table ref="multipleTable" style="width: 100%;height: 75vh" tooltip-effect="dark"
+           <el-table ref="multipleTable" style="width: 100%;height: 70vh" tooltip-effect="dark"
                       :row-style="{ height: '40px' }"  :header-cell-style="{ padding: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                       :data="restableData"  border row-key="ID" size="small"  
@@ -252,6 +252,18 @@ const handleNodeClick = async (node, check) => {
 	console.log(nodedata.value);
 	restableData.splice(0, restableData.length);//清空表格
 	
+	// 取消所有节点的颜色
+	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';
+	}
+	
 	//订单信息数据查询【接口】
 	const fabricListdata = await FabricLotList({date:nodedata.value});
 	console.log(fabricListdata)
@@ -352,6 +364,8 @@ const handleSizeChange = (val) => {
   handleSearch();
 };
 </script>
+
+
 <style scoped>
 /* 根据出库状态文字颜色 */
 :deep(.status-plan-usage-low div) {

+ 5 - 4
src/view/performance/chukubaogong.vue

@@ -153,9 +153,10 @@
 		  <el-descriptions class="margin-top" :column="4" :size="size" border>
 			  <el-descriptions-item label="定额用料">{{ mianliaotabData.定额用料 }}</el-descriptions-item>
 			  <el-descriptions-item label="定额门幅">{{ mianliaotabData.定额门幅 }}</el-descriptions-item>
-			  <el-descriptions-item label="实际门幅">
+			  <el-descriptions-item label="实际门幅">{{ mianliaotabData.实际门幅 }}</el-descriptions-item>
+			  <!-- <el-descriptions-item label="实际门幅">
 				<el-input v-model="mianliaotabData.实际门幅" placeholder="" style="margin: 0; width: 100px;"/>
-			  </el-descriptions-item>
+			  </el-descriptions-item> -->
 			  <el-descriptions-item label="出库数量">
 				<el-input v-model="mianliaotabData.出库数量" id='rksl' placeholder="" style="margin: 0; width: 100px;"/>
 			  </el-descriptions-item>
@@ -190,7 +191,7 @@
 				  <!-- <el-table-column  align="left" label="计划门幅" prop="计划门幅" width="90" />	 -->
 				  <el-table-column  align="left" label="定额用料" prop="定额用料" width="90" />	 
 				  <el-table-column  align="left" label="定额门幅" prop="定额门幅" width="90" />
-				  <el-table-column  align="left" label="实际门幅" prop="实际门幅" width="90"/>
+				  <!-- <el-table-column  align="left" label="实际门幅" prop="实际门幅" width="90"/> -->
 				  <el-table-column  align="left" label="出库数量" prop="出库数量" width="90"/>
 				  <!-- <el-table-column  align="left" label="累计出库数量" prop="入仓总数量" width="110"/>
 				  <el-table-column  align="left" label="库存数量" prop="库存数量" width="90"/> -->
@@ -648,7 +649,7 @@
 	  rq: currentDate,
 	  批次号: item['批次号'],
 	  关联编号: item['关联号'],
-	  实际门幅: item['实际门幅'],
+	  // 实际门幅: item['实际门幅'],
 	}));
 	console.log(formattedDataArray);
 	try {