mao vor 1 Jahr
Ursprung
Commit
991bfe6112
3 geänderte Dateien mit 79 neuen und 30 gelöschten Zeilen
  1. 66 25
      components/dialog-end-work/dialog-end-work.vue
  2. 2 2
      manifest.json
  3. 11 3
      pages/dashboard/index.vue

+ 66 - 25
components/dialog-end-work/dialog-end-work.vue

@@ -12,7 +12,8 @@
 						@click="handleAddWasteInfo">+添加</text></view>
 			</view>
 			<view class="list-title uni-row" v-for="(item, index) in wasteInfo">
-				<input class="input" @input="handleInputRejectNum" style="width: 20%;" v-model="item.rejectNum" placeholder="废品量" />
+				<input class="input" @input="handleInputRejectNum" style="width: 20%;" v-model="item.rejectNum"
+					placeholder="废品量" />
 				<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="item.reason" :localdata="reasonList"
 					@change="handleTenantChange"></uni-data-select>
 
@@ -20,13 +21,22 @@
 					@click="handleDeleteWasteInfo(index)"></uni-icons>
 			</view>
 
-			<view class="list-title uni-row" style="margin-top: 48rpx;">
+			<view class="list-title uni-row">
 				<text class="label">当前序是否完成</text><text>否</text>
 				<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
 				<text>是</text>
 			</view>
+			<view v-if="showCarrierList" class="confirmCarrier">
+				<text class="label">确认载具</text>
+				<view class="vehicleList uni-row">
+					<view class="vehicleNo uni-row" v-for="(item,index) in bindList">
+						<text>{{item.carrierCode}}</text>
+					</view>
+				</view>
+			</view>
 		</view>
 		<view class="add-btn-container uni-row">
+			<button v-if="showCarrierList" type="primary" class="btnScan" @click="handleFinishReporting">扫码确认载具</button>
 			<button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
 		</view>
 	</dialog-base>
@@ -45,6 +55,12 @@
 		updateDayWorkItem,
 		saveDayWorkItem
 	} from "@/api/business/dayWorkItem.js"
+	import {
+		getDayworkCarrierList
+	} from '@/api/business/dayworkCarrier.js'
+	import {
+		store
+	} from '@/store/index.js'
 	import {
 		timestampToTime,
 		toHHmmss
@@ -57,6 +73,8 @@
 	const wasteInfo = ref([])
 	const reasonList = ref([])
 	const emit = defineEmits(['reset'])
+	const showCarrierList = ref(false) // 工序是否完成显示载具列表
+	const bindList = ref([])
 
 	onLoad(() => {
 		init();
@@ -73,6 +91,15 @@
 			console.log(res);
 			console.log(reasonList.value);
 		})
+		getDayworkCarrierList({
+			dayworkId: store.dayworkInfo.id,
+			isChanged: 0
+		}).then(res => {
+			console.log(res)
+			if (res.code == 200) {
+				bindList.value = res.rows;
+			}
+		})
 	}
 
 	function open(data) {
@@ -92,9 +119,11 @@
 	function switchChange(event) {
 		if (event.detail.value) {
 			workInfo.value.status = "3"
-		}else{
+		} else {
 			workInfo.value.status = "2"
 		}
+		showCarrierList.value = event.detail.value;
+
 	}
 
 	function handleInputQualifiedNum() {
@@ -108,7 +137,7 @@
 	}
 
 	function handleFinishReporting() {
-		if(!workInfo.value.qualifiedNum){
+		if (!workInfo.value.qualifiedNum) {
 			uni.showToast({
 				icon: "error",
 				title: "请输入合格数",
@@ -117,8 +146,8 @@
 		}
 		for (let i = 0; i < wasteInfo.value.length; i++) {
 			if ((!wasteInfo.value[i].rejectNum && wasteInfo.value[i].reason) ||
-			 (wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) || 
-			 (!wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason)) {
+				(wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) ||
+				(!wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason)) {
 				uni.showToast({
 					icon: "error",
 					title: "请输入废弃数或废弃原因",
@@ -211,36 +240,48 @@
 				transform: scale(0.7);
 			}
 
-			.equipment-container {
-				width: 100%;
-				height: 120rpx;
-				flex-wrap: wrap;
-				justify-content: flex-start;
-				overflow: auto;
-
-				.checkbox {
-					padding: 12rpx 0;
-					justify-content: center;
-					align-items: center;
+			.confirmCarrier {
+				
+				.vehicleList {
+					justify-content: baseline;
+					align-content: flex-start;
+					flex-wrap: wrap;
+					width: 100%;
+					height: 120rpx;
+					overflow: auto;
+
+					.vehicleNo {
+						padding: 0 10rpx;
+						margin: 10rpx 20rpx 0 0;
+						justify-content: space-between;
+						align-items: center;
+						width: auto;
+						height: 60rpx;
+						border: 1px solid rgba(213, 213, 213, 1);
+						border-radius: 6rpx;
+					}
 				}
 			}
 
-			.table-item {
-				margin-top: 24rpx;
-
-
-			}
-
 		}
 
 		.add-btn-container {
 			margin-top: 32rpx;
-
+			
+			
 			.btn {
 				flex: 1;
 				background-color: rgba(255, 85, 85, 1);
 				color: #FFFFFF;
-
+				margin-left: 5rpx;
+				padding: 0;
+			}
+			
+			.btnScan {
+				flex: 1;
+				color: #FFFFFF;
+				margin-right: 5rpx;
+				padding: 0;
 			}
 		}
 	}

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "德迈仕数字生产管理平台",
     "appid" : "__UNI__B065984",
     "description" : "",
-    "versionName" : "v0.0.1",
-    "versionCode" : "100",
+    "versionName" : "1.0.1",
+    "versionCode" : 100,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 11 - 3
pages/dashboard/index.vue

@@ -16,7 +16,12 @@
 			</view>
 		</view>
 		<view class="user-info uni-column" style="margin: 0 20rpx 20rpx 20rpx;width: 94%;">
-			<uni-section title="当前厂别" type="line">
+			<uni-section title="当前厂别" type="square">
+				<uni-data-select v-model="userInfo.tenantId" :localdata="tenantList" 
+					:clear="false"
+					@change="handleTenantChange"></uni-data-select>
+			</uni-section>
+			<uni-section title="当前工段" type="square">
 				<uni-data-select v-model="userInfo.tenantId" :localdata="tenantList" 
 					:clear="false"
 					@change="handleTenantChange"></uni-data-select>
@@ -26,7 +31,7 @@
 		<view class="business-btn uni-row" @click="handleToProductionPlan"><text class="label">报工</text></view>
 		<view class="business-btn uni-row" @click="handleToHandlingList"><text class="label">周转</text></view>
 		<view class="bottom-btn-container">
-			<view class="start-batch-btn uni-row" @click="handleToEquiPmentList"><text class="label">绑定设备</text></view>
+			<!-- <view class="start-batch-btn uni-row" @click="handleToEquiPmentList"><text class="label">绑定设备</text></view> -->
 			<view class="start-batch-btn uni-row" @click="handleSwitchOrQuit"><text class="label">切换 / 退出账号</text>
 			</view>
 		</view>
@@ -49,6 +54,9 @@
 		getTenantList,
 		getDeptName
 	} from '@/api/login/index.js'
+	import {
+		getDeptList
+	} from '@/api/dept/dept.js'
 	import {
 		store
 	} from '@/store/index.js'
@@ -131,7 +139,7 @@
 
 	function handleTenantChange() {
 		store.tenantId = userInfo.value.tenantId
-		console.log(store.tenantId)
+	
 	}
 </script>