guoyujia 11 miesięcy temu
rodzic
commit
f1ccbb9f4c

+ 7 - 0
api/business/dayWork.js

@@ -39,6 +39,13 @@ export function selectProcessList(data) {
 	})
 }
 
+export function getLotInformation(data) {
+	return req.request({
+		url: '/business/daywork/getLotInformation',
+		method: 'POST',
+		data: data
+	})
+}
 export function showDayworkSave(data) {
 	return req.request({
 		url: '/business/daywork/showDayworkSave',

+ 35 - 4
api/business/dayWorkItem.js

@@ -61,6 +61,20 @@ export function getDayworkItemByCarrierId(data) {
 	})
 }
 
+export function getSortItemByDayworkId(data) {
+	return req.request({
+		url: '/business/dayworkItem/getSortItemByDayworkId',
+		method: 'POST',
+		data: data
+	})
+}
+export function getDayworkItemByDayworkId(data) {
+	return req.request({
+		url: '/business/dayworkItem/getDayworkItemByDayworkId',
+		method: 'POST',
+		data: data
+	})
+}
 export function getDayworkItemByCarrierCode(data) {
 	return req.request({
 		url: '/business/dayworkItem/getDayworkItemByCarrierCode',
@@ -108,10 +122,27 @@ export function getIsFirstOrder(dayWorkId) {
 		method: 'GET',
 	})
 }
-
-
-
-
+export function getInnerTurnoverByDeptId(data) {
+	return req.request({
+		url: '/business/dayworkItem/getInnerTurnoverByDeptId',
+		method: 'POST',
+		data: data
+	})
+}
+export function getOutTurnoverByDeptId(data) {
+	return req.request({
+		url: '/business/dayworkItem/getOutTurnoverByDeptId',
+		method: 'POST',
+		data: data
+	})
+}
+export function updateDayworkItemInnerTurnover(data) {
+	return req.request({
+		url: '/business/dayworkItem/updateDayworkItemInnerTurnover',
+		method: 'POST',
+		data: data
+	})
+}
 
 export function getDayWorkItemHistory(startTime, endTime) {
 	return req.request({

+ 7 - 0
api/business/dayworkCarrier.js

@@ -10,4 +10,11 @@ export function getDayworkCarrierList(data) {
 		method: 'GET',
 		data: data
 	})
+}
+export function getDayworkCarrierByCarrierCode(data) {
+	return req.request({
+		url:'/business/dayworkCarrier/getDayworkCarrierByCarrierCode',
+		method: 'POST',
+		data: data
+	})
 }

+ 7 - 0
api/business/furnaceNoInfo.js

@@ -6,4 +6,11 @@ export function getFurnaceNoInfoByDayworkId(data) {
 		method: 'GET',
 		data: data
 	})
+}
+export function getFurnaceNoInfoByDaywork(data) {
+	return req.request({
+		url:'/business/info/getFurnaceNoInfoByDayworkId',
+		method: 'POST',
+		data: data
+	})
 }

+ 13 - 0
api/business/innerTurnover.js

@@ -0,0 +1,13 @@
+import req from '@/utils/request.js'
+
+/**
+ * 内部周转信息
+ * @param {Object} data
+ */
+export function listInnerTurnover(data) {
+	return req.request({
+		url: '/business/innerTurnover/list',
+		method: 'GET',
+		data:data
+	})
+}

+ 7 - 0
api/business/processInspection.js

@@ -93,6 +93,13 @@ export function getCarrierInfo(data) {
 		data: data
 	})
 }
