mao 1 jaar geleden
bovenliggende
commit
e5dc8a73bd
2 gewijzigde bestanden met toevoegingen van 60 en 40 verwijderingen
  1. 3 1
      components/dialog-selectEquipment/dialog-selectEquipment.vue
  2. 57 39
      pages/addNewBatch/index.vue

+ 3 - 1
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -106,7 +106,9 @@
 		flag.value = false;
 		userName.value = null;
 		userList.value = [];
-		selectedUserList.value = [];
+		selectedUserList.value = []; 
+		selectedProcess.value = null;
+		processList.value = [];
 	}
 
 	function init() {

+ 57 - 39
pages/addNewBatch/index.vue

@@ -18,9 +18,9 @@
 						<text>扫码修正批次</text>
 					</view>
 				</view>
-			</view>
+			</view>segment
 			<view class='middle'>
-				<view class='segment'></view>
+				<view class=''></view>
 				<uni-icons type="link" size="30" style="margin: 10rpx;  transform: rotate(135deg);"></uni-icons>
 				<view class='segment'></view>
 			</view>
@@ -47,9 +47,8 @@
 				<text class='title' style="margin-bottom: 50rpx;">基础信息</text>
 				<view class="uni-row info">
 					<label for="HeatNo">炉号:</label>
-					<select id="incomingInfo" class="uni-input data-select" v-model="basicInfo.heatNo">
-						<option class="data-select-options" v-for="(item,index) in range">{{item.text}}</option>
-					</select>
+					<uni-data-select id="incomingInfo" class="uni-input data-select" v-model="basicInfo" :localdata="furnaceNumberInfoList" :clear="false"
+						@change="handleFurnaceNumberChange"></uni-data-select>
 					<!-- <input id="HeatNo" class="uni-input" v-model="basicInfo.heatNo" placeholder="请填写" /> -->
 					<!-- <text id="HeatNo" class="uni-input">{{basicInfo.heatNo}}</text> -->
 				</view>
@@ -57,19 +56,19 @@
 				<view class="uni-row info">
 					<label for="manufacturer">厂家:</label>
 					<!-- <input id="manufacturer" class="uni-input" v-model="basicInfo.manufacturer" placeholder="请填写" /> -->
-					<text id="manufacturer" class="uni-input">{{basicInfo.manufacturer}}</text>
+					<text id="manufacturer" class="uni-input">{{basicInfo.factory}}</text>
 				</view>
 				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
 				<view class="uni-row info">
 					<label for="incomingInfo">来料日期:</label>
 					<!-- <input id="incomingInfo" class="uni-input" v-model="basicInfo.incomingInfo" placeholder="请填写" /> -->
-					<text id="incomingInfo" class="uni-input">{{basicInfo.incomingInfo}}</text>
+					<text id="incomingInfo" class="uni-input">{{basicInfo.incomingDate}}</text>
 				</view>
 				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
 				<view class="uni-row info">
 					<label for="incomingInfo">材质:</label>
 					<!-- <input id="incomingInfo" class="uni-input" v-model="basicInfo.incomingInfo" placeholder="请填写" /> -->
-					<text id="incomingInfo" class="uni-input">{{basicInfo.materia}}</text>
+					<text id="incomingInfo" class="material uni-input">{{basicInfo.firstTechnicalRequirement}}{{basicInfo.secondTechnicalRequirement || basicInfo.secondTechnicalRequirement != '' ? basicInfo.secondTechnicalRequirement : ''}}</text>
 				</view>
 				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
 			</view>
@@ -100,32 +99,20 @@
 		getCarrierById,
 		checkCarrier
 	} from '@/api/business/carrier.js'
-	import { getFurnaceNoInfo } from '@/api/p2/furnaceNoInfo.js'
+	import {
+		getFurnaceNoInfo
+	} from '@/api/p2/furnaceNoInfo.js'
+	import {
+		getToken
+	} from '@/utils/auth'
 
 	const batchNoCheck = ref(null) // 批次号是否选中
 	const batchNoList = ref([]) // 批次号列表
 	const vehicleList = ref([])
-	const basicInfo = ref({ // 基础信息对象
-		heatNo: 'cs222',
-		manufacturer: 'DMS',
-		incomingInfo: 'L123456',
-		materia: 'dx1111'
-	})
+	const basicInfo = ref({}) // 基础信息对象
 	const dayWork = ref({})
 	const curPlan = ref({})
-	const range = ref([{
-			value: 0,
-			text: "LNO001"
-		},
-		{
-			value: 1,
-			text: "LNO002"
-		},
-		{
-			value: 2,
-			text: "LNO003"
-		},
-	])
+	const furnaceNumberInfoList = ref([])
 	const emit = defineEmits(['batchReporting-addBatch']);
 	const inpValue = ref('')
 	const lotList = ref([])
@@ -156,11 +143,36 @@
 				batchNoList.value = res.rows;
 			}
 		})
-		getFurnaceNoInfo({
-			productionPlanNo: store.planDetails.productionPlanNo,
-			lineNumber: store.planDetails.lineNumber
-		}).then(res => {
-			console.log(res)
+
+		// 拉取炉号信息from p2
+		let token = 'Bearer ' + getToken();
+		let header = {
+			Authorization: token
+		}
+		uni.request({
+			url: 'http://120.46.159.163:7002/business/furnaceNoInfo/getFurnaceNoInfo',
+			data: {
+				productionPlanNo: store.planDetails.productionPlanNo,
+				lineNumber: store.planDetails.lineNumber
+			},
+			method: 'GET',
+			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] = {
+							text: res.data.data[i].factory,
+							value: res.data.data[i]
+						} 
+					}
+					
+					basicInfo.value = res.data.data[0];
+					console.log(basicInfo.value);
+					console.log(furnaceNumberInfoList.value)
+				}
+			}
 		})
 	}
 
@@ -246,7 +258,9 @@
 		);
 	}
 
-
+	function handleFurnaceNumberChange(){
+		
+	}
 
 	// function handleScanCode() {
 	// 	uni.scanCode({
@@ -315,12 +329,12 @@
 					});
 				}
 			})
-		}else{
+		} else {
 			uni.showToast({
 				icon: "none",
 				title: "该批次号已被使用或不属于该产品",
 				duration: 2000
-			}) 
+			})
 		}
 	}
 </script>
@@ -452,15 +466,14 @@
 	}
 
 	.info {
-		width: 100%;
+		width: 96%;
 		justify-content: space-around;
 		align-items: center;
 
 		label {
 			flex: 1;
 			text-combine-upright: all;
-			margin: 0 30rpx;
-
+			margin: 0 20rpx 0 30rpx;
 		}
 
 		text {
@@ -481,4 +494,9 @@
 			}
 		}
 	}
+	
+	.material {
+		height: auto;
+		width: 60%;
+	}
 </style>