Bladeren bron

fix:首页问题,销售订单明细不定项类型取出库数量

liujt 2 weken geleden
bovenliggende
commit
68f7e193b4
2 gewijzigde bestanden met toevoegingen van 62 en 33 verwijderingen
  1. 1 1
      pages/home/pages/manage/saleOrderDetail.vue
  2. 61 32
      pages/index/index.vue

+ 1 - 1
pages/home/pages/manage/saleOrderDetail.vue

@@ -72,7 +72,7 @@
 								<view class="ellipsis">{{ item.partbName }}</view>
 							</uni-td>
 							<uni-td>
-								<view class="ellipsis">{{ item.productCount }}</view>
+								<view class="ellipsis">{{ item.needProduce == 4 ? item.outboundTotalCount : item.productCount }}</view>
 							</uni-td>
 							<uni-td>
 								<view class="ellipsis">{{ item.payAmount }}</view>

+ 61 - 32
pages/index/index.vue

@@ -210,7 +210,7 @@
 			this.getTree();
 		},
 		onShow() {
-			this.getStatistics();
+			// this.getStatistics();
 			this.$nextTick(() => {
 				this.calculateTopNavHeight();
 			});
@@ -258,6 +258,31 @@
 							this.getStatistics();
 						}, 12000);
 					});
+				
+			},
+			getBrages() {
+				 qualityTodoByPda().then((res) => {
+					console.log(2)
+					this.qmsList.forEach((item) => {
+						if (item.name == "质检工单") item.badge = res.workOrderNum;
+						if (item.name == "我的质检工单")
+							item.badge = res.myWorkOrderNum;
+						if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
+						if (item.name == "我的受托单")
+							item.badge = res.myRequestEntrustNum;
+					});
+					// this.qmsList = f.children;
+				});
+				
+				statistics()
+					.then((res) => {
+						this.workOrder = res;
+						this.operationsList.forEach((item) => {
+							if (item.name == "保养工单") item.badge = res.maintenanceNum;
+							if (item.name == "巡点检工单") item.badge = res.patrolInspection;
+							if (item.name == "维修工单") item.badge = res.repairsNum;
+						});
+					})
 			},
 			getTree() {
 				let _list = uni.getStorageSync("treeList");
@@ -273,18 +298,18 @@
 						if (f.path == "productionManage") {
 							this.productionList = f.children;
 						} else if (f.path == "operationsList") {
-							const promise = statistics().then((res) => {
-								console.log(3)
-								this.workOrder = res;
-								f.children.forEach((item) => {
-									if (item.name == "保养工单") item.badge = res.maintenanceNum;
-									if (item.name == "巡点检工单")
-										item.badge = res.patrolInspection;
-									if (item.name == "维修工单") item.badge = res.repairsNum;
-								});
+							// const promise = statistics().then((res) => {
+								// console.log(3)
+								// this.workOrder = res;
+								// f.children.forEach((item) => {
+								// 	if (item.name == "保养工单") item.badge = res.maintenanceNum;
+								// 	if (item.name == "巡点检工单")
+								// 		item.badge = res.patrolInspection;
+								// 	if (item.name == "维修工单") item.badge = res.repairsNum;
+								// });
 								this.operationsList = f.children;
-							});
-							asyncPromises.push(promise);
+							// });
+							// asyncPromises.push(promise);
 						} else if (f.path == "warehouseManagement") {
 							this.warehousingList = f.children;
 						} else if (f.path == "saleManageList") {
@@ -303,19 +328,19 @@
 						} else if (f.path == "purchasingManage") {
 							this.purchaseManageList = f.children;
 						} else if (f.path == "qualityManage") {
-							const promise = qualityTodoByPda().then((res) => {
-								console.log(2)
-								f.children.forEach((item) => {
-									if (item.name == "质检工单") item.badge = res.workOrderNum;
-									if (item.name == "我的质检工单")
-										item.badge = res.myWorkOrderNum;
-									if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
-									if (item.name == "我的受托单")
-										item.badge = res.myRequestEntrustNum;
-								});
+							// const promise = qualityTodoByPda().then((res) => {
+								// console.log(2)
+								// f.children.forEach((item) => {
+								// 	if (item.name == "质检工单") item.badge = res.workOrderNum;
+								// 	if (item.name == "我的质检工单")
+								// 		item.badge = res.myWorkOrderNum;
+								// 	if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
+								// 	if (item.name == "我的受托单")
+								// 		item.badge = res.myRequestEntrustNum;
+								// });
 								this.qmsList = f.children;
-							});
-							asyncPromises.push(promise);
+							// });
+							// asyncPromises.push(promise);
 						} else if (f.path == "productionControlManagement") {
 							this.pcsList = f.children;
 						} else if (f.path == "dispatchManage") {
@@ -328,14 +353,16 @@
 				}
 
 				// 等待所有异步数据加载完成后再生成导航
-				if (asyncPromises.length > 0) {
-					Promise.all(asyncPromises).then(() => {
-						console.log(1)
-						this.buildNavList();
-					});
-				} else {
-					this.buildNavList();
-				}
+				// if (asyncPromises.length > 0) {
+				// 	// Promise.all(asyncPromises).then(() => {
+				// 		console.log(1)
+				// 		this.buildNavList();
+				// 	// });
+				// } else {
+				this.buildNavList();
+				// }
+				this.getBrages();
+
 			},
 			// 构建导航列表
 			buildNavList() {
@@ -389,6 +416,8 @@
 				this.moduleNavList = Object.entries(navMap)
 					.filter(([key]) => this[key]?.length > 0)
 					.map(([, value]) => value);
+
+				
 			},
 			// 点击导航跳转 - 使用动态获取的顶部高度进行精确定位
 			goToModule(item, index) {