Răsfoiți Sursa

Merge remote-tracking branch 'origin/master'

wangxin 1 an în urmă
părinte
comite
12e89f0e8c

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

@@ -14,7 +14,7 @@
 				<view class="list-container-item uni-row"
 					style="border-top: 1px solid #e1e1e1;border-radius: 8rpx 8rpx 0 0;">
 					<text class="label">产品描述</text>
-					<text class="label value" >{{item['productDescription']}}</text>
+					<text class="label value" style="word-wrap: break-word;">{{item['productDescription']}}</text>
 				</view>
 				<view class="list-container-item uni-row">
 					<text class="label">关联箱号</text>

+ 9 - 12
pages/addNewBatch/index.vue

@@ -209,10 +209,8 @@
 					batchNoList.value = [res.rows[0]];
 					dayWork.value.lotId = batchNoList.value[0].id;
 					dayWork.value.lotCode = batchNoList.value[0].lotCode;
-					if (dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId) {
 						dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
 						store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
-					}
 					getProcessInfo(batchNoList.value[0])
 					getFurnaceInfo(batchNoList.value[0])
 				} else {
@@ -237,10 +235,8 @@
 					}
 					dayWork.value.lotId = batchNoList.value[0].id;
 					dayWork.value.lotCode = batchNoList.value[0].lotCode;
-					if (dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId) {
 						dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
 						store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
-					}
 					getProcessInfo(batchNoList.value[0])
 					//提示当前批次是废品回用
 					if (batchNoList.value[0].isAmend == 1) {
@@ -301,7 +297,6 @@
 				header,
 				sslVerify: false,
 				success: (res) => {
-					console.log(res.data);
 					if (res.data.code == 200 && res.data.data.length > 0) {
 						for (let i = 0; i < res.data.data.length; i++) {
 							furnaceNumberInfoList.value[i] = {
@@ -321,10 +316,10 @@
 		} else {
 			isWasteRecyclingFlag.value = false
 			furnaceInfo.value.furnaceNumber = "废品回用"
+			furnaceInfo.value.firstTechnicalRequirement = "废品回用"
 			dayWork.value.furnaceNoInfo = furnaceInfo.value
 			basicInfo.value = dayWork.value.furnaceNoInfo
 		}
-		console.log(basicInfo.value)
 	}
 
 	function iconClick() {
@@ -337,9 +332,10 @@
 			for (let i = 0; i < lotList.value.length; i++) {
 				if (lotList.value[i].lotCode == lotCode) {
 					batchNoList.value = [lotList.value[i]];
-					console.log(batchNoList.value)
 					dayWork.value.lotId = lotList.value[i].id;
 					dayWork.value.lotCode = lotList.value[i].lotCode;
+					dayWork.value.technologicalProcessId = lotList.value[i].technologicalProcessId;
+					store.planDetails.technologicalProcessId = lotList.value[i].technologicalProcessId;
 					if (batchNoList.value[0].isWasteRecycling == 1) {
 						isWasteRecyclingFlag.value = false
 						uni.showToast({
@@ -380,7 +376,6 @@
 			}).then(res => {
 				if (res.rows.length > 0) {
 					var abNormaLotCode = res.rows.map(obj => obj.lotCode)
-					console.log(abNormaLotCode.includes(lotCode))
 					if (abNormaLotCode.includes(lotCode)) {
 						uni.showToast({
 							icon: "none",
@@ -444,11 +439,14 @@
 							.technologicalProcessDetailId : v.id,
 						processId: v.processId,
 						processStepNumber: v.processStepNumber,
-						index: index
+						index: index,
+						technologicalProcessId:v.technologicalProcessId ? v
+							.technologicalProcessId : v.lotTechnologicalProcessId
+
 					}))
-					console.log(processList.value)
 					selectedProcess.value = processList.value[0].value;
 					dayWork.value.processId = processList.value[0].processId;
+					dayWork.value.technologicalProcessId = processList.value[0].technologicalProcessId
 					dayWork.value.technologicalProcessDetailId = selectedProcess.value
 					dayWork.value.processStepNumber = processList.value.findIndex(v => v.value ===
 							selectedProcess.value) >= 0 ?
@@ -580,7 +578,6 @@
 			})
 			return;
 		}
-		console.log(basicInfo.value)
 		if (dayWork.value.furnaceNoInfo == null) {
 			uni.showToast({
 				icon: 'none',
@@ -590,7 +587,7 @@
 		}
 		dayWork.value.isWasteRecycling = batchNoList.value[0].isWasteRecycling
 		dayWork.value.isAmend = batchNoList.value[0].isAmend
-
+		dayWork.value.fromId = batchNoList.value[0].fromId
 		store.furnaceNumberInfo = basicInfo.value;
 		if (checkLotCode(dayWork.value.lotCode)) {
 			saveDayWork(dayWork.value).then(res => {

+ 15 - 5
pages/sortBatchReporting/index.vue

@@ -178,7 +178,6 @@
 
 	onLoad(() => {
 		curPlan.value = store.planDetails;
-		normalStatus.value = 0
 		console.log(curPlan.value)
 		//废品回用的领料部门如果是当前工段,也要可以开始新批次
 		//查找当前计划单下的批次废品回用是当前工段
@@ -245,13 +244,22 @@
 			deptId: store.curDeptDetails.deptId,
 			keywords: keywords.value
 		};
-
+		// normalStatus.value = true;
 		getDayWorkList(reqData).then(res => {
 			if (res.code == 200) {
 				tempList.value = res.data
-				listData.value = res.data.filter(item => {
-					return item.isWasteRecycling == 0 && item.isAmend == 0;
-				});
+				if (normalStatus.value) {
+					listData.value = res.data.filter(item => {
+						return item.isWasteRecycling == 0 && item.isAmend == 0;
+					});
+				} else {
+					listData.value = res.data.filter(item => {
+						return item.isWasteRecycling == 1 || item.isAmend == 1;
+					})
+				}
+				// listData.value = res.data.filter(item => {
+				// 	return item.isWasteRecycling == 0 && item.isAmend == 0;
+				// });
 				for (let i = 0; i < listData.value.length; i++) {
 					if (listData.value[i].prevProcess) {
 						let sum = 0;
@@ -463,6 +471,8 @@
 			});
 			normalStatus.value = true
 		}
+		
+		console.log(listData.value)
 	}
 	
 	function handleCancelTurnover(data) {

+ 1 - 1
pages/sorting/form.vue

@@ -65,7 +65,7 @@
 					v-model="dayworkItem.qualifiedNum" />
 				<span v-else>{{ dayworkItem.qualifiedNum }}</span>
 				<view class="label" style="text-align: right; padding-right: 24rpx">废品量</view>
-				<input v-if="Number(dayworkItem.status) < 3" type="number" placeholder="请输入废品量"
+				<input v-if="Number(dayworkItem.status) < 3" :disabled="true" type="number" placeholder="请输入废品量"
 					v-model="dayworkItem.rejectNum" />
 				<span v-else>{{ dayworkItem.rejectNum }}</span>
 			</view>