mao 1 år sedan
förälder
incheckning
6c80dd0326

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

@@ -32,7 +32,7 @@
 		visible.value = true
 	}
 
-	const close = () => {
+	function close() {
 		visible.value = false
 	}
 

+ 47 - 13
components/dialog-end-work/dialog-end-work.vue

@@ -29,8 +29,8 @@
 			<view v-if="showCarrierList" class="confirmCarrier">
 				<text class="label">确认载具</text>
 				<view class="vehicleList uni-row">
-					<view v-for="(item,index) in bindList"
-						:class="{ 'vehicleNo': true, 'uni-row': true, 'blueBorder': handleConfirmCarrier(item) }">
+					<view v-for="(item,index) in bindList" :key="index"
+						:class="{ 'vehicleNo': true, 'uni-row': true, 'blueBorder': item.flag }">
 						<text>{{item.carrierCode}}</text>
 					</view>
 				</view>
@@ -77,10 +77,21 @@
 	const showCarrierList = ref(false) // 工序是否完成显示载具列表
 	const bindList = ref([])
 	const confirmCarrierList = ref([])
-
+	const endFlag = ref(0)
+	
 	onLoad(() => {
-		init();
+		
 	})
+	
+	function resetPage(){
+		workInfo.value = {};
+		wasteInfo.value = [];
+		reasonList.value = [];
+		showCarrierList.value = false;
+		bindList.value = [];
+		confirmCarrierList.value = [];
+		endFlag.value = 0;
+	}
 
 	function init() {
 		getDictInfoByType("waste_causes").then(res => {
@@ -100,18 +111,23 @@
 			console.log(res)
 			if (res.code == 200) {
 				bindList.value = res.rows;
+				for (let i = 0; i < bindList.value.length; i++) {
+					bindList.value[i].flag = false;
+				}
 				console.log(bindList.value)
 			}
 		})
 	}
 
 	function open(data) {
+		resetPage();
 		workInfo.value = {
 			...data
 		};
 		workInfo.value.qualifiedNum = null;
 		console.log(data)
 		wasteInfo.value = []
+		init();
 		baseDialog.value.open()
 	}
 
@@ -146,19 +162,36 @@
 			autoZoom: false,
 			success: function(res) {
 				let vehicleObj = JSON.parse(res.result);
-				confirmCarrierList.value.push(vehicleObj.carrierCode)
+				for (let i = 0; i < bindList.value.length; i++) {
+					if(vehicleObj.carrierCode == bindList.value[i].carrierCode){
+						if(!bindList.value[i].flag){
+							endFlag.value += 1;
+						}
+						bindList.value[i].flag = true;
+					}
+				}
 			}
 		});
 	}
 