+export function getProcessInspectionByDayworkId(data) {
+	return req.request({
+		url: '/business/inspecion/getProcessInspectionByDayworkId',
+		method: 'post',
+		data: data
+	})
+}
 
 /**
  * 保存质检箱信息

+ 14 - 12
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -12,8 +12,10 @@
 		</view> -->
 		<view>
 			<uni-section title="设备" type="line">
-				<uni-data-select v-model="selectedEquipment" :localdata="equipmentList" :clear="false"
-					@change="handleEquipmentChange"></uni-data-select>
+				<!-- <uni-data-select v-model="selectedEquipment" :localdata="equipmentList" :clear="false"
+					@change="handleEquipmentChange"></uni-data-select> -->
+					<zxz-uni-data-select v-model="selectedEquipment" filterable :localdata="equipmentList" placeholder="请选择/输入设备"
+						></zxz-uni-data-select>
 			</uni-section>
 		</view>
 <!-- 		<view class="switch uni-row">
@@ -186,7 +188,7 @@
 						value: equipmentRes.rows[i]
 					}
 				}
-				selectedEquipment.value = equipmentRes.rows.length > 0 ? equipmentRes.rows[0] : null;
+				// selectedEquipment.value = equipmentRes.rows.length > 0 ? equipmentRes.rows[0] : null;
 			}
 			baseDialog.value.open()
 		})
@@ -269,15 +271,15 @@
 	}
 
 	function handleDoStart() {
-		// if (!selectedProcess.value || !selectedEquipment.value) {
-		// 	uni.showToast({
-		// 		icon: "none",
-		// 		title: "未选择工序或设备"
-		// 	})
-		// 	selectedProcess.value = null;
-		// 	selectedEquipment.value = null;
-		// 	return;
-		// }
+		if (!selectedEquipment.value) {
+			uni.showToast({
+				icon: "none",
+				title: "未选择设备"
+			})
+			selectedProcess.value = null;
+			selectedEquipment.value = null;
+			return;
+		}
 		close();
 		if (firstItem.value) {
 			sendReqParam.value = {

+ 3 - 0
components/dialog-selectInviteUser/dialog-selectInviteUser.vue

@@ -158,10 +158,13 @@
 							inviteUser.commonName = selectedUserList.value[i].nickName
 							inviteUser.protemDayworkId = store.dayworkInfo.id
 							inviteUser.protemProcessId = itemList.value[0].processId
+							inviteUser.protemProcessStepNumber = itemList.value[0].technologicalProcessDetail.processStepNumber
 							inviteUser.technologicalProcessDetailId = itemList.value[0].technologicalProcessDetailId
 							inviteUserList.push(inviteUser)
 						}
 						console.log(inviteUserList)
+						console.log(itemList.value)
+						console.log(store.dayworkInfo)
 						saveproTem(inviteUserList).then(res => {
 							if (res.code == 200) {
 								uni.showToast({

+ 115 - 0
components/dialog-selectLot/dialog-selectLot.vue

@@ -0,0 +1,115 @@
+<template>
+	<dialog-base class="dialog-body" ref="baseDialog" title="选择批次">
+		<uni-section title="请选择批次" type="square">
+			<uni-data-select v-model="selectedLot" :localdata="lotList" :clear="false"
+			></uni-data-select>
+		</uni-section>
+		<view class="add-btn-container uni-row">
+			<button type="primary" class="btn" @click="handleConfirm">确认</button>
+		</view>
+	</dialog-base>
+</template>
+
+<script setup>
+	import {
+		ref,
+		getCurrentInstance
+	} from 'vue'
+	const baseDialog = ref(null)
+	const emit = defineEmits(['submit'])
+	const lotList = ref([])
+	const selectedLot = ref(null)
+
+
+	const open = (data) => {
+		console.log(data)
+		baseDialog.value.open();
+		for (var i = 0; i < data.length; i++) {
+			lotList.value[i] = {
+				text: data[i].label,
+				value: data[i].value
+			}
+		}
+		console.log(lotList.value)
+		selectedLot.value = lotList.value[0].value
+}
+	const close = () => {
+		baseDialog.value.close()
+	}
+
+	defineExpose({
+		open
+	})
+	function handleConfirm() {
+		let index = lotList.value.findIndex(item =>item.value == selectedLot.value)
+      close();
+	  emit('submit',lotList.value[index]);
+	}
+
+</script>
+
+<style lang="scss">
+	.selected {
+		border: 3rpx solid #1684fc;
+		border-radius: 8rpx;
+	}
+
+	.dialog-body {
+		overflow: auto;
+
+		.list-title {
+			margin: 10rpx 0 20rpx 0;
+
+			.label {
+				font-size: 32rpx;
+				font-weight: bold;
+			}
+		}
+
+		.prompt {
+			color: red;
+			margin: 8rpx auto 0;
+		}
+
+		.list-container {
+			width: 94%;
+			display: flex;
+			align-items: flex-start;
+			margin: 10rpx auto;
+			padding: 8px 2% 16px 2%;
+			border-radius: 8rpx;
+
+			.list-container-item {
+				width: 100%;
+				border-bottom: 1px solid #e1e1e1;
+				border-left: 1px solid #e1e1e1;
+				border-right: 1px solid #e1e1e1;
+				padding: 12rpx 8rpx;
+				box-sizing: border-box;
+				.label {
+					font-size: 28rpx;
+					color: gray;
+					width: 140rpx;
+
+					&.value {
+						 flex: 1;
+					}
+				}
+			}
+
+		}
+
+		.add-btn-container {
+			margin-top: 32rpx;
+
+			.btn {
+				flex: 1;
+			}
+		}
+	}
+
+	.selectedProcess {
+		width: 88%;
+		margin: 20rpx auto 40rpx;
+	}
+</style>

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

@@ -291,7 +291,7 @@
 		} else {
 			//console.log(dayworkInfo.value)
 			curDayworkItem.value.id = null;
-			curDayworkItem.value.status = curDayworkItem.value.turnoverType == '1' ? '7' : '4';
+			curDayworkItem.value.status = '4';
 			curDayworkItem.value.startTime = timestampToTime(new Date());
 			curDayworkItem.value.endTime = timestampToTime(new Date());
 			curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;

+ 12 - 0
pages.json

@@ -216,6 +216,18 @@
 			"style": {
 				"navigationBarTitleText": "图纸信息"
 			}
+		},
+		{
+			"path": "pages/queryLotInfo/index",
+			"style": {
+				"navigationBarTitleText": "查询批次信息"
+			}
+		},
+		{
+			"path": "pages/innerTurnover/index",
+			"style": {
+				"navigationBarTitleText": "内部周转"
+			}
 		}
 	],
 	"globalStyle": {

+ 21 - 65
pages/batchReporting/index.vue

@@ -94,6 +94,14 @@
 					<text class="label">所在区域</text>
 					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
 				</view>
+				<view v-if="item.protemResourceGroupDetailList && item.protemResourceGroupDetailList.length>0" class="item-info uni-row">
+					<text class="label">邀请者</text>
+					<text class="label right">{{ item['protemResourceGroupDetailList'] && item['protemResourceGroupDetailList'].length>0 ? item['protemResourceGroupDetailList'][0].protemCreatorName : '-' }}</text>
+				</view>
+				<view v-if="item.protemResourceGroupDetailList&& item.protemResourceGroupDetailList.length>0" class="item-info uni-row">
+					<text class="label">已完成数量</text>
+					<text class="label right">{{ item['totalQuantity'] ? item['totalQuantity'] : 0 }}</text>
+				</view>
 				<view class="status-btn uni-row">
 					<view v-if="item['status'] == 2" class=" uni-row">
 						<button class="turnover-tag" size="mini"
@@ -113,14 +121,12 @@
 			<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
 				仅显示当前工序后面工艺
 			</view>
-			<scroll-view scroll-y="true" style="height: 80%;" @touchmove.stop>
+			<scroll-view scroll-y="true" style="height: 82%;" @touchmove.stop>
 				<view v-for="(item,index) in curProcessAfte" :key="index"
 					style="padding: 8rpx 5% 8rpx 14%; border-top: 1px solid #cccccc">
 					<text>{{ index + 1 }}.{{item.processAlias}}</text>
 				</view>
-				
 			</scroll-view>
-			<view><button v-if="!editStatus" class="view-end-btn" type="primary"  @click="handleOpenDrawing">查看本工序图纸</button></view>
 		</uni-drawer>
 		<!-- <view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
@@ -194,13 +200,11 @@
 	const wasteRecyclingList = ref([]) //废品回用批次
 	// 在数据中定义一个变量来控制遮罩层的显示
 	const isMaskShow = ref(false);
-	//打开图纸
-	//选中的daywork
-	const currentDaywork = ref({})
+
 	const notPreProcess = ref(true)
 	const curProcessAfte = ref([])
 	const showRight = ref(null) // 抽屉
-	const editStatus = ref(false)
+
 
 
 	onLoad(() => {
@@ -294,6 +298,13 @@
 
 		getDayWorkList(reqData).then(res => {
 			if (res.code == 200) {
+			res.data.forEach(item => {
+			  let quantitySum = 0;
+			  item.dayworkItemList.forEach(info => {
+			    quantitySum += info.qualifiedNum;
+			  });
+			  item.totalQuantity = quantitySum;
+			});
 				tempList.value = res.data
 				// console.log(res)
 				if (normalStatus.value) {
@@ -342,20 +353,11 @@
 	function handleClickProcessList(item) {
 		let curProcessAfterList = [];
 		console.log("工序列表", item)
-		currentDaywork.value = item
-		if(item.isWasteRecycling ==1 || item.isAmend ==1){
-			editStatus.value = true
-		}else{
-			editStatus.value = false
-		}
+
 		let nextIndex = 0;
 		for (let i = 0; i < item.processSequence.length; i++) {
-			if(item.nextProcess){
-				if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
-					nextIndex = i;
-				}
-			}else{
-				nextIndex = item.processSequence.length
+			if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
+				nextIndex = i;
 			}
 		}
 		for (let i = 0; i < item.processSequence.length; i++) {
@@ -477,15 +479,6 @@
 					console.log(response)
 					console.log(response.data[0].productionPlanDetailId)
 					console.log(store.planDetails.id)
-					console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
-					if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次已转至其他工段',
-							duration: 2000
-						})
-						return
-					}
 					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
 						console.log(response.data)
 						lotDialog.value.open(response.data);
@@ -507,7 +500,6 @@
 		}
 	}
 
-
 	function handleAddDaywork(data) {
 		console.log(data)
 		let reqParam = [];
@@ -525,32 +517,6 @@
 		handleAddDaywork(data);
 	}
 
-	function handleOpenDrawing(){
-		console.log(currentDaywork.value,"444")
-		
-		var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork.value.currentProcess.processStepNumber);
-		
-		// 检查 filteredProcess 是否有元素,并选择第一个元素
-		if (filteredProcess.length > 0) {
-		  var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
-		
-		  // 对 technologicalProcessDetailId 进行URL编码
-		  var encodedId = encodeURIComponent(firstMatch.technologicalProcessDetailId);
-		  var encodeCode = encodeURIComponent(currentDaywork.value.lotCode);
-		  // 构建查询参数字符串
-		  var queryParam = `param1=${encodedId}&param2=${encodeCode}`;
-		
-		  // 使用模板字符串构建完整的URL
-		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
-		
-		  // 导航到指定页面
-		  uni.navigateTo({
-		    url: navigateUrl
-		  });
-		} else {
-		  console.log('No process matched the current process step number.');
-		}
-	}
 	function handleDoTurnoverAfter() {
 		reflush();
 	}
@@ -743,7 +709,6 @@
 			.label {
 				font-size: 28rpx;
 				width: 220rpx;
-				
 				color: #808080;
 
 				&.right {
@@ -803,14 +768,5 @@
 			color: #FFFFFF;
 			font-size: 28rpx;
 		}
-		.view-end-btn {
-			flex: 1;
-			height: 80rpx;
-			line-height: 80rpx;
-			border-radius: 8rpx;
-			color: #FFFFFF;
-			font-size: 28rpx;
-			
-		}
 	}
 </style>

+ 30 - 1
pages/dashboard/index.vue

@@ -33,9 +33,15 @@
 		<view class="business-btn uni-row" v-if="showOther && !showSizing" @click="handleToProductionPlan">
 			<text class="label">报工</text>
 		</view>
+<!-- 		<view class="business-btn uni-row" v-if="showInnerTurnover" @click="handleInnerTurnover">
+			<text class="label">内部周转</text>
+		</view> -->
 		<view class="business-btn uni-row" v-if="showSizing" @click="handleToSorting">
 			<text class="label">分选报工</text>
 		</view>
+		<view class="business-btn uni-row" @click="handleToGetLotInfo">
+			<text class="label">扫码查询批次信息</text>
+		</view>
 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
 			<text class="label">序检</text>
 		</view>
@@ -79,6 +85,9 @@
 	import {
 		getUserDeptList
 	} from '@/api/dept/dept.js'
+	import {
+		listInnerTurnover
+	} from '../../api/business/innerTurnover'
 	import {
 		store
 	} from '@/store/index.js'
@@ -97,6 +106,7 @@
 	const showInspector = ref(false);
 	const showQuick = ref(false)
 	const showSizing = ref(false)
+	const showInnerTurnover = ref(false)
 	const showOutsourcedInspector = ref(false)
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
@@ -216,6 +226,16 @@
 			url: '/pages/reportHistory/index'
 		})
 	}
+	function handleToGetLotInfo() {
+		uni.navigateTo({
+			url: '/pages/queryLotInfo/index'
+		})
+	}
+	function handleInnerTurnover(){
+		uni.navigateTo({
+			url: '/pages/innerTurnover/index'
+		})
+	}
 
 	function handleFastToProductionPlan() {
 		if (curSelectedDeptId.value) {
@@ -334,7 +354,16 @@
 		} else {
 			showSizing.value = false
 		}
-		console.log(showSizing.value)
+		console.log(store)
+		handleSelectInnerTurnover()
+	}
+	//查询当前工段当前操作者是否能看见内部周转按钮
+	function handleSelectInnerTurnover() {
+		listInnerTurnover({deptId:store.curDeptDetails.deptId,userId:store.userInfo.userId}).then(res =>{
+			if(res.code == 200){
+				showInnerTurnover.value = res.rows.length>0?true:false
+			}
+		})
 	}
 </script>
 

+ 488 - 0
pages/innerTurnover/index.vue

@@ -0,0 +1,488 @@
+<template>
+	<view style="height: 100%;display: flex;flex-direction: column;justify-content: space-between;">
+	<view class="tab-container">
+		<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickInner(1)">车间内</view>
+		<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickOut(2)">车间外</view>
+	</view>
+	<view class="box-bg uni-row">
+		<view class="input-view uni-row">
+			<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
+			<input class="nav-bar-input" type="text" v-model="keywords" placeholder="请输入关键字" />
+		</view>
+		<view class="search" @click="handleSearch">
+			搜索
+		</view>
+	</view>
+	<view class="top-btn-container uni-row">
+		<button v-if="!checkAll" :disabled="(isActiveId === 1 && innerTurnoverList.length === 0) || (isActiveId === 2 && outTurnoverList.length === 0)" class="bottom-btn" @click="handleAll">全选</button>
+		<button v-else class="bottom-btn" @click="handleAll">取消全选</button>
+	</view>
+	<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 1">
+		<view v-if="innerTurnoverList.length == 0" class="no-date">
+			<text>暂无车间内周转批次</text>
+		</view>
+		<!-- 车间内列表 -->
+		<view v-for="(item, index) in innerTurnoverList" :key="index"
+			:class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(item)">
+			<view class="title-container uni-row" style="justify-content: flex-start;">
+				<view class="title uni-row">
+					<text class="label">批次号:</text>
+					<text class="label code">{{ item['lotCode'] }}</text>
+				</view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">产品描述</text>
+				<text class="label right">{{ item['productDescription'] }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">箱号</text>
+				<text class="label right">{{ item['carrierName'] ? item['carrierName'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">合格数量</text>
+				<text class="label right">{{ item['temporaryProcessQualifiedNum']}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">当前工序</text>
+				<view class="label right uni-row">
+					{{ item.currentProcess ? item['currentProcess'].processAlias : '-' }}
+					(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
+					</view>)
+				</view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">下序工段</text>
+				<text class="label right">{{ item['deptName'] }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">摆放位置</text>
+				<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">操作者</text>
+				<text class="label right">{{ item['creatorName']  }}</text>
+			</view>
+		</view>
+	</scroll-view>
+	<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 2">
+		<view v-if="outTurnoverList.length == 0" class="no-date">
+			<text>暂无车间外周转批次</text>
+		</view>
+		<view  v-for="(item, index) in outTurnoverList" :key="index" :class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(item)">
+			<view class="title-container uni-row" style="justify-content: flex-start;">
+				<view class="title uni-row">
+					<text class="label">批次号:</text>
+					<text class="label code">{{ item['lotCode'] }}</text>
+				</view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">产品描述</text>
+				<text class="label right">{{ item['productDescription'] }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">箱号</text>
+				<text class="label right">{{ item['carrierName'] ? item['carrierName'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">合格数量</text>
+				<text class="label right">{{ item['temporaryProcessQualifiedNum']}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">当前工序</text>
+				<view class="label right uni-row">
+					{{ item.currentProcess ? item['currentProcess'].processAlias : '-' }}
+					(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
+					</view>)
+				</view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">下序工段</text>
+				<text class="label right">{{ item['deptName'] }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">摆放位置</text>
+				<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">操作者</text>
+				<text class="label right">{{ item['creatorName']  }}</text>
+			</view>
+		</view>
+	</scroll-view>
+	<!-- 抽屉 -->
+	<uni-drawer ref="showRight" mode="right" :mask-click="true">
+		<view style="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;">工艺列表</view>
+		<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
+			仅显示当前工序后面工艺
+		</view>
+		<scroll-view scroll-y="true" style="height: 82%;" @touchmove.stop>
+			<view v-for="(item,index) in curProcessAfte" :key="index"
+				style="padding: 8rpx 5% 8rpx 14%; border-top: 1px solid #cccccc">
+				<text>{{ index + 1 }}.{{item.processAlias}}</text>
+			</view>
+		</scroll-view>
+	</uni-drawer>
+	<view class="bottom-btn-container uni-row">
+		<button class="bottom-btn" @click="handleStartTurnover">确认周转</button>
+	</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getInnerTurnoverByDeptId,
+		getOutTurnoverByDeptId,
+		updateDayworkItemInnerTurnover
+	} from '@/api/business/dayWorkItem.js'
+	import {
+		store
+	} from '@/store/index.js'
+
+	const selectedInfo = ref({})
+	const selection = ref([])
+	const checkAll = ref(false)
+	const curProcessAfte = ref([])
+	const outTurnoverList = ref([])
+	const innerTurnoverList = ref([])
+	const deptId = ref(null)
+	const showRight = ref(null) // 抽屉
+	const isActiveId = ref(1)
+	const keywords = ref(null)
+
+	onShow(() => {
+		deptId.value = store.curDeptDetails.deptId;
+		init();
+	})
+
+	function init() {
+		checkAll.value = false
+		getInnerList()
+	}
+
+	function getInnerList() {
+		getInnerTurnoverByDeptId({
+			deptId: deptId.value,
+			keywords: keywords.value
+		}).then(res => {
+			if (res.code == 200) {
+				innerTurnoverList.value = res.data
+				isActiveId.value = 1
+			}
+		})
+	}
+
+	function isSelected(item) {
+		return selection.value.includes(item);
+	}
+
+	function handleSelection(item) {
+		const buttonIndex = selection.value.findIndex(selectedItem => selectedItem === item);
+		if (buttonIndex > -1) {
+			selection.value.splice(buttonIndex, 1); // 取消选中
+		} else {
+			selection.value.push(item); // 选中
+		}
+		if (isActiveId.value == 1) {
+			console.log(innerTurnoverList.value.length)
+			console.log(selection.value.length)
+			if (selection.value.length == innerTurnoverList.value.length) {
+				checkAll.value = true;
+			} else {
+				checkAll.value = false;
+			}
+		} else {
+			if (selection.value.length == outTurnoverList.value.length) {
+				checkAll.value = true;
+			} else {
+				checkAll.value = false;
+			}
+		}
+
+	}
+	function handleSearch() {
+		checkAll.value = false
+		selection.value = []
+		if(isActiveId.value == 1) {
+			getInnerList()
+		}else {
+			getOutList()
+		}
+	}
+
+	function getOutList() {
+		getOutTurnoverByDeptId({
+			deptId: deptId.value,
+			keywords: keywords.value
+		}).then(res => {
+			if (res.code == 200) {
+				outTurnoverList.value = res.data
+				isActiveId.value = 2
+			}
+		})
+	}
+	// 全选按钮操作
+	function handleAll() {
+		//清空选中数据
+		selection.value.length = 0;
+		if (checkAll.value) {
+			//变更选中状态
+			checkAll.value = false;
+		} else {
+			checkAll.value = true;
+			if (isActiveId.value == 1) {
+				innerTurnoverList.value.findIndex(item => handleSelection(item))
+			} else {
+				outTurnoverList.value.findIndex(item => handleSelection(item))
+			}
+
+		}
+	}
+	function handleStartTurnover() {
+		if(selection.value.length == 0) {
+			uni.showToast({
+				icon: "none",
+				title: "至少选中一批周转",
+				duration: 2000
+			})
+		}else{
+			uni.showModal({
+				title: '提示',
+				content: `是否已经送达?`,
+				success: function(res) {
+					if (res.confirm) {
+						let dayworkItemList = []
+						selection.value.forEach(item =>{
+							dayworkItemList.push(item.dayworkItemList[0])
+						})
+						updateDayworkItemInnerTurnover(dayworkItemList).then(res =>{
+							if(res.code == 200) {
+								if(isActiveId.value == 1) {
+									getInnerList()
+								}else {
+									getOutList()
+								}
+							}
+						})
+					} else {}
+				}
+			})
+		
+		}
+	}
+
+	function handleClickProcessList(item) {
+		let curProcessAfterList = [];
+		console.log("工序列表", item)
+
+		let nextIndex = 0;
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (item.currentProcess.processStepNumber == item.processSequence[i].processStepNumber) {
+				nextIndex = i;
+			}
+		}
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (i > nextIndex) {
+				curProcessAfterList.push(item.processSequence[i]);
+			}
+		}
+		if (item.status == 3) {
+			curProcessAfterList.splice(0, 1)
+		}
+		console.log(curProcessAfterList)
+		curProcessAfte.value = curProcessAfterList;
+		showRight.value.open();
+	}
+
+	function handleClickInner(val) {
+		selection.value = []
+		isActiveId.value = val
+		checkAll.value = false
+		getInnerList()
+	}
+
+	function handleClickOut(val) {
+		selection.value = []
+		isActiveId.value = val
+		checkAll.value = false
+		getOutList()
+	}
+</script>
+
+<style lang="scss">
+	.tab-container {
+		display: flex;
+		flex-direction: row;
+		height: 24px;
+
+		.tab-item {
+			display: flex;
+			flex-direction: row;
+			flex: 1;
+			font-size: 15px;
+			color: #666;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+
+	.scroll-container {
+		height: calc(100% - 206px);
+		background-color: #f5f5f5;
+
+		.no-date {
+			text-align: center;
+			font-size: 12px;
+			color: #666;
+			padding-top: 16px;
+		}
+		.scroll-item {
+			background-color: #fff;
+			padding: 24rpx;
+			margin: 24rpx;
+			border-radius: 8rpx;
+		
+			.title-container {
+				justify-content: space-between;
+				margin-top: 8rpx;
+				margin-bottom: 16rpx;
+		
+				.title {
+					height: 48rpx;
+					align-items: center;
+		
+					.label {
+						color: #1684fc;
+						font-size: 32rpx;
+						font-weight: bold;
+		
+						&.code {
+							color: #000000;
+							margin-left: 32rpx;
+						}
+					}
+				}
+		
+			}
+		
+			.item-info {
+				margin-bottom: 16rpx;
+		
+				.label {
+					font-size: 28rpx;
+					width: 160rpx;
+					color: #808080;
+		
+					&.right {
+						flex: 1;
+						color: #000000;
+					}
+				}
+			}
+		
+			.right-info {
+				justify-content: flex-end;
+				margin-top: 2rpx;
+		
+				.label {
+					font-size: 28rpx;
+					color: #808080;
+				}
+			}
+		}
+	}
+
+	.tab-item.active {
+		color: rgba(25, 137, 250, 1);
+	}
+
+	.box-bg {
+		width: 94%;
+		background-color: #F5F5F5;
+		padding: 5rpx 16rpx;
+		height: 50px;
+		justify-content: space-around;
+		align-items: center;
+		margin: 24rpx auto 0;
+
+		.input-view {
+			width: 100%;
+			flex: 4;
+			background-color: #f8f8f8;
+			border: 1rpx solid #999;
+			border-radius: 15rpx;
+			padding: 0 15rpx;
+			flex-wrap: nowrap;
+			margin: 0 10rpx 0;
+
+			.input-uni-icon {
+				line-height: 60rpx;
+			}
+
+			.nav-bar-input {
+				width: 80%;
+				height: 30px;
+				line-height: 30px;
+				padding: 0 5rpx;
+				background-color: #f8f8f8;
+			}
+		}
+
+		.search {
+			width: 20%;
+			text-align: center;
+			color: #808080;
+		}
+	}
+
+	.tab-item.active {
+		color: rgba(25, 137, 250, 1);
+		font-weight: 700;
+	}
+
+	.selected {
+		border: 3rpx solid #c0c4fc;
+		background-color: #c0c4fc;
+		/* 选中之后样式 */
+	}
+
+
+
+	.top-btn-container {
+		margin: 8px 0 8px 0;
+		height: 40px;
+		padding: 0 16px;
+		align-items: center;
+		background-color: #fff;
+
+		.bottom-btn {
+			flex: 1;
+			font-size: 28rpx;
+			color: #FFFFFF;
+			background-color: #1684fc;
+		}
+	}
+
+	.bottom-btn-container {
+		height: 50px;
+		border-top: 1px solid #999999;
+		padding: 0 32px;
+		align-items: center;
+		background-color: #fff;
+
+		.bottom-btn {
+			flex: 1;
+			font-size: 28rpx;
+			color: #FFFFFF;
+			background-color: #1684fc;
+		}
+	}
+</style>

