guoyujia 1 год назад
Родитель
Сommit
e248a856a9
2 измененных файлов с 54 добавлено и 18 удалено
  1. 8 0
      api/business/dayWorkItem.js
  2. 46 18
      pages/reportingForWork/index.vue

+ 8 - 0
api/business/dayWorkItem.js

@@ -52,3 +52,11 @@ export function getDayworkItemByCarrierId(data) {
 		data: data
 	})
 }
+
+export function saveproTem(data) {
+	return req.request({
+		url:'/business/dayworkItem/proTem',
+		method: 'POST',
+		data: data
+	})
+}

+ 46 - 18
pages/reportingForWork/index.vue

@@ -1,5 +1,9 @@
 <template>
 	<view class="uni-column container">
+		<view class="top">
+			<button class="top-btn" @click="HandleSeleteInviteUser(null)"><text class="label">邀请报工</text></button>
+			
+		</view>
 		<scroll-view class="scroll-container" scroll-y>
 			<view v-for="(item, index) in listData" :key="index" class="list-item">
 				<view class="title-container">
@@ -66,6 +70,7 @@
 		<dialog-end-work ref="endWorkDialog" @sendEquipment='getEquipment' />
 		<dialog-selectEquipment ref='selectEquipment'
 			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectEquipment>
+		<dialog-selectInviteUser ref="inviteUser" @handleAddDayWorkItem='handleAddDayWorkItem' ></dialog-selectInviteUser>
 	</view>
 </template>
 
@@ -97,6 +102,7 @@
 	const equipmentList = ref([]) // 设备列表
 	const endWorkDialog = ref(null) // 组件
 	const selectEquipment = ref(null) // 组件   
+	const inviteUser = ref(null) // 组件  
 	const dayWorkItem = ref({}) // 添加传输对象
 	const reqParam = ref([]) // 请求参数
 	const userInfo = ref(null) // 登录员工信息
@@ -155,6 +161,10 @@
 		// 调用子组件中的方法
 		endWorkDialog.value.open(data)
 	}
+	
+	function HandleSeleteInviteUser(data) {
+		inviteUser.value.open(data)
+	}
 
 	function HandleChangevehicle() {
 		uni.navigateTo({
@@ -234,23 +244,23 @@
 			reqParam.value = dayWorkItem.value;
 		}
 		console.log(reqParam.value)
-		saveDayWorkItemBatch(reqParam.value).then(res => {
-			if (res.code === 200) {
-				uni.showToast({
-					icon: 'success',
-					title: '操作成功',
-					duration: 2000
-				});
-				reqParam.value = [];
-				uni.$emit('dayworkItemUpdate');
-			} else {
-				uni.showToast({
-					icon: 'error',
-					title: '操作失败',
-					duration: 2000
-				});
-			}
-		})
+		// saveDayWorkItemBatch(reqParam.value).then(res => {
+		// 	if (res.code === 200) {
+		// 		uni.showToast({
+		// 			icon: 'success',
+		// 			title: '操作成功',
+		// 			duration: 2000
+		// 		});
+		// 		reqParam.value = [];
+		// 		uni.$emit('dayworkItemUpdate');
+		// 	} else {
+		// 		uni.showToast({
+		// 			icon: 'error',
+		// 			title: '操作失败',
+		// 			duration: 2000
+		// 		});
+		// 	}
+		// })
 	}
 </script>
 
@@ -264,7 +274,7 @@
 
 	.scroll-container {
 		position: relative;
-		top: 24rpx;
+		top: 104rpx;
 		// right: 0;
 		// bottom: 144rpx;
 		// left: 0;
@@ -339,6 +349,24 @@
 
 		}
 	}
+	.top{
+		position: fixed;
+		top: 0;
+		right: 0;
+		left: 0;
+		height: 80rpx;
+		padding: 16rpx 24rpx;
+		align-items: center;
+		justify-content: center;
+		background-color: #FFFFFF;
+		.top-btn {
+			font-size: 28rpx;
+			color: #FFFFFF;
+			background-color: #1684fc;
+			width: 100%;
+		
+		}
+	}
 
 	.bottom {
 		position: fixed;