-	function handleConfirmCarrier(item) {
-		let flag = false;
-		console.log(confirmCarrierList.value.indexOf(item.carrierCode) !== -1)
-		flag = confirmCarrierList.value.indexOf(item.carrierCode) !== -1
-		return flag
-	}
 
 	function handleFinishReporting() {
+		if(showCarrierList.value){
+			if(endFlag.value >= bindList.value.length){
+				handleSave();
+			}else{
+				uni.showToast({
+					icon: "none",
+					title: "请先扫码确认载具"
+				})
+				return;
+			}
+		}else{
+			handleSave();
+		}
+	}
+	
+	function handleSave(){
 		if (!workInfo.value.qualifiedNum) {
 			uni.showToast({
 				icon: "error",
@@ -284,11 +317,12 @@
 						align-items: center;
 						width: auto;
 						height: 60rpx;
-						border: 1rpx solid rgba(213, 213, 213, 1);
+						border: 2rpx solid rgba(213, 213, 213, 1);
 						border-radius: 6rpx;
 					}
 					.blueBorder {
-						border: 2rpx solid #1684fc;
+						background-color: #1684fc;
+						color: #FFFFFF;
 					}
 					
 				}

+ 41 - 103
components/dialog-receipt/dialog-receipt.vue

@@ -1,13 +1,13 @@
 <template>
-	<dialog-base ref="baseDialog" title="放位置">
+	<dialog-base ref="baseDialog" title="放位置">
 		<view class="list-container">
-			<view class="" style="margin: 0 20rpx 20rpx 0;width: 88%;">
+<!-- 			<view class="" style="margin: 0 20rpx 20rpx 0;width: 88%;">
 				<uni-section title="请选择工段" title-font-size="32rpx" style="margin: 0 0 0 -16rpx;">
-					<uni-data-select v-model="curDayworkItem.deptId" :localdata="deptList" @change="handleChange"
+					<uni-data-select v-model="curDept" :localdata="deptList" @change="handleChange"
 					:clear="false"
 						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
 				</uni-section>
-			</view>
+			</view> -->
 			<view class="list-title">
 				<text class="label">请选择您存放位置</text>
 			</view>
@@ -54,28 +54,30 @@
 
 	const baseDialog = ref(null) 
 	const turnoverDoorChecked = ref({})
-	const turnoverType = ref([])
 	const turnoverArea = ref([])
-	const curDayworkItem = ref({
-		turnoverType: 1
-	})
-	const dayworkInfo = ref(null)
+	const curDept = ref(0)
 	const deptList = ref([]) // 工段列表
 	const turnAreaList = ref([]) // 周转区列表
-	// const emit = defineEmits('confirm') // 自定义调用父组件方法
+	const placement = ref(null)
+	const emit = defineEmits(['submit']);
 
 	onLoad(() => {
 
 	})
 
-	function open(data) {
-		deptList.value = [];
-		turnAreaList.value = [];
-		dayworkInfo.value = data;
+	function open() {
+		resetPage();
 		baseDialog.value.open();
 		init();
 	}
-
+ 
+	function resetPage(){
+		deptList.value = [];
+		turnAreaList.value = [];
+		curDept.value = 0;
+		placement.value = null;
+	}	
+	
 	defineExpose({
 		open
 	})
@@ -86,106 +88,42 @@
 	}
 
 	function init() {
-		getDictInfoByType('daywork_turnover_type').then(res => {
-			turnoverType.value = res.data;
-			getDictInfoByType('workshop_turnover_area').then(res => {
-				turnoverArea.value = res.data;
-			})
-		})
-		getDayWorkItemList({
-			dayworkId: dayworkInfo.value.id,
-			userId: store.userInfo.userId
-		}).then(res => {
-			console.log(res.rows[0])
-			curDayworkItem.value = {
-				...res.rows[0],
-				turnoverType: 1
-			};
-		})
-		getDeptList({
-			isWorkSection: 1,
-			tenantId: store.tenantId
-		}).then(res => {
-			console.log(res.data)
-			for (var i = 0; i < res.data.length; i++) {
-				deptList.value[i] = {
-					text: res.data[i].deptName,
-					value: res.data[i].deptId,
-					data: res.data[i]
-				}
-			}
-		})
+		// getDeptList({
+		// 	isWorkSection: 1,
+		// 	tenantId: store.tenantId
+		// }).then(res => {
+		// 	for (var i = 0; i < res.data.length; i++) {
+		// 		deptList.value[i] = {
+		// 			text: res.data[i].deptName,
+		// 			value: res.data[i].deptId,
+		// 		}
+		// 	}
+		// 	curDept.value = res.data[0].deptId;
+			handleGetTurnoverListByDId(store.curDeptDetails);
+		// })
 	}
 
-	function selectTurnoverType(item) {
-		curDayworkItem.value.turnoverType = item.dictValue;
-	}
 
 	function selectTurnoverDoor(item) {
 		turnoverDoorChecked.value = item;
-		curDayworkItem.value.turnoverArea = item.dictValue;
+		placement.value = item;
+		console.log(placement.value)
 	}
 
-	function handleValidate(data) {
-		console.log(data)
-		if (data.turnoverType === "0" || data.turnoverArea === "" || data.deptId === "0") {
-			return false;
-		} else {
-			return true;
-		}
-	}
 
 	function handleConfirm() {
-		curDayworkItem.value.id = null;
-		curDayworkItem.value.status = curDayworkItem.value.turnoverType == '1' ? '7' : '4';
-		curDayworkItem.value.startTime = timestampToTime(new Date());
-		curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;
-		if (!store.tenantId) {
-			curDayworkItem.value.tenantId = store.userInfo.tenantId;
-		} else {
-			curDayworkItem.value.tenantId = store.tenantId;
-		}
-		console.log(deptList.value)
-		// 设置周转下一个车间名
-		for (let i = 0; i < deptList.value.length; i++) {
-			if (deptList.value[i].value == curDayworkItem.value.deptId) {
-				curDayworkItem.value.deptName = deptList.value[i].text;
-			}
-		}
-		console.log(curDayworkItem.value);
-		if (!handleValidate(curDayworkItem.value)) {
-			uni.showToast({
-				icon: "error",
-				title: '请选择完整信息',
-				duration: 2000
-			});
-		} else {
-			saveDayWorkItem(curDayworkItem.value).then(res => {
-				if (res.code === 200) {
-					uni.showToast({
-						icon: 'success',
-						title: '操作成功',
-						duration: 2000
-					});
-					uni.$emit('dayworkItemUpdate');
-					close();
-				} else {
-					uni.showToast({
-						icon: 'error',
-						title: '操作失败',
-						duration: 2000
-					});
-					close();
-				}
-			})
-		}
-		// emit('confirm');
+		emit('submit',placement.value);
+		close();
 	}
 
-	function handleChange() {
-		turnAreaList.value = [];
+	// function handleChange() {
+	// 	handleGetTurnoverListByDId(curDept.value);
+	// }
+	
+	function handleGetTurnoverListByDId(depId){
+		// turnAreaList.value = [];
 		getTurnoverListByDeptId({
-			deptId: curDayworkItem.value.deptId,
+			deptId: depId,
 		}).then(res => {
 			for (var i = 0; i < res.data.length; i++) {
 				if(res.data[i].status == 0){

+ 153 - 44
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -24,10 +24,23 @@
 				<text>是</text>
 			</view>
 		</view>
-		<view v-if="flag">
-			<uni-easyinput class="uni-mt-5" suffixIcon="search" focus v-model="userName" placeholder="请输入协作者编号"
-				@iconClick="iconClick"></uni-easyinput>
+		<view class="userList" v-if="flag">
+			<uni-easyinput class="uni-mt-5" v-model="userName" placeholder="请输入协作者编号"
+			@input="debounce(handleSearchUserName,500)" @blur="handleBlur"></uni-easyinput>
+
+			<view class="uni-row showUser">
+				<view v-for="(item,index) in userList">
+					<view class="user" @click="handleClickUserName(item)">{{item.nickName}}</view>
+				</view>
+			</view>
 		</view>
+		<view class="uni-row selectedUserList">
+			<view class="selectedUser uni-row" v-for="(item,index) in selectedUserList">
+				<view >{{item.nickName}}</view>
+				<view v-if="selectedUserList.length > 0" @click="handleRemoveUserName(item)">×</view>
+			</view>
+		</view>
+
 
 		<view class="add-btn-container uni-row">
 			<button type="primary" class="btn" @click="handleStart">开始</button>
@@ -62,8 +75,12 @@
 		getEquipmentByUidAndDid
 	} from '@/api/resourceGroup/resourceGroupDetail.js'
 	import {
-		timestampToTime
+		timestampToTime,
+		debounce
 	} from '@/utils/common.js'
+	import {
+		getUserByLikeUsername
+	} from '@/api/sys/user.js'
 
 	const baseDialog = ref(null)
 	const equipments = ref([]) // 接收设备列表信息
@@ -77,12 +94,21 @@
 	const selectedEquipment = ref(null)
 	const flag = ref(false)
 	const userName = ref(null)
+	const userList = ref([])
+	const selectedUserList = ref([])
 
 
 	onLoad(() => {
 		userId.value = store.userInfo.userId || "";
 	})
 
+	function resetPage() {
+		flag.value = false;
+		userName.value = null;
+		userList.value = [];
+		selectedUserList.value = [];
+	}
+
 	function init() {
 		getProcessList({
 			// tenantId: store.tenantId,
@@ -96,43 +122,54 @@
 						value: res.data[i].processId
 					}
 				};
-				
+
 				selectedProcess.value = res.data[0].processId;
 			}
 		})
-
-		getEquipmentByUidAndDid(store.userInfo.userId, store.curDeptDetails).then(res => {
-			if (res.code == 200) {
-				getDayWorkItemList({
-					userId: store.userInfo.userId,
-					dayworkId: store.dayworkInfo.id,
-					status: 1
-				}).then(response => {
-					equipmentList.value = res.rows
-					if (response.code = 200) {
-						for (let i = 0; i < res.rows.length; i++) {
-							for (let j = 0; j < response.rows.length; j++) {
-								if (response.rows[j].equipmentDetailId == res.rows[i].commonId) {
-									equipmentList.value.splice(j, 1)
-								}
-							}
-						};
-						for (var i = 0; i < equipmentList.value.length; i++) {
-							equipmentList.value[i] = {
-								text: equipmentList.value[i].commonCode,
-								value: equipmentList.value[i]
-							}
-						};
-						selectedEquipment.value = equipmentList.value[0].value;
+		
+		Promise.all([getEquipmentByUidAndDid(store.userInfo.userId, store.curDeptDetails), getDayWorkItemList({
+			userId: store.userInfo.userId,
+			dayworkId: store.dayworkInfo.id,
+			status: 1
+		})])
+		.then(([equipmentRes, response]) => {
+			console.log(equipmentRes)
+			console.log(response.rows)
+			if (equipmentRes.code == 200 && response.code == 200) {
+				let equipmentListData = equipmentRes.rows.filter((equipment) => {
+					return !response.rows.some((item) => item.equipmentDetailId == equipment.commonId);
+				});
+				equipmentList.value = equipmentListData.map((equipment) => {
+					return {
+						text: equipment.commonCode,
+						value: equipment
 					}
-					baseDialog.value.open()
-				})
+				});
+				selectedEquipment.value = equipmentListData.length > 0 ? equipmentListData[0] : null;
 			}
-		})
+			baseDialog.value.open()
+		});
+	// 					for (let i = 0; i < equipmentList.value.length; i++) {
+	// 						for (let j = 0; j < response.rows.length; j++) {
+	// 							if (response.rows[j].equipmentDetailId == equipmentList.value[i].commonId) {
+	// 								equipmentList.value.splice(j, 1)
+	// 							}
+	// 						}
+	// 					}
+	// 					for (var i = 0; i < equipmentList.value.length; i++) {
+	// 						equipmentList.value[i] = {
+	// 							text: equipmentList.value[i].commonCode,
+	// 							value: equipmentList.value[i]
+	// 						}
+	// 					}
+	// 				
 	}
 
 	function open(data) {
+		resetPage()
 		firstItem.value = data;
+		userName.value = null;
+		userList.value = [];
 		init();
 	}
 
@@ -152,22 +189,51 @@
 
 	}
 
+	function handleSearchUserName() {
+		if(userName.value){
+			getUserByLikeUsername(userName.value).then(res => {
+				if (res.code == 200) {
+					userList.value = res.data;
+				}
+			})
+		}
+	}
+
+	function handleClickUserName(item) {
+		selectedUserList.value.push(item);
+		userList.value = [];
+	}
+	
+	function handleBlur(){
+		setTimeout(function(){
+			userList.value = [];
+		},200)
+	}
+	
+	function handleRemoveUserName(item){
+		selectedUserList.value.splice(selectedUserList.value.indexOf(item),1);
+	}
+
 	function switchChange(e) {
 		flag.value = e.detail.value;
 	}
 
+	function handleStart() {
+		uni.showModal({
+			title: "提示",
+			content: "确认开始新的报工吗",
+			success: function(res) {
+				if (res.confirm) {
+					handleDoStart();
+				} else if (res.cancel) {
+					close();
+				}
+			}
+		})
 
-	// function handleSelection(item) {
-	// 	// const buttonIndex = selection.value.findIndex(selectedItem => selectedItem === item);
-	// 	// if (buttonIndex > -1) {
-	// 	// 	selection.value.splice(buttonIndex, 1); // 取消选中
-	// 	// } else {
-	// 	// 	selection.value.push(item); // 选中
-	// 	// }
-	// 	selection.value[0] = item;
-	// }
+	}
 
-	function handleStart() {
+	function handleDoStart() {
 		if (!selectedProcess.value || !selectedEquipment.value) {
 			uni.showToast({
 				icon: "none",
@@ -185,14 +251,16 @@
 				equipmentDetailId: selectedEquipment.value.commonId,
 				equipmentDetailCode: selectedEquipment.value.commonCode,
 				startTime: timestampToTime(new Date()),
-				status: 1
+				status: 1,
+				collaborationList: selectedUserList.value
 			};
 			emit('handleAddDayWorkItem', sendReqParam.value);
 		} else {
 			emit('handleAddDayWorkItem', {
 				processId: selectedProcess.value,
 				equipmentDetailId: selectedEquipment.value.commonId,
-				equipmentDetailCode: selectedEquipment.value.commonCode
+				equipmentDetailCode: selectedEquipment.value.commonCode,
+				collaborationList: selectedUserList.value
 			});
 		}
 	}
@@ -238,5 +306,46 @@
 			justify-content: space-between;
 			margin: 16rpx;
 		}
+
+		.userList {
+			border: 1rpx solid #1684fc;
+			border-radius: 8rpx;
+			max-height: 300rpx;
+			overflow: auto;
+			width: 100%;
+
+			.showUser {
+				justify-content: flex-start;
+				flex-wrap: wrap;
+
+				.user {
+					border: 1rpx solid #999;
+					border-radius: 8rpx;
+					width: 150rpx;
+					height: 50rpx;
+					text-align: center;
+					line-height: 50rpx;
+					margin: 10rpx;
+					overflow: auto;
+				}
+			}
+		}
+		.selectedUserList {
+			width: 100%;
+			justify-content: flex-start;
+			flex-wrap: wrap;
+		
+			.selectedUser {
+				border: 1rpx solid #999;
+				border-radius: 8rpx;
+				width: 150rpx;
+				height: 50rpx;
+				text-align: center;
+				line-height: 50rpx;
+				margin: 20rpx 20rpx 0 0;
+				justify-content: space-around;
+				
+			}
+		}
 	}
 </style>

+ 2 - 2
manifest.json

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

+ 31 - 27
pages/batchReporting/index.vue

@@ -9,7 +9,7 @@
 				搜索
 			</view>
 		</view>
-		<view class="scroll-container" >
+		<view class="scroll-container">
 			<view v-for="(item, index) in listData" :key="index" class="list-item"
 				@click="handleToreportingForWork(item)">
 				<view class="title-container uni-row" style="justify-content: flex-start;">
@@ -43,29 +43,30 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">投入数</text>
-					<text class="label right">{{item['processQualifiedNum'] == 0 ? item['oneLotQuantity'] : item['processQualifiedNum']}}</text>
+					<text
+						class="label right">{{item['processQualifiedNum'] == 0 ? item['oneLotQuantity'] : item['processQualifiedNum']}}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">上道工序</text>
 					<text
-						class="label right">{{ item.prevProcess && item.prevProcess.length > 0 ? item.prevProcess[item.prevProcess.length - 1].processAlias : ''}}</text>
+						class="label right">{{ item.prevProcess && item.prevProcess.length > 0 ? item.prevProcess[item.prevProcess.length - 1].processAlias : '-'}}</text>
 				</view>
-	<!-- 			<view class="item-info uni-row">
+				<view class="item-info uni-row">
 					<text class="label">当前工序</text>
 					<text class="label right">{{ item['currentProcess'].processAlias }}</text>
 				</view>
-				<view class="item-info uni-row">
+<!-- 				<view class="item-info uni-row">
 					<text class="label">下道工序</text>
 					<text
 						class="label right">{{item.prevProcess && item.nextProcess.length > 0 ? item.nextProcess[0].processAlias : null }}</text>
 				</view> -->
-				<view class="item-info uni-row">
+		<!-- 		<view class="item-info uni-row">
 					<text class="label">设备</text>
 					<text class="label right">{{ curPlan['equipmentName'] }}</text>
-				</view>
+				</view> -->
 				<view v-if="notPreProcess" class="item-info uni-row">
 					<text class="label">所在区域</text>
-					<text class="label right">{{ curPlan['area'] }}</text>
+					<text class="label right">{{ item['place'] }}</text>
 				</view>
 				<view class="status-btn uni-row">
 					<view v-if="item['status'] == 2" class=" uni-row">
@@ -79,10 +80,10 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="bottomStatus == 0" class="bottom uni-row">
+		<view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
 		</view>
-		<view v-else-if="bottomStatus == 1" class="bottom uni-row">
+<!-- 		<view v-else-if="bottomStatus == 1" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
 		</view>
 		<view v-else="bottomStatus == 2" class="bottom uni-row">
@@ -90,7 +91,7 @@
 				@click="handleStartNewBatch">开始新批次</button>
 			<button class="start-batch-btn" style="width: 40%;margin-left: 10rpx" type="primary"
 				@click="handleScanCode">扫一扫开始新批次</button>
-		</view>
+		</view> -->
 		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
 		<dialog-turnoverApplication ref="turnoverApplicationDialog" @confirm="handleDoTurnoverAfter" />
 	</view>
@@ -126,21 +127,22 @@
 	const listData = ref([])
 	const curPlan = ref(null)
 	const bizDayworkObj = ref({})
-	const bottomStatus = ref(0) // 底部按钮显示
+	const bottomStatus = ref(false) // 底部按钮显示
 	const reqParam = ref(null);
 	const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态	
-	const keywords = ref(null) 
+	const keywords = ref(null)
 	const notPreProcess = ref(true)
 
 	onLoad(() => {
 		curPlan.value = store.planDetails;
 		console.log(curPlan.value)
-		// if(store.planDetails.requisitionDepartmentId == store.curDeptDetails){
-		// 	bottomStatus.value = 0;
-		// }else{
-		// 	bottomStatus.value = 1;
-		// }
-		
+		if (store.planDetails.requisitionDepartmentId == store.curDeptDetails) {
+			bottomStatus.value = true;
+		}else{
+			bottomStatus.value = false;
+		}
+		console.log(bottomStatus.value)
+
 		init(store.planDetails.id);
 		uni.$once('batchReporting-addBatch', () => {
 			init(store.planDetails.id);
@@ -176,7 +178,7 @@
 			productionPlanDetailId: id,
 			deptId: store.curDeptDetails
 		};
-		
+
 		getDayWorkList(reqData).then(res => {
 			listData.value = res.data;
 
@@ -187,7 +189,8 @@
 					for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
 						if (listData.value[i].dayworkItemList[j].status == 2 || listData.value[i].dayworkItemList[
 								j].status == 3) {
-							listData.value[i].totalWorkingHours += Number(listData.value[i].dayworkItemList[j].workingHours);
+							listData.value[i].totalWorkingHours += Number(listData.value[i].dayworkItemList[j]
+								.workingHours);
 						}
 					}
 					listData.value[i].totalWorkingHours = toHHmmss(listData.value[i].totalWorkingHours);
@@ -199,7 +202,7 @@
 		})
 	}
 
-	function handleSearch(){
+	function handleSearch() {
 		
 	}
 
@@ -281,7 +284,7 @@
 
 <style lang="scss">
 	$nav-height: 60rpx;
-	
+
 	.box-bg {
 		width: 100%;
 		background-color: #F5F5F5;
@@ -289,7 +292,7 @@
 		justify-content: space-around;
 		align-items: center;
 		margin-top: 20rpx;
-		
+
 		.input-view {
 			width: 100%;
 			flex: 4;
@@ -301,11 +304,11 @@
 			flex-wrap: nowrap;
 			margin: 0 10rpx 0;
 			line-height: $nav-height;
-	
+
 			.input-uni-icon {
 				line-height: $nav-height;
 			}
-	
+
 			.nav-bar-input {
 				width: 80%;
 				height: $nav-height;
@@ -314,13 +317,14 @@
 				background-color: #f8f8f8;
 			}
 		}
-	
+
 		.search {
 			width: 20%;
 			text-align: center;
 			color: #808080;
 		}
 	}
+
 	.scroll-container {
 		width: 92%;
 		margin: 24rpx auto 0 auto;

+ 5 - 1
pages/changeBox/index.vue

@@ -24,10 +24,14 @@
 					<view class="uni-row">
 						<switch color="#ff0000" style="transform:scale(0.7)" @change="handleSwitchChange(item)" />
 					</view>
-					<view class="uni-row">
+					<view class="uni-row" v-if="item.checked">
 						<uni-data-select v-model="item.reason" :localdata="abanonmentList" style="width: 240rpx;"
 							:clear="false"></uni-data-select>
 					</view>
+					<!-- 占空位用 -->
+					<view class="uni-row" v-if="!item.checked">
+						<view style="width: 240rpx;"></view>
+					</view>
 				</view>
 			</view>
 		</view>

+ 6 - 1
pages/dashboard/index.vue

@@ -27,7 +27,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>
@@ -148,6 +148,11 @@
 				value: newArr[i].deptId
 			}
 		}
+		if(userDeptsByTenantId.value.length == 0){
+			store.curDeptDetails = 0;
+		}else{
+			store.curDeptDetails = userDeptsByTenantId.value[0].value;
+		}
 		console.log(userDeptsByTenantId.value);
 	} 
 

+ 15 - 11
pages/equipmentList/index.vue

@@ -8,8 +8,9 @@
 				<view :class="{'unbind': true,'visible': showUnbind === item}" @click="handleUnbind(item)">解绑</view>
 			</view>
 		</view>
-		<view>
+		<view class="bottom uni-row">
 			<button class="btn" @click="handleScanCode">扫码</button>
+			<button class="" @click="">提交</button>
 		</view>
 	</view>
 	<dialog-confirm ref="confirm" @submit="handleConfirmUnbind" @reflush="reflush"></dialog-confirm>
@@ -185,16 +186,19 @@
 			text-align: center;
 			color: lightgrey;
 		}
-
-		.btn {
-			background-color: rgba(0, 226, 166, 1);
-			color: white;
-			margin: 20rpx auto;
-			width: 80%;
-			position: fixed;
-			bottom: 0;
-			left: 0;
-			right: 0;
+		
+		.bottom {
+			justify-content: space-between;
+			.btn {
+				background-color: rgba(0, 226, 166, 1);
+				color: white;
+				margin: 20rpx auto;
+				width: 80%;
+				position: fixed;
+				bottom: 0;
+				left: 0;
+				right: 0;
+			}
 		}
 
 		.equipmentList {

+ 1 - 1
pages/productionPlan/index.vue

@@ -8,7 +8,7 @@
 			<view class="search" @click="handleSearch">
 				搜索
 			</view>
-		</view>
+		</view> 
 		<view v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)" class="list-item">
 			<view class="title-container uni-row">
 				<view class="title uni-row">

+ 10 - 8
pages/recerptSfprod/index.vue

@@ -111,11 +111,9 @@
 	}
 
 	function handleConfirmReceipt() {
-		let msg = "是否确认接收";
-		receipt.value.open(msg);
+		// receipt.value.open();
 		if (selection.value.length > 0) {
-			let msg = "是否确认接收";
-			confirm.value.open(msg);
+			receipt.value.open();
 		}
 	}
 
@@ -133,16 +131,19 @@
 		console.log(selection.value, "selection");
 	}
 
-	function handleDoReceipt() {
+	function handleDoReceipt(data) {
 		// 设置周转状态
 		for (var i = 0; i < selection.value.length; i++) {
 			selection.value[i].status = '7';
 			selection.value[i].recipientId = store.userInfo.userId;
+			selection.value[i].placeId = data.id;
+			selection.value[i].place = data.code; 
 		}
+		console.log(selection.value) 
 		updateDayWorkItemBatch(selection.value).then(res => {
 			if (res.code === 200) {
 				uni.showToast({
-					icon: 'success',
+					icon: 'success', 
 					title: '操作成功',
 					duration: 2000
 				});
@@ -160,9 +161,10 @@
 		title.value = null;
 	}
 
-	function handleDoIt() {
-		handleDoReceipt();
+	function handleDoIt(data) {
+		handleDoReceipt(data);
 	}
+
 </script>
 
 <style lang="scss">

+ 18 - 15
pages/reportingForWork/index.vue

@@ -37,6 +37,11 @@
 					<text class="label">废品数</text>
 					<text class="label right">{{ item['rejectSum'] ? item['rejectSum'] : 0 }}</text>
 				</view>
+				<view class="item-info uni-row">
+					<text class="label">投入数</text>
+					<text
+						class="label right">{{store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum']}}</text>
+				</view>
 				<view class="item-info uni-row">
 					<text class="label">设备</text>
 					<text class="label right">{{ item['equipmentDetailCode']}}</text>
@@ -111,13 +116,14 @@
 	})
 
 	function init() {
+		console.log(store.dayworkInfo)
 		userInfo.value = store.userInfo;
 		uni.showLoading({
 			title: '加载中'
 		});
 		getDayWorkItemList({
 			dayworkId: dayWorkInfo.value.id,
-			processId: store.dayworkInfo.currentProcess.id,
+			// processId: store.dayworkInfo.currentProcess.id,
 			type: '非周转中item'
 		}).then(res => {
 			if (res.code == 200) {
@@ -162,19 +168,14 @@
 	}
 
 	function handleStartProcessing(item) {
-		// if(item){
-		// 	selectEquipment.value.open(item);
-		// }else{
-		// 	if (flag.value) {
-		// 		uni.showToast({
-		// 			icon: "none",
-		// 			title: "报工未结束或工序已完成"
-		// 		})
-		// 	} else {
-		// 		selectEquipment.value.open(item);
-		// 	}
-		// }
-		selectEquipment.value.open(item);
+		if(store.dayworkInfo.status == 4){
+			uni.showToast({
+				icon: 'none',
+				title: '当前批次已完成'
+			})
+		}else{
+			selectEquipment.value.open(item);
+		}
 	}
 
 	/**
@@ -210,7 +211,8 @@
 				...data,
 				productionPlanId: curPlan.value.productionPlanId,
 				productionPlanDetailId: curPlan.value.id,
-				technologicalProcessId: curPlan.value.technologicalProcessId
+				technologicalProcessId: curPlan.value.technologicalProcessId,
+				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum']
 			}
 		} else {
 			// equipmentList.value = data;
@@ -220,6 +222,7 @@
 				productionPlanId: curPlan.value.productionPlanId,
 				productionPlanDetailId: curPlan.value.id,
 				technologicalProcessId: curPlan.value.technologicalProcessId,
+				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
 				status: 1,
 				startTime: timestampToTime(new Date()),
 				...data