mao 1 жил өмнө
parent
commit
e0a9896b0b

+ 1 - 1
components/dialog-receipt/dialog-receipt.vue

@@ -99,7 +99,7 @@
 		// 		}
 		// 	}
 		// 	curDept.value = res.data[0].deptId;
-			handleGetTurnoverListByDId(store.curDeptDetails);
+			handleGetTurnoverListByDId(store.curDeptDetails.deptId);
 		// })
 	}
 

+ 2 - 2
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -112,7 +112,7 @@
 	function init() {
 		getProcessList({
 			// tenantId: store.tenantId,
-			deptId: store.curDeptDetails
+			deptId: store.curDeptDetails.deptId
 		}).then(res => {
 			console.log(res)
 			if (res.code == 200) {
@@ -127,7 +127,7 @@
 			}
 		})
 		
-		Promise.all([getEquipmentByUidAndDid(store.userInfo.userId, store.curDeptDetails), getDayWorkItemList({
+		Promise.all([getEquipmentByUidAndDid(store.userInfo.userId, store.curDeptDetails.deptId), getDayWorkItemList({
 			userId: store.userInfo.userId,
 			dayworkId: store.dayworkInfo.id,
 			status: 1

+ 1 - 1
pages/batchReporting/index.vue

@@ -176,7 +176,7 @@
 		});
 		let reqData = {
 			productionPlanDetailId: id,
-			deptId: store.curDeptDetails
+			deptId: store.curDeptDetails.deptId
 		};
 
 		getDayWorkList(reqData).then(res => {

+ 3 - 3
pages/dashboard/index.vue

@@ -123,7 +123,7 @@
 					if(res.data[i].tenantId == tenantId){
 						userDeptsByTenantId.value[i] = {
 							text: res.data[i].deptName,
-							value: res.data[i].deptId
+							value: res.data[i]
 						}
 					}
 				}
@@ -131,7 +131,7 @@
 
 				// 选择工段来个默认值
 				if(res.data.length > 0){
-					curSelectedDept.value = res.data[0].deptId;
+					curSelectedDept.value = res.data[0];
 				}
 				store.curDeptDetails = curSelectedDept.value;
 			}
@@ -145,7 +145,7 @@
 		for (var i = 0; i < newArr.length; i++) {
 			userDeptsByTenantId.value[i] = {
 				text: newArr[i].deptName,
-				value: newArr[i].deptId
+				value: newArr[i]
 			}
 		}
 		if(userDeptsByTenantId.value.length == 0){

+ 4 - 3
pages/productionPlan/index.vue

@@ -69,9 +69,9 @@
 	const initReqParam = ref({})
 
 	onLoad(() => {
-		console.log(store.curDeptDetails)
+		console.log(store.curDeptDetails.deptId)
 		initReqParam.value = {
-			deptId: store.curDeptDetails
+			deptId: store.curDeptDetails.deptId
 		}
 		init(initReqParam.value);
 		// dayworkItem数据更改后刷新数据
@@ -79,6 +79,7 @@
 	})
 
 	onUnload(() => {
+		console.log(store.curDeptDetails)
 		// uni.$off('dayworkItemUpdate', reflush)
 	})
 
@@ -101,7 +102,7 @@
 			title: '加载中'
 		});
 		getPlanDetailsList({
-			deptId: Number(store.curDeptDetails)
+			deptId: Number(store.curDeptDetails.deptId)
 		}).then(res => {
 			if(res.code == 200){
 				listData.value = res.data;

+ 5 - 1
pages/reportingForWork/index.vue

@@ -212,7 +212,9 @@
 				productionPlanId: curPlan.value.productionPlanId,
 				productionPlanDetailId: curPlan.value.id,
 				technologicalProcessId: curPlan.value.technologicalProcessId,
-				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum']
+				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
+				deptId: store.curDeptDetails.deptId,
+				deptName: store.curDeptDetails.deptName
 			}
 		} else {
 			// equipmentList.value = data;
@@ -225,6 +227,8 @@
 				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
 				status: 1,
 				startTime: timestampToTime(new Date()),
+				deptId: store.curDeptDetails.deptId,
+				deptName: store.curDeptDetails.deptName, 
 				...data
 			}
 			reqParam.value = dayWorkItem.value;

+ 1 - 1
store/index.js

@@ -7,5 +7,5 @@ export const store = reactive({
   dayworkInfo: null,
   userProcessInfo: null,
   tenantId: null,
-  curDeptDetails: null
+  curDeptDetails: null,
 })