mao 1 tahun lalu
induk
melakukan
0706af3ce0
2 mengubah file dengan 17 tambahan dan 3 penghapusan
  1. 13 3
      components/dialog-lot/dialog-lot.vue
  2. 4 0
      pages/batchReporting/index.vue

+ 13 - 3
components/dialog-lot/dialog-lot.vue

@@ -1,5 +1,8 @@
 <template>
 	<dialog-base class="dialog-body" ref="baseDialog" title="添加新批次">
+		<view class="prompt">
+			<text>请选择批次再确认</text>
+		</view>
 		<view :class="{'list-container':true, 'selected':isSelected(item)}" @click="handleSelection(item,index)"
 			v-for="(item, index) in form" :key="item.id">
 			<view class="list-title"><text class="label">批次号:{{item.lotCode}}</text></view>
@@ -21,7 +24,7 @@
 			</view>
 		</view>
 		<view class="add-btn-container uni-row">
-			<button type="primary" class="btn" @click="handleConfirm">确认</button>
+			<button type="primary" class="btn" @click="handleConfirm" :disabled="flag">确认</button>
 		</view>
 	</dialog-base>
 </template>
@@ -37,6 +40,7 @@
 	const form = ref({})
 	const emit = defineEmits(['submit'])
 	const selection = ref([])
+	const flag = ref(true)
 
 	const open = (data) => {
 		// console.log(dialog.value)
@@ -51,7 +55,7 @@
 	defineExpose({
 		open
 	})
-
+		
 	function handleScanCode() {
 		uni.scanCode({
 			onlyFromCamera: true,
@@ -77,6 +81,7 @@
 			selection.value.push(item); // 选中
 		}
 		console.log(selection.value, "selection");
+		flag.value = selection.value.length > 0 ? false : true;
 	}
 </script>
 
@@ -88,13 +93,18 @@
 	.dialog-body {
 		overflow: auto;
 		.list-title {
-			margin: 40rpx 0 20rpx 0;
+			margin: 20rpx 0 20rpx 0;
 
 			.label {
 				font-size: 32rpx;
 				font-weight: bold;
 			}
 		}
+		
+		.prompt{
+			color: #999;
+			margin: 8rpx auto 0;
+		}
 
 		.list-container {
 			width: 100%;

+ 4 - 0
pages/batchReporting/index.vue

@@ -50,6 +50,10 @@
 					<text
 						class="label right">{{item.prevProcess && item.nextProcess.length > 0 ? item.nextProcess[0].processAlias : null }}</text>
 				</view>
+				<view class="item-info uni-row">
+					<text class="label">设备</text>
+					<text class="label right">{{ curSubPlan['equipmentName'] }}</text>
+				</view>
 				<view class="status-btn uni-row">
 					<view v-if="item['status'] == 2" class=" uni-row">
 						<button class="turnover-tag" size="mini"