+ 679 - 0
pages/queryLotInfo/index.vue

@@ -0,0 +1,679 @@
+<template>
+	<view class="tab-container">
+		<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickTab(1)">批次信息</view>
+		<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickTab(2)">领料信息</view>
+		<view :class="['tab-item', isActiveId === 3 ? 'active': '']" @click="handleClickTab(3)">历史报工</view>
+		<view :class="['tab-item', isActiveId === 4 ? 'active': '']" @click="handleClickTab(4)">检查信息</view>
+		<view :class="['tab-item', isActiveId === 5 ? 'active': '']" @click="handleClickTab(5)">分选信息</view>
+	</view>
+	<scroll-view class="scroll-container" scroll-y scroll-with-animation :scroll-into-view="scrollToId"
+		:scroll-top="scrollTop" @scrolltoupper="handleScrollToUpper" @scrolltolower="handleScrollToLower"
+		@scroll="handleScroll">
+		<!-- 批次信息 -->
+		<view id="item1" class="scroll-item">
+			<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">批次信息</text>
+			</view>
+			<view v-if="lotData==null" class="no-date">
+				<text>暂无数据</text>
+			</view>
+			<view v-else >
+				<view class="item-info uni-row" style="margin-top: 16rpx;"> <text class="label">批次号:</text>
+					<text class="label right" style="font-size: 30rpx;color: black;">{{ lotData['lotCode'] }}</text>
+				</view>
+				<view class="item-info uni-row"> <text class="label">产品描述:</text>
+					<text class="label right ">{{ lotData['productDescription'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">箱号:</text>
+					<text class="label right">{{ lotData['carrierName']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">投产量:</text>
+					<text
+						class="label right">{{ lotData['prevProcess'] ? lotData['processQualifiedNum'] : lotData['productionQuantity']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">合格数量:</text>
+					<text class="label right">{{ lotData['totalQuantityNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">上道工序:</text>
+					<text
+						class="label right">{{ lotData.prevProcess && lotData['prevProcess'] != "" ? lotData['prevProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前工序:</text>
+					<view class="label right uni-row">
+						<text
+							class="label right">{{ lotData.currentProcess && lotData['currentProcess'] != "" ? lotData['currentProcess'].processAlias : '-'}}</text>
+						(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(lotData)">&nbsp;工艺列表&nbsp;
+						</view>)
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">下道工序:</text>
+					<text
+						class="label right">{{ lotData.nextProcess && lotData['nextProcess'] != "" ? lotData['nextProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前设备:</text>
+					<text
+						class="label right">{{ lotData['currentEquipmentCode'] && lotData['currentEquipmentCode'] != "" ? lotData['currentEquipmentCode'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前操作者:</text>
+					<text class="label right">{{ lotData['currentNickName']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">批次状态:</text>
+					<text
+						class="label right">{{ lotData['status'] == 1 ?"进行中":lotData['status'] == 3?"周转中":lotData['status'] == 2?"待周转":lotData['status'] == 4?"已送达":lotData['status'] == 5?"已完成":"未开始"}}</text>
+				</view>
+			</view>
+		</view>
+		<!-- 领料信息 -->
+		<view id="item2" class="scroll-item">
+			<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">领料信息</text></view>
+			<view v-if="furnaceData==null" class="no-date">
+				<text>暂无数据</text>
+			</view>
+			<view v-else>
+				<view class="item-info uni-row" style="margin-top: 16rpx;">
+					<text class="label">炉号</text>
+					<text id="manufacturer"
+						class="label right">{{furnaceData['furnaceNumber'] ? furnaceData['furnaceNumber'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">计划单号</text>
+					<text id="manufacturer"
+						class="label right">{{ furnaceData['productionPlanNo'] ? furnaceData['productionPlanNo'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">序号</text>
+					<text class="label right">{{ furnaceData['lineNumber'] ? furnaceData['lineNumber'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">厂家</text>
+					<text class="label right">{{ furnaceData['factory'] ? furnaceData['factory'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">牌号</text>
+					<text class="label right">{{ furnaceData['brandNumber'] ?furnaceData['brandNumber'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">规格</text>
+					<text class="label right">{{ furnaceData['spec'] ?furnaceData['spec'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">形状</text>
+					<text class="label right">{{ furnaceData['shape'] ?furnaceData['shape'] : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">材料直径</text>
+					<text class="label right">{{ furnaceData['diameter'] ? furnaceData['diameter'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">原料编码</text>
+					<text
+						class="label right">{{ furnaceData['rawMaterialCode'] ? furnaceData['rawMaterialCode'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">来料日期</text>
+					<text
+						class="label right">{{ furnaceData['incomingDate'] ? furnaceData['incomingDate'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">技术要求1</text>
+					<text
+						class="label right">{{ furnaceData['firstTechnicalRequirement'] ? furnaceData['firstTechnicalRequirement'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">技术要求2</text>
+					<text
+						class="label right">{{ furnaceData['secondTechnicalRequirement'] ?furnaceData['secondTechnicalRequirement'] : '-' }}</text>
+				</view>
+			</view>
+		</view>
+		<!-- 历史报工 -->
+		<view id="item3" class="scroll-item">
+			<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">历史报工</text></view>
+			<view v-if="historyData.length == 0" class="no-date">
+				<text>暂无数据</text>
+			</view>
+			<view v-for="(item, index) in historyData" :key="index" class="list-item" id="historyData">
+				<view class="item-info uni-row" style="margin-top: 16rpx;"> <text class="label ">工序:</text>
+					<text class="label right">{{ item['processAlias'] }}</text>
+				</view>
+				<view class="item-info uni-row"> <text class="label">投产量:</text>
+					<text class="label right ">{{ item['prodNum'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">合格数量:</text>
+					<text class="label right">{{ item['qualifiedNum']}}</text>
+				</view>
+				<view v-for="(info, index) in item.rejectList" :key="index">
+					<view class="item-info uni-row">
+						<text class="label">废品信息:</text>
+						<text class="label right">{{ info['reason']!=""?info['reason']:'-'}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">废品数量:</text>
+						<text class="label right">{{ info['rejectNum']}}</text>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">设备:</text>
+					<text class="label right">{{ item['equipmentDetailCode'] ?item['equipmentDetailCode']:'-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">操作者:</text>
+					<text class="label right">{{ item['nickName']}}</text>
+				</view>
+				<view v-if="index!=historyData.length-1" class='middle'>
+					<view class='segment'></view>
+					<view class='segment'></view>
+				</view>
+			</view>
+		</view>
+		<!-- 检查信息 -->
+		<view id="item4" class="scroll-item">
+			<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">检查信息</text></view>
+			<view v-if="inspectionData.length == 0" class="no-date">
+				<text>暂无数据</text>
+			</view>
+			<view v-else v-for="(item, index) in inspectionData" :key="index" class="list-item" id="inspectionData">
+
+				<view class="item-info uni-row" style="margin-top: 16rpx;"> <text class="label ">工序:</text>
+					<text class="label right">{{ item['processAlias'] }}</text>
+				</view>
+				<view class="item-info uni-row"> <text class="label">检查员:</text>
+					<text class="label right ">{{ item['nickName'] }}</text>
+				</view>
+				<view v-for="(info, index) in item.processInspectionDetails" :key="index">
+					<view class="item-info uni-row">
+						<text class="label">检测项目:</text>
+						<text class="label right">{{ info['checkStandard']}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">检测结果:</text>
+						<text class="label right">{{ info['checkResult'] !=""?info['checkResult'] :'-'}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">废品数量:</text>
+						<text class="label right">{{ info['rejectNum']}}</text>
+					</view>
+				</view>
+				<view v-for="(data, index) in item.dayworkItemConsults" :key="index">
+					<view class="item-info uni-row">
+						<text class="label">咨询信息:</text>
+						<text class="label right">{{ data['content']}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">咨询结果:</text>
+						<text class="label right">{{ data['status'] == 0?"未回复":data['status'] == 1?"不合格":"合格"}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">技术人员:</text>
+						<text class="label right">{{ data['technicianName']}}</text>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">备注:</text>
+					<text class="label right">{{ item['remark'] !="" ?item['remark']:'-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">序检结果:</text>
+					<text class="label right">{{ item['status'] == 0?"待确认":item['status'] == 1?"合格":"不合格"}}</text>
+				</view>
+				<view v-if="index!=inspectionData.length -1" class='middle'>
+					<view class='segment'></view>
+					<view class='segment'></view>
+				</view>
+			</view>
+		</view>
+		<!-- 分选信息 -->
+		<view id="item5" class="scroll-item">
+			<view> <text style="font-size: 32rpx;display: flex;justify-content: center;">分选信息</text></view>
+			<view v-if="sortData.length == 0" class="no-date">
+				<text>暂无数据</text>
+			</view>
+			<view v-else v-for="(item, index) in sortData" :key="index" class="list-item" id="sortData">
+
+				<view class="item-info uni-row" style="margin-top: 16rpx;"> <text class="label ">工序:</text>
+					<text class="label right">{{ item['processAlias'] }}</text>
+				</view>
+				<view class="item-info uni-row"> <text class="label">分选人员:</text>
+					<text class="label right ">{{ item['nickName'] }}</text>
+				</view>
+				<view v-for="(info, index) in item.rejectList" :key="index">
+					<view class="item-info uni-row">
+						<text class="label">检测项目:</text>
+						<text class="label right">{{ info['checkStandard']}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">检测结果:</text>
+						<text class="label right">{{ info['reason'] !=""?info['reason'] :'-'}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">废品数量:</text>
+						<text class="label right">{{ info['rejectNum']}}</text>
+					</view>
+				</view>
+				<view v-for="(data, index) in item.consults" :key="index">
+					<view class="item-info uni-row">
+						<text class="label">咨询信息:</text>
+						<text class="label right">{{ data['content']}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">咨询结果:</text>
+						<text class="label right">{{ data['status'] == 0?"未回复":data['status'] == 1?"不合格":"合格"}}</text>
+					</view>
+					<view class="item-info uni-row">
+						<text class="label">技术人员:</text>
+						<text class="label right">{{ data['technicianName']}}</text>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">备注:</text>
+					<text class="label right">{{ item['remark'] !="" ?item['remark']:'-'}}</text>
+				</view>
+				<view v-if="index!=sortData.length -1" class='middle'>
+					<view class='segment'></view>
+					<view class='segment'></view>
+				</view>
+			</view>
+		</view>
+		<uni-drawer ref="showRight" mode="right" :mask-click="true">
+				<view style="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;">工艺列表</view>
+				<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
+					仅显示当前工序及后面工艺
+				</view>
+				<scroll-view scroll-y="true" style="height: 82%;" @touchmove.stop>
+					<view v-for="(item,index) in curProcessAfte" :key="index"
+						style="padding: 8rpx 5% 8rpx 14%; border-top: 1px solid #cccccc">
+						<text>{{ index + 1 }}.{{item.processAlias}}</text>
+					</view>
+				</scroll-view>
+			</uni-drawer>
+	</scroll-view>
+	<view class="bottom-btn-container uni-row">
+		<button class="bottom-btn" @click="init()">扫码查询</button>
+	</view>
+	<dialog-selectLot ref="selectLotDialog" @submit="handleDoIt" />
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getLotInformation
+	} from '@/api/business/dayWork.js'
+	import {
+		getFurnaceNoInfoByDaywork
+	} from '@/api/business/furnaceNoInfo.js'
+	import {
+		getDayworkCarrierByCarrierCode
+	} from '@/api/business/dayworkCarrier.js'
+	import {
+		getDayworkItemByDayworkId,
+		getSortItemByDayworkId
+	} from '@/api/business/dayWorkItem.js'
+	import {
+		getProcessInspectionByDayworkId
+	} from '@/api/business/processInspection.js'
+
+	const scrollTop = ref(0)
+	// scrollToId 默认值为空
+	const scrollToId = ref('')
+	const selectLotDialog = ref(null)
+	const selectedInfo = ref({})
+	const curProcessAfte = ref([])
+	const lotData = ref(null) //批次信息
+	const furnaceData = ref(null) //领料信息
+	const historyData = ref([]) //历史报工
+	const inspectionData = ref([]) //检查信息
+	const sortData = ref([]) //分选信息
+	const showRight = ref(null) // 抽屉
+	const dayworkId = ref(null)
+	const isActiveId = ref(1)
+	// 查询主对象
+	let query = null
+	// 定义tab2的【SelectorQuery】对象
+	let item2Query = null
+
+	// 定义tab3的【SelectorQuery】对象
+	let item3Query = null
+
+	// 定义tab4的【SelectorQuery】对象
+	let item4Query = null
+
+	onLoad(() => {
+		init();
+	})
+
+	function init() {
+		handleScanCode()
+	}
+	onReady(() => {
+		query = uni.createSelectorQuery().in(this)
+		// 获取 tab2 的【SelectorQuery】,一定要在页面加载完之后,获取该对象,不要在【滚动】事件中获取,
+		// 那会创建很多个【SelectorQuery】,导致效率低下
+		item2Query = query.select("#item2").boundingClientRect((data) => {
+			if (data.top >= 32 && data.top <= 80) {
+				isActiveId.value = 2
+			}
+		})
+		item3Query = query.select("#item3").boundingClientRect((data) => {
+			if (data.top >= 32 && data.top <= 80) {
+				isActiveId.value = 3
+			}
+		})
+		item4Query = query.select("#item4").boundingClientRect((data) => {
+			if (data.top >= 32 && data.top <= 80) {
+				isActiveId.value = 4
+			}
+		})
+	})
+	//扫码
+	function handleScanCode() {
+		//引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			console.log(ret);
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getDayworkCarrierByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					if(response.data.length>0) {
+		// 						if(response.data.length > 1){
+		// 						selectLotDialog.value.open(response.data);
+		// 						}else{
+		// 							handleDoIt(response.data[0])
+		// 						}
+		// 					}
+		// 					else {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: "该箱未绑定批次,请重新扫码",
+		// 							duration: 2000
+		// 						})
+		// 					}
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 测试时用
+		getDayworkCarrierByCarrierCode({
+			carrierCode: '000022'
+		}).then(res => {
+			if (res.code == 200) {
+				if (res.data.length > 0) {
+					if(res.data.length > 1){
+					selectLotDialog.value.open(res.data);
+					}else{
+						handleDoIt(res.data[0])
+					}
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: "该箱未绑定批次,请重新扫码",
+						duration: 2000
+					})
+				}
+			}
+		})
+		// }
+	}
+
+	function handleDoIt(data) {
+		dayworkId.value = data.value
+		getLotInfo()
+		getFurnaceInfo()
+		getHistoryReport()
+		getInspection()
+		getSortReport()
+	}
+	//查询批次信息
+	function getLotInfo() {
+		getLotInformation({
+			id: dayworkId.value,
+		}).then(response => {
+			if (response.code == 200) {
+				lotData.value = response.data
+			}
+		})
+	}
+	//查询领料信息
+	function getFurnaceInfo() {
+		getFurnaceNoInfoByDaywork({
+			dayworkId: dayworkId.value
+		}).then(response => {
+			if (response.code == 200) {
+				furnaceData.value = response.data
+			}
+		})
+	}
+	//查询历史报工
+	function getHistoryReport() {
+		getDayworkItemByDayworkId({
+			dayworkId: dayworkId.value
+		}).then(response => {
+			if (response.code == 200) {
+				historyData.value = response.data
+			}
+		})
+	}
+	//查询检查信息
+	function getInspection() {
+		getProcessInspectionByDayworkId({
+			dayworkId: dayworkId.value
+		}).then(response => {
+			if (response.code == 200) {
+				inspectionData.value = response.data
+			}
+		})
+	}
+	//查询分选信息
+	function getSortReport() {
+		getSortItemByDayworkId({
+			dayworkId: dayworkId.value
+		}).then(response => {
+			if (response.code == 200) {
+				sortData.value = response.data
+			}
+		})
+	}
+
+	function handleClickProcessList(item) {
+		let curProcessAfterList = [];
+		console.log("工序列表", item)
+
+		let nextIndex = 0;
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (item.currentProcess.processStepNumber == item.processSequence[i].processStepNumber) {
+				nextIndex = i;
+			}
+		}
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (i >= nextIndex) {
+				curProcessAfterList.push(item.processSequence[i]);
+			}
+		}
+		if (item.status == 3) {
+			curProcessAfterList.splice(0, 1)
+		}
+		console.log(curProcessAfterList)
+		curProcessAfte.value = curProcessAfterList;
+		showRight.value.open();
+	}
+	const handleClickTab = (val) => {
+		//scrollTop.value = top
+		scrollToId.value = 'item' + val
+		isActiveId.value = val
+	}
+	const handleScrollToUpper = () => {
+		isActiveId.value = 1
+	}
+	const handleScrollToLower = () => {
+		isActiveId.value = 5
+	}
+	const handleScroll = () => {
+		// 在滚动时候,把scrollToId的值清空,否则,会有点击tab,页面不滚动的情况,比如:先点击了tab1,然后滚动到最低端,这时候,再点击tab1,将没反应。
+		// 原因是:scroll-view 的 【scroll-into-view】属性值未改变时,将不会触发滚动
+		scrollToId.value = ''
+
+		// 这里的item2Query……等对象,必须在最外层定义好,滚动的时候,只获取结果,执行回调
+		item2Query.exec()
+		item3Query.exec()
+		item4Query.exec()
+	}
+</script>
+
+<style lang="scss">
+	.tab-container {
+		display: flex;
+		flex-direction: row;
+		height: 32px;
+
+		.tab-item {
+			display: flex;
+			flex-direction: row;
+			flex: 1;
+			font-size: 14px;
+			color: #666;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+
+	.scroll-container {
+		height: calc(100% - 82px);
+		background-color: #f5f5f5;
+	}
+
+	.tab-item.active {
+		color: rgba(25, 137, 250, 1);
+		font-weight: 700;
+	}
+
+	.scroll-item {
+		background-color: #fff;
+		padding: 24rpx;
+		margin: 0 24rpx;
+		margin-top: 24rpx;
+		margin-bottom: 24rpx;
+		border-radius: 8rpx;
+
+		.no-date {
+			text-align: center;
+			font-size: 12px;
+			color: #666;
+			padding-top: 16px;
+		}
+
+		.title-container {
+			justify-content: space-between;
+			margin-top: 8rpx;
+			margin-bottom: 16rpx;
+
+			.title {
+				height: 48rpx;
+				align-items: center;
+
+				.label {
+					color: #1684fc;
+					font-size: 32rpx;
+					font-weight: bold;
+
+					&.code {
+						color: #000000;
+						margin-left: 32rpx;
+					}
+				}
+			}
+
+		}
+
+		.middle {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			justify-content: center
+		}
+
+		.segment {
+			width: 80%;
+			background-color: rgba(213, 213, 213, 1);
+			border: 1rpx solid rgba(213, 213, 213, 1);
+			margin:16px 0;
+		}
+
+		.item-info {
+			margin-bottom: 16rpx;
+
+			.label {
+				font-size: 28rpx;
+				width: 160rpx;
+				color: #808080;
+
+				&.right {
+					flex: 1;
+					color: #000000;
+				}
+			}
+		}
+
+		.right-info {
+			justify-content: flex-end;
+			margin-top: 2rpx;
+
+			.label {
+				font-size: 28rpx;
+				color: #808080;
+			}
+		}
+	}
+
+	.bottom-btn-container {
+		height: 50px;
+		border-top: 1px solid #999999;
+		padding: 0 32px;
+		align-items: center;
+		background-color: #fff;
+
+		.bottom-btn {
+			flex: 1;
+			font-size: 28rpx;
+			color: #FFFFFF;
+			background-color: #1684fc;
+		}
+	}
+</style>

+ 1 - 1
pages/reportingForWork/index.vue

@@ -63,7 +63,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="top">
+		<view class="top" v-if="flag" >
 			<button class="top-btn" @click="HandleSeleteInviteUser(listData)"><text class="label">邀请报工</text></button>
 		</view>
 		<view class="bottom uni-row">

+ 49 - 0
uni_modules/zxz-uni-data-select/changelog.md

@@ -0,0 +1,49 @@
+## 1.0.20(2024-05-09)
+1.修复APP点击下拉框无法关闭
+## 1.0.19(2024-04-29)
+1.修复点击多个下拉框无法关闭
+2.优化多选类型支持一次选择多个
+3.修复小程序点击有个蓝色底
+4.优化下拉菜单溢出屏幕底部时改为向上弹出
+## 1.0.15(2023-11-24)
+1.优化多选选中样式(tianheng20**qq.com网友提供)
+2.优化chang事件(chang事件中将返回所选中的对象)
+## 1.0.14(2023-10-25)
+优化vue3延时添加未渲染问题,处理37;分号警告问题
+## 1.0.13(2023-10-12)
+优化mixinDatacomResData报错和defValue报错
+## 1.0.12(2023-09-27)
+修复搜索输入内容的时候下拉框的箭头会跑到文本框前面去
+优化当有选中项时不显示清除按钮
+## 1.0.11(2023-09-05)
+更换change事件执行顺序
+修复多选更改值时未即时更改下拉框选项
+修复单选搜索框选中了
+修复多选筛选输入时点击其他未清空筛选值
+## 1.0.10(2023-08-29)
+修复单选搜索回显问题
+## 1.0.9(2023-08-28)
+更新文档
+## 1.0.8(2023-08-28)
+更新文档
+## 1.0.7(2023-08-16)
+修复组件禁用bug
+修复数据回显问题
+添加多选搜索功能
+## 1.0.6(2023-08-05)
+修复清空值多选下拉列表还是被选中bug
+## 1.0.5(2023-07-10)
+修复多选初始化异步数据不显示问题
+## 1.0.4(2023-07-07)
+修复微信小程序多选显示兼容问题
+## 1.0.3(2023-07-06)
+修复bug
+多选情况下   初始化之后重新选择第一个不显示
+## 1.0.2(2023-07-06)
+更新VUE3兼容
+## 1.0.1(2023-06-30)
+添加多选合并功能
+## 1.0.0(2023-06-16)
+添加下拉框检索,多选功能,自定义数据
+## 1.0.4(2023-06-16)
+ 添加下拉框检索,多选功能,自定义数据

+ 823 - 0
uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue

@@ -0,0 +1,823 @@
+<template>
+	<view class="uni-stat__select">
+		<!-- hide-on-phone -->
+		<span v-if="label" class="uni-label-text">{{label + ':'}}</span>
+		<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
+			<view class="uni-select" :style="{height:multiple?'100%':' 35px'}"
+				:class="{'uni-select--disabled':disabled}">
+				<view class="uni-select__input-box" :style="{height:multiple?'100%':'35px'}" @click="toggleSelector">
+					<view class="" style="display: flex;flex-wrap: wrap;width: 100%;" v-if="multiple&&current.length>0">
+						<view class="tag-calss"
+							v-for="(item,index) in collapseTags?current.slice(0,collapseTagsNum):current"
+							:key="item[dataValue]">
+							<span class="text">{{item[dataKey]}}</span>
+							<view class="" @click.stop="delItem(item)">
+								<uni-icons type="clear" style="margin-left: 4px;" color="#c0c4cc" />
+							</view>
+						</view>
+						<view v-if="current.length>collapseTagsNum&&collapseTags" class="tag-calss">
+							<span class="text">+{{current.length-collapseTagsNum}}</span>
+						</view>
+						<input v-if="filterable&&!disabled" @input="inputChange" class="uni-select__input-text"
+							type="text" style="font-size: 12px;height: 52rpx;margin-left: 6px;width: auto;"
+							placeholder="请输入" v-model="filterInput">
+					</view>
+					<view v-else-if="current&&current.length>0&&!showSelector" class="uni-select__input-text">
+						{{current}}
+					</view>
+					<input v-else-if="filterable&&showSelector" :focus="isFocus" @input="inputChange"
+						:disabled="disabled" @click.stop="" class="uni-select__input-text" type="text"
+						style="font-size: 12px;position: absolute;z-index: 1;" :placeholder="placeholderOld"
+						v-model="filterInput">
+					<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
+					<uni-icons v-if="(current.length>0 && clear&&!disabled)||(currentArr.length>0&&clear&&!disabled)"
+						type="clear" color="#c0c4cc" size="24" style="position: absolute;right: 0;" @click="clearVal" />
+					<uni-icons style="right: 0;position: absolute;" v-else :type="showSelector? 'top' : 'bottom'"
+						size="14" color="#999" />
+				</view>
+				<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
+				<view class="uni-select__selector"
+					:class="isDown?'uni-select__selector__down':'uni-select__selector__upwards'" v-if="showSelector">
+					<view class="uni-popper__arrow"></view>
+					<scroll-view scroll-y="true" class="uni-select__selector-scroll">
+						<view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0">
+							<span>{{emptyTips}}</span>
+						</view>
+						<view v-else :class="['uni-select__selector-item', {'uni-select_selector-item_active' :multiple
+							&& currentArr.includes(item[dataValue])}]"
+							style="display: flex;justify-content: space-between;align-items: center;"
+							v-for="(item,index) in filterMixinDatacomResData" :key="index" @click="change(item)">
+							<span
+								:class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</span>
+							<uni-icons v-if="multiple&&currentArr.includes(item[dataValue])" type="checkmarkempty"
+								color="#007aff" />
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * DataChecklist 数据选择器
+	 * @description 通过数据渲染的下拉框组件
+	 * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
+	 * @property {String} collapseTagsNum 多选时选中值按文字的形式展示的数量
+	 * @property {String} collapseTags 多选时是否将选中值按文字的形式展示
+	 * @property {String} dataKey 作为 key 唯一标识的键名
+	 * @property {String} dataValue 作为 value 唯一标识的键名
+	 * @property {Array} multiple 是否多选
+	 * @property {Array} filterable 是否开启搜索
+	 * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
+	 * @property {Boolean} clear 是否可以清空已选项
+	 * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
+	 * @property {String} label 左侧标题
+	 * @property {String} placeholder 输入框的提示文字
+	 * @property {Boolean} disabled 是否禁用
+	 * @event {Function} change  选中发生变化触发
+	 */
+
+	export default {
+		name: "uni-stat-select",
+		mixins: [uniCloud.mixinDatacom || {}],
+		props: {
+			collapseTagsNum: {
+				type: Number,
+				default: 1
+			},
+			collapseTags: {
+				type: Boolean,
+				default: false
+			},
+			dataKey: {
+				type: [String],
+				default: 'text'
+			},
+			dataValue: {
+				type: [String],
+				default: 'value'
+			},
+			multiple: {
+				type: Boolean,
+				default: false
+			},
+			filterable: {
+				type: Boolean,
+				default: false
+			},
+			localdata: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			// #ifndef VUE3
+			value: {
+				type: [String, Number, Array],
+				default: ''
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue: {
+				type: [String, Number, Array],
+				default: ''
+			},
+			// #endif
+			label: {
+				type: String,
+				default: ''
+			},
+			placeholder: {
+				type: String,
+				default: '请选择'
+			},
+			emptyTips: {
+				type: String,
+				default: '无选项'
+			},
+			clear: {
+				type: Boolean,
+				default: true
+			},
+			defItem: {
+				type: Number,
+				default: 0
+			},
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
+			format: {
+				type: String,
+				default: ''
+			},
+		},
+		data() {
+			return {
+				showSelector: false,
+				current: [],
+				mixinDatacomResData: [],
+				apps: [],
+				channels: [],
+				cacheKey: "uni-data-select-lastSelectedValue",
+				placeholderOld: "",
+				currentArr: [],
+				filterInput: "",
+				isFocus: false,
+				windowHeight:0,
+				isDown:true,//下拉框是否朝下
+			};
+		},
+		created() { 
+			this.windowHeight=uni.getSystemInfoSync().windowHeight
+			if (this.multiple) {
+				// #ifndef VUE3
+				this.currentArr = this.value || []
+				// #endif
+				// #ifdef VUE3
+				this.currentArr = this.modelValue || []
+				// #endif
+				if (this.current.length > 0) {
+					this.current = []
+				}
+				// #ifndef VUE3
+				if (this.value && this.value.length > 0 && this.filterMixinDatacomResData.length > 0) {
+					this.current = this.value.map(item => {
+						let current = this.mixinDatacomResData.find(e =>
+							e[this.dataValue] == item
+						)
+						return {
+							...current
+						}
+					})
+				}
+				// #endif
+				// #ifdef VUE3
+				if (this.modelValue && this.modelValue.length > 0 && this.filterMixinDatacomResData.length > 0) {
+					this.current = this.modelValue.map(item => {
+						let current = this.mixinDatacomResData.find(e =>
+							e[this.dataValue] == item
+						)
+						return {
+							...current
+						}
+					})
+				}
+				// #endif
+
+			} else {
+
+				// #ifndef VUE3
+				if (this.value || this.value == 0) {
+					this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
+						e[this.dataValue] == this.value
+					))
+				}
+				// #endif
+				// #ifdef VUE3
+				if (this.modelValue || this.value == 0) {
+					this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
+						e[this.dataValue] == this.modelValue
+					))
+				}
+				// #endif
+			}
+			this.placeholderOld = this.placeholder
+			this.debounceGet = this.debounce(() => {
+				this.query();
+			}, 300);
+			if (this.collection && !this.localdata.length) {
+				this.debounceGet();
+			}
+		},
+		computed: {
+			filterMixinDatacomResData() {
+				if (this.filterable && this.filterInput) {
+					return this.mixinDatacomResData.filter(e => e[this.dataKey].includes(this.filterInput))
+				} else {
+					return this.mixinDatacomResData
+				}
+			},
+			typePlaceholder() {
+				const text = {
+					'opendb-stat-app-versions': '版本',
+					'opendb-app-channels': '渠道',
+					'opendb-app-list': '应用'
+				}
+				const common = this.placeholder
+				const placeholder = text[this.collection]
+				return placeholder ?
+					common + placeholder :
+					common
+			},
+			valueCom() {
+				// #ifdef VUE3
+				return this.modelValue;
+				// #endif
+				// #ifndef VUE3
+				return this.value;
+				// #endif
+			}
+		},
+		watch: {
+			localdata: {
+				immediate: true,
+				handler(val, old) {
+					if (Array.isArray(val) && old !== val) {
+						this.mixinDatacomResData = val || []
+					}
+
+				}
+			},
+			valueCom: {
+				handler(newVal, oldVal) {
+					// console.log(newVal, oldVal);
+					this.initDefVal()
+				},
+				deep: true,
+				immediate: true
+			},
+			mixinDatacomResData: {
+				immediate: true,
+				handler(val) {
+					if (val.length) {
+						this.initDefVal()
+					}
+				}
+			},
+		},
+		methods: {
+			getIsDown(){
+				const query = uni.createSelectorQuery().in(this);
+				const _this=this
+				query
+				  .select(".uni-stat-box")
+				  .boundingClientRect((data) => {
+					if(_this.windowHeight-data.top>200){
+						_this.isDown=true
+					}else{
+						_this.isDown=false
+					}
+				  })
+				  .exec();
+			},
+			debounce(fn, time = 100) {
+				let timer = null
+				return function(...args) {
+					if (timer) clearTimeout(timer)
+					timer = setTimeout(() => {
+						fn.apply(this, args)
+					}, time)
+				}
+			},
+			// 执行数据库查询
+			query() {
+				this.mixinDatacomEasyGet();
+			},
+			// 监听查询条件变更事件
+			onMixinDatacomPropsChange() {
+				if (this.collection) {
+					this.debounceGet();
+				}
+			},
+			initDefVal() {
+				let defValue = ''
+				if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
+					defValue = this.valueCom
+				} else {
+					let strogeValue
+					if (this.collection) {
+						strogeValue = this.getCache()
+					}
+					if (strogeValue || strogeValue === 0) {
+						defValue = strogeValue
+					} else {
+						let defItem = ''
+						if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
+							defItem = this.mixinDatacomResData[this.defItem - 1][this.dataValue]
+						}
+						defValue = defItem
+					}
+					if (defValue || defValue === 0) {
+						this.emit(defValue)
+					}
+				}
+				if (this.multiple) {
+					const mixinDatacomResData = this.mixinDatacomResData || []
+					if (!defValue) defValue = []
+					this.current = defValue.map(item => {
+						const current = mixinDatacomResData.find(e => {
+							return e[this.dataValue] == item
+						})
+						return {
+							...current
+						}
+					})
+					this.currentArr = this.current.map(e => e[this.dataValue])
+					if (defValue.length < 1) {
+						this.currentArr = []
+					}
+				} else {
+					const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
+					this.current = def ? this.formatItemName(def) : ''
+				}
+			},
+			/**
+			 * @param {[String, Number]} value
+			 * 判断用户给的 value 是否同时为禁用状态
+			 */
+			isDisabled(value) {
+				let isDisabled = false;
+
+				this.mixinDatacomResData.forEach(item => {
+					if (item[this.dataValue] === value) {
+						isDisabled = item.disable
+					}
+				})
+				return isDisabled;
+			},
+			inputChange(e) {
+				this.$emit('inputChange', e.detail.value)
+			},
+			clearVal() {
+				if (this.disabled) {
+					return
+				}
+				if (this.multiple) {
+					this.current = []
+					this.currentArr = []
+					this.emit([])
+				} else {
+					this.current = ""
+					this.currentArr = []
+					this.emit('')
+				}
+				if (this.collection) {
+					this.removeCache()
+				}
+				this.placeholderOld = this.placeholder
+				this.filterInput = ""
+			},
+			change(item) {
+				if (!item.disable) {
+					if (this.multiple) {
+						if (!this.current) {
+							this.current = []
+						}
+						if (!this.currentArr) {
+							this.currentArr = []
+						}
+						if (this.currentArr.includes(item[this.dataValue])) {
+							let index = this.current.findIndex(e => {
+								return e[this.dataValue] == item[this.dataValue]
+							})
+							this.current.splice(index, 1)
+							this.currentArr.splice(index, 1)
+							this.emit(this.current)
+						} else {
+							this.current.push(item)
+							this.currentArr.push(item[this.dataValue])
+							this.emit(this.current)
+
+						}
+						this.filterInput = ""
+					} else {
+						this.showSelector = false
+						this.current = this.formatItemName(item)
+						if (this.filterable) {
+							this.filterInput = item[this.dataKey]
+						}
+						this.emit(item[this.dataValue])
+					}
+				}
+			},
+			delItem(item) {
+				if (this.disabled) {
+					return
+				}
+				if (this.currentArr.includes(item[this.dataValue])) {
+					let index = this.current.findIndex(e => {
+						return e[this.dataValue] == item[this.dataValue]
+					})
+					this.current.splice(index, 1)
+					this.currentArr.splice(index, 1)
+					this.emit(this.current)
+				}
+			},
+			emit(val) {
+				if (this.multiple) {
+					this.$emit('input', this.currentArr)
+					this.$emit('update:modelValue', this.currentArr)
+					const currentArr = this.mixinDatacomResData.filter(item => this.currentArr.includes(item[this
+						.dataValue]))
+					this.$emit('change', currentArr)
+				} else {
+					this.$emit('input', val)
+					this.$emit('update:modelValue', val)
+					const current = this.mixinDatacomResData.find(item => val == item[this.dataValue])
+					console.log(current);
+					this.$emit('change', current)
+				}
+				if (this.collection) {
+					this.setCache(val);
+				}
+			},
+			toggleSelector() {
+				if (this.disabled) {
+					return
+				}
+				// if (this.filterable && this.filterInput && this.mixinDatacomResData.findIndex(e => {
+				// 		return e[this.dataKey] == this
+				// 			.filterInput
+				// 	}) < 0) {
+				// 	if (!this.multiple) {
+				// 		this.filterInput = ""
+				// 	}
+
+				// }
+				this.getIsDown()
+				this.showSelector = !this.showSelector
+				this.isFocus = this.showSelector
+				if (this.filterable && this.current && this.showSelector) {
+					if (!this.multiple) {
+						this.placeholderOld = this.current
+						// this.filterInput = ""
+					}
+				} else if (this.filterable && !this.current && !this.showSelector) {
+					if (this.placeholderOld != this.placeholder) {
+						if (!this.multiple) {
+							this.current = this.placeholderOld
+						}
+					}
+				}
+				this.filterInput = ""
+
+			},
+			formatItemName(item) {
+				if (!item) {
+					return ""
+				}
+				let text = item[this.dataKey]
+				let value = item[this.dataValue]
+				let {
+					channel_code
+				} = item
+				channel_code = channel_code ? `(${channel_code})` : ''
+				if (this.format) {
+					// 格式化输出
+					let str = "";
+					str = this.format;
+					for (let key in item) {
+						str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
+					}
+					return str;
+				} else {
+					return this.collection.indexOf('app-list') > 0 ?
+						`${text}(${value})` :
+						(
+							text ?
+							text :
+							`未命名${channel_code}`
+						)
+				}
+			},
+			// 获取当前加载的数据
+			getLoadData() {
+				return this.mixinDatacomResData;
+			},
+			// 获取当前缓存key
+			getCurrentCacheKey() {
+				return this.collection;
+			},
+			// 获取缓存
+			getCache(name = this.getCurrentCacheKey()) {
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				return cacheData[name];
+			},
+			// 设置缓存
+			setCache(value, name = this.getCurrentCacheKey()) {
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				cacheData[name] = value;
+				uni.setStorageSync(this.cacheKey, cacheData);
+			},
+			// 删除缓存
+			removeCache(name = this.getCurrentCacheKey()) {
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				delete cacheData[name];
+				uni.setStorageSync(this.cacheKey, cacheData);
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	$uni-base-color: #6a6a6a !default;
+	$uni-main-color: #333 !default;
+	$uni-secondary-color: #909399 !default;
+	$uni-border-3: #e5e5e5;
+
+
+	/* #ifndef APP-NVUE */
+	@media screen and (max-width: 500px) {
+		.hide-on-phone {
+			display: none;
+		}
+	}
+
+	/* #endif */
+	.uni-stat__select {
+		display: flex;
+		align-items: center;
+		// padding: 15px;
+		// cursor: pointer;
+		width: 100%;
+		flex: 1;
+		box-sizing: border-box;
+	}
+
+	.uni-stat-box {
+		width: 100%;
+		flex: 1;
+	}
+
+	.uni-stat__actived {
+		width: 100%;
+		flex: 1;
+		// outline: 1px solid #2979ff;
+	}
+
+	.uni-label-text {
+		font-size: 14px;
+		font-weight: bold;
+		color: $uni-base-color;
+		margin: auto 0;
+		margin-right: 5px;
+	}
+
+	.uni-select {
+		font-size: 14px;
+		border: 1px solid $uni-border-3;
+		box-sizing: border-box;
+		border-radius: 4px;
+		padding: 0 5px;
+		padding-left: 10px;
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		user-select: none;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		border-bottom: solid 1px $uni-border-3;
+		width: 100%;
+		flex: 1;
+		height: 35px;
+		min-height: 35px;
+
+		&--disabled {
+			background-color: #f5f7fa;
+			cursor: not-allowed;
+		}
+	}
+
+	.uni-select__label {
+		font-size: 16px;
+		// line-height: 22px;
+		min-height: 35px;
+		height: 35px;
+		padding-right: 10px;
+		color: $uni-secondary-color;
+	}
+
+	.uni-select__input-box {
+		width: 100%;
+		height: 35px;
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		align-items: center;
+
+		.tag-calss {
+			font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+			font-weight: 400;
+			-webkit-font-smoothing: antialiased;
+			-webkit-tap-highlight-color: transparent;
+			font-size: 12px;
+			border: 1px solid #d9ecff;
+			border-radius: 4px;
+			white-space: nowrap;
+			height: 24px;
+			padding: 0 4px 0px 8px;
+			line-height: 22px;
+			box-sizing: border-box;
+			margin: 2px 0 2px 6px;
+			display: flex;
+			max-width: 100%;
+			align-items: center;
+			background-color: #f4f4f5;
+			border-color: #e9e9eb;
+			color: #909399;
+
+			.text {
+				font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+				font-weight: 400;
+				-webkit-font-smoothing: antialiased;
+				-webkit-tap-highlight-color: transparent;
+				font-size: 12px;
+				white-space: nowrap;
+				line-height: 22px;
+				color: #909399;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+		}
+	}
+
+	.uni-select__input {
+		flex: 1;
+		font-size: 14px;
+		height: 22px;
+		line-height: 22px;
+	}
+
+	.uni-select__input-plac {
+		font-size: 14px;
+		color: $uni-secondary-color;
+	}
+
+	.uni-select__selector__down {
+		top: calc(100% + 12px);
+
+		.uni-popper__arrow {
+			transform: rotateX(0deg);
+			top: -6px;
+		}
+	}
+
+	.uni-select__selector__upwards {
+		bottom: calc(100% + 12px);
+
+		.uni-popper__arrow {
+			transform: rotateX(180deg);
+			bottom: -6px;
+		}
+	}
+
+	.uni-select__selector {
+		/* #ifndef APP-NVUE */
+		box-sizing: border-box;
+		/* #endif */
+		position: absolute;
+
+		left: 0;
+		width: 100%;
+		background-color: #FFFFFF;
+		border: 1px solid #EBEEF5;
+		border-radius: 6px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+		z-index: 3;
+		padding: 4px 0;
+	}
+
+	.uni-select__selector-scroll {
+		/* #ifndef APP-NVUE */
+		max-height: 200px;
+		box-sizing: border-box;
+		/* #endif */
+	}
+
+	.uni-select__selector-empty,
+	.uni-select__selector-item {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		// cursor: pointer;
+		/* #endif */
+		line-height: 35px;
+		font-size: 14px;
+		text-align: center;
+		/* border-bottom: solid 1px $uni-border-3; */
+		padding: 0px 10px;
+	}
+
+	.uni-select__selector-item:hover {
+		background-color: #f9f9f9;
+	}
+
+	.uni-select__selector-empty:last-child,
+	.uni-select__selector-item:last-child {
+		/* #ifndef APP-NVUE */
+		border-bottom: none;
+		/* #endif */
+	}
+
+	.uni-select_selector-item_active {
+		color: #409eff;
+		font-weight: bold;
+		background-color: #f5f7fa;
+		border-radius: 3px;
+	}
+
+	.uni-select__selector__disabled {
+		opacity: 0.4;
+		cursor: default;
+	}
+
+	/* picker 弹出层通用的指示小三角 */
+	.uni-popper__arrow,
+	.uni-popper__arrow::after {
+		position: absolute;
+		display: block;
+		width: 0;
+		height: 0;
+		border-color: transparent;
+		border-style: solid;
+		border-width: 6px;
+	}
+
+	.uni-popper__arrow {
+		filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+
+		left: 10%;
+		margin-right: 3px;
+		border-top-width: 0;
+		border-bottom-color: #EBEEF5;
+	}
+
+	.uni-popper__arrow::after {
+		content: " ";
+		top: 1px;
+		margin-left: -6px;
+		border-top-width: 0;
+		border-bottom-color: #fff;
+	}
+
+	.uni-select__input-text {
+		// width: 280px;
+		width: 90%;
+		color: $uni-main-color;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		-o-text-overflow: ellipsis;
+		overflow: hidden;
+	}
+
+	.uni-select__input-placeholder {
+		color: $uni-base-color;
+		font-size: 12px;
+	}
+
+	.uni-select--mask {
+		position: fixed;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		left: 0;
+		z-index: 2;
+	}
+</style>

+ 86 - 0
uni_modules/zxz-uni-data-select/package.json

@@ -0,0 +1,86 @@
+{
+  "id": "zxz-uni-data-select",
+  "displayName": "zxz-uni-data-select 下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)",
+  "version": "1.0.20",
+  "description": "通过数据驱动的下拉框选择器(添加下拉框检索,多选功能,多选搜索功能,自定义数据)",
+  "keywords": [
+    "uni-ui",
+    "select",
+    "uni-data-select",
+    "下拉框",
+    "下拉选择框"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.1"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-load-more"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y",
+        "alipay": "n"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+        "QQ": "y",
+        "京东": "y"
+        },
+        "快应用": {
+          "华为": "y",
+          "联盟": "y"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 37 - 0
uni_modules/zxz-uni-data-select/readme.md

@@ -0,0 +1,37 @@
+## DataSelect 下拉框选择器  <strong style="color:orangered;"><em>先导入示例项目</em></strong>  看看是否满足需求,然后再下载插件,有问题可以加微<strong style="color:orangered;"><em>weiyila520</em></strong>
+> **组件名:zxz-uni-data-select**
+> 代码块: `zxz-uni-data-select`
+
+本插件基于官方插件 [uni-data-select](https://ext.dcloud.net.cn/plugin?id=7993) 进行二次开发拓展功能,支持uni-data-select本身功能不变(表单验证等)
+
+<h1>拓展功能</h1>
+<ol>
+<li>支持多选功能</li>
+<li>支持选项禁用</li>
+<li>支持自定义显示值</li>
+<li>支持搜索</li>
+<li>支持多选时将选中值按文字形式展示</li>
+<li>支持下拉菜单溢出屏幕底部时自动改为向上弹出</li>
+<li>监听搜索输入事件</li>
+</ol>
+ 
+<h2>API</h2>
+### zxz-uni-data-select Props
+
+|  属性名		|    类型				| 默认值		| 说明																									|
+| -				| -						| -				| -																										|
+| v-model		| String、Array、Number	|-				| 选中项绑定值																							|
+| multiple		| Boolean				| false			| 是否多选																								|
+| disabled		| Boolean				|false			| 是否禁用																								|
+| dataKey		| String				|"key"			| 作为 key 唯一标识的键名																				|
+| dataValue		| String				| "value"		| 作为 value 唯一标识的键名																				|
+| filterable	| Boolean				| false			|  是否开启搜索																							|
+| collapseTags	| Boolean				| false			| 多选时是否将选中值按文字的形式展示																	|
+|collapseTagsNum|Number					| 1				| 多选时选中值按文字的形式展示的数量																	|
+| localdata		| Array					|-				| 下拉列表本地数据																						|
+|label			| String				| -				| 左侧标题																								|
+|placeholder	| String				| "请选择"		| 输入框的提示文字																						|
+|emptyTips		| String				|"无选项"		| 无选项提示																							|
+|clear			| Boolean				| true			| 是否清空																								|
+|format			| String				| -				| 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"|
+|@inputChange	| event					| event(String)	| 搜索输入事件																							|