ezhizao_zx há 1 ano atrás
pai
commit
10623074ae

+ 36 - 30
components/dialog-lot/dialog-lot.vue

@@ -7,24 +7,27 @@
 			<uni-data-select v-model="selectedProcess" :localdata="processList" :clear="false"
 				@change="handleProcessChange"></uni-data-select>
 		</uni-section>
-		<view :class="{'list-container':true, 'selected':isSelected(item)}" @click="handleSelection(item,index)"
-			v-for="(item, index) in form" :key="item.id">
-			<view class="list-title"><text class="label">批次号:{{item.lotCode}}</text></view>
-			<view class="list-container-item uni-row" style="border-top: 1px solid #e1e1e1;border-radius: 8rpx 8rpx 0 0;">
-				<text class="label">产品描述</text>
-				<text class="label value">{{item['productDescription']}}</text>
-			</view>
-			<view class="list-container-item uni-row">
-				<text class="label">关联箱号</text>
-				<text class="label value">{{item['carrierName']}}</text>
-			</view>
-			<view class="list-container-item uni-row">
-				<text class="label">投产数量</text>
-				<text class="label value">{{item['daywork'].temporaryProcessQualifiedNum}}</text>
-			</view>
-			<view class="list-container-item uni-row" style="border-radius: 0 0 8rpx 8rpx;">
-				<text class="label">上道工序</text>
-				<text class="label value">{{item['process'].processAlias}}</text>
+		<view style="overflow: auto;">
+			<view :class="{'list-container':true, 'selected':isSelected(item)}" @click="handleSelection(item,index)"
+				v-for="(item, index) in form" :key="item.id" style="height: 180px;">
+				<view class="list-title"><text class="label">批次号:{{item.lotCode}}</text></view>
+				<view class="list-container-item uni-row"
+					style="border-top: 1px solid #e1e1e1;border-radius: 8rpx 8rpx 0 0;">
+					<text class="label">产品描述</text>
+					<text class="label value">{{item['productDescription']}}</text>
+				</view>
+				<view class="list-container-item uni-row">
+					<text class="label">关联箱号</text>
+					<text class="label value">{{item['carrierName']}}</text>
+				</view>
+				<view class="list-container-item uni-row">
+					<text class="label">投产数量</text>
+					<text class="label value">{{item['daywork'].temporaryProcessQualifiedNum}}</text>
+				</view>
+				<view class="list-container-item uni-row" style="border-radius: 0 0 8rpx 8rpx;">
+					<text class="label">上道工序</text>
+					<text class="label value">{{item['process'].processAlias}}</text>
+				</view>
 			</view>
 		</view>
 		<view class="add-btn-container uni-row">
@@ -78,12 +81,11 @@
 	function getProcesses() {
 		Promise.all([getProcessList({
 			deptId: store.curDeptDetails.deptId,
-			dayworkId:form.value.dayworkId
+			dayworkId: form.value.dayworkId
 		}), getProcessListByLot({
 			id: form.value[0].daywork.lotId,
-			isWasteRecycling:form.value[0].daywork.isWasteRecycling
-		})
-		]).then(([res, response]) =>{
+			isWasteRecycling: form.value[0].daywork.isWasteRecycling
+		})]).then(([res, response]) => {
 			if (res.code == 200) {
 				//过滤工序列表将上道序及之前的工序去掉, 然后过滤出工序交集
 				// let curProcessSequence = [...store.planDetails.processSequence];
@@ -101,7 +103,8 @@
 				*/
 				/* 20240408后版本 */
 				// 过滤前序
-				curProcessSequence = curProcessSequence.filter(v => (v.processStepNumber > form.value[0].technologicalProcessDetail.processStepNumber))
+				curProcessSequence = curProcessSequence.filter(v => (v.processStepNumber > form.value[0]
+					.technologicalProcessDetail.processStepNumber))
 				/* 20240408 修改完成 */
 				console.log(curProcessSequence)
 				let filteredData = curProcessSequence.filter((item1) =>
@@ -111,9 +114,10 @@
 				for (let i = 0; i < filteredData.length; i++) {
 					processList.value[i] = {
 						text: filteredData[i].processAlias,
-						value: filteredData[i].technologicalProcessDetailId?filteredData[i].technologicalProcessDetailI:filteredData[i].id,
+						value: filteredData[i].technologicalProcessDetailId ? filteredData[i]
+							.technologicalProcessDetailI : filteredData[i].id,
 						processId: filteredData[i].processId,
-						processStepNumber:filteredData[i].processStepNumber
+						processStepNumber: filteredData[i].processStepNumber
 					}
 				}
 				console.log(processList.value)
@@ -132,11 +136,14 @@
 		// 添加选择的工序
 		for (let i = 0; i < selection.value.length; i++) {
 			selection.value[i].daywork.technologicalProcessDetailId = selectedProcess.value;
-			selection.value[i].daywork.processStepNumber = processList.value.find(v => v.value === selectedProcess.value)?.processStepNumber;
-			selection.value[i].daywork.processId = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ? processList.value.find(v => v.value === selectedProcess.value).processId : null
-			console.log(processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ? processList.value.find(v => v.value === selectedProcess.value).processId : null)
+			selection.value[i].daywork.processStepNumber = processList.value.find(v => v.value === selectedProcess.value)
+				?.processStepNumber;
+			selection.value[i].daywork.processId = processList.value.findIndex(v => v.value === selectedProcess.value) >=
+				0 ? processList.value.find(v => v.value === selectedProcess.value).processId : null
+			console.log(processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ? processList.value.find(
+				v => v.value === selectedProcess.value).processId : null)
 		}
-		 console.log(selection.value)
+		console.log(selection.value)
 		//执行确认
 		if (selectedProcess.value && selection.value.length > 0) {
 			close();
@@ -195,7 +202,6 @@
 			margin: 10rpx auto;
 			padding: 2%;
 			border-radius: 8rpx;
-			overflow: auto;
 
 			.list-container-item {
 				width: 100%;

+ 13 - 1
pages.json

@@ -81,6 +81,18 @@
 				"navigationBarTitleText": "快速报工"
 			}
 		},
+		{
+			"path": "pages/sortProductionPlan/index",
+			"style": {
+				"navigationBarTitleText": "分选报工"
+			}
+		},
+		{
+			"path": "pages/sortBatchReporting/index",
+			"style": {
+				"navigationBarTitleText": "分选报工"
+			}
+		},
 		{
 			"path": "pages/sorting/form",
 			"style": {
@@ -142,7 +154,7 @@
 		"list": [
 			{
 				"name": "", //模式名称
-				"path": "pages/processInspection/index",
+				"path": "pages/index/index",
 				"query": "" //启动参数,在页面的onLoad函数里面得到
 			}
 		]

+ 9 - 2
pages/dashboard/index.vue

@@ -31,7 +31,7 @@
 		<view class="business-btn uni-row" v-if="showOther" @click="handleToProductionPlan">
 			<text class="label">报工</text>
 		</view>
-		<view class="business-btn uni-row" v-if="showOther" @click="handleToSorting">
+		<view class="business-btn uni-row" v-if="showSizing" @click="handleToSorting">
 			<text class="label">分选报工</text>
 		</view>
 		<view class="business-btn uni-row" v-if="showOther" @click="handleToProcessInspection">
@@ -84,6 +84,7 @@
 	const showTurn = ref(false)
 	const showOther = ref(false)
 	const showQuick = ref(false)
+	const showSizing = ref(false)
 
 	onLoad(() => {
 		userInfo.value = store.userInfo || {
@@ -208,7 +209,7 @@
 	function handleToSorting() {
 		if (curSelectedDeptId.value) {
 			uni.navigateTo({
-				url: '/pages/sorting/form'
+				url: '/pages/sortProductionPlan/index'
 			})
 		} else {
 			uni.showToast({
@@ -262,6 +263,12 @@
 	function handleDeptChange() {
 		let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 		store.curDeptDetails = curDept
+		if (curDept.deptName === '分选') {
+			showSizing.value = true			
+		} else {
+			showSizing.value = false
+		}
+		console.log(showSizing.value)
 	}
 </script>
 

+ 654 - 0
pages/sortBatchReporting/index.vue

@@ -0,0 +1,654 @@
+<template>
+	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
+		<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="list-title uni-row">
+			<text class="label">是否正常批次</text><text>是</text>
+			<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
+			<text>否</text>
+		</view>
+		<view class="scroll-container">
+			<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
+				<text>暂无批次</text>
+			</view>
+			<!-- 批次列表 -->
+			<view v-else 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;">
+					<view class="title uni-row">
+						<text class="label">批次号:</text>
+						<text class="label code">{{ item['lotCode'] }}</text>
+					</view>
+					<view class=" uni-row" style="margin-left: 16rpx;">
+						<view v-if="item['status'] == 1" class="tag"><text class="label">进行中</text></view>
+						<view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">周转中</text>
+						</view>
+						<view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">待周转</text>
+						</view>
+						<view v-else-if="item['status'] == 0" class="tag finished "><text class="label">未开始</text>
+						</view>
+						<view v-else-if="item['status'] == 4" type="default finished" class="tag finished"><text
+								class="label">已完成</text></view>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">产品描述</text>
+					<text class="label right">{{ curPlan['productDescription'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">材质</text>
+					<text
+						class="label right">{{ item['furnaceNoInfo'] ? item['furnaceNoInfo'].firstTechnicalRequirement + ";" + item['furnaceNoInfo'].secondTechnicalRequirement : '-' }}</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['totalWorkingHours']}}</text>
+				</view> -->
+				<view class="item-info uni-row">
+					<text class="label">投入数</text>
+					<text
+						class="label right">{{item['processQualifiedNum'] == 0 ?  item['productionQuantity']  : item['processQualifiedNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">上道工序</text>
+					<text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前工序</text>
+					<text
+						class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">下道工序</text>
+					<view class="label right uni-row">{{ item.nextProcess ? item['nextProcess'].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">{{ curPlan['equipmentName'] }}</text>
+				</view> -->
+				<view v-if="notPreProcess" class="item-info uni-row">
+					<text class="label">所在区域</text>
+					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+				</view>
+				<view class="status-btn uni-row">
+					<view v-if="item['status'] == 2" class=" uni-row">
+						<button class="turnover-tag" size="mini" @click.stop="handleShowTurnoverApplication(item)">周转申请</button>
+						<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
+					</view>
+					<view v-else-if="item['status'] == 3" class=" uni-row">
+						<button class="turnover-tag" size="mini" @click.stop="handleCancelTurnover(item)"
+							style="background-color: rgba(255, 85, 85, 1);">取消周转</button>
+					</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>
+		<!-- <view v-if="bottomStatus" class="bottom uni-row">
+			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
+		</view>
+		<view v-if="!bottomStatus" class="bottom uni-row">
+			<button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
+		</view> -->
+		<view class="bottom uni-row">
+			<button v-if="bottomStatus" class="start-batch-btn" style="margin-right: 10rpx;" type="primary"
+				@click="handleStartNewBatch">开始新批次</button>
+			<button class="start-batch-btn" style="margin-right: 10rpx;" type="primary"
+				@click="handleScanCode">扫码开始批次</button>
+			<button class="start-batch-btn" type="primary" @click="handleSearchCode">查箱号</button>
+		</view>
+		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
+		<dialog-turnoverApplication ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter" />
+		<dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
+	</view>
+
+</template>
+
+<script setup>
+	import {
+		reactive,
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getDayWorkList,
+		showDaywork,
+		showDayworkSave,
+		turnoverDelete
+	} from '@/api/business/dayWork.js'
+	import {
+		getWasteRecyclingLot
+	} from '@/api/business/lot.js'
+	import {
+		carrierFinishedCheck
+	} from '@/api/business/carrier.js'
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		toHHmmss
+	} from '@/utils/common.js'
+
+
+	const turnoverApplicationDialog = ref(null)
+	const selectProduction = ref(null)
+	const lotDialog = ref(null)
+	const listData = ref([])
+	const curPlan = ref(null)
+	const bizDayworkObj = ref({})
+	const bottomStatus = ref(false) // 底部按钮显示
+	const reqParam = ref(null);
+	const normalStatus = ref(0)
+	const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态	
+	const keywords = ref(null)
+	const tempList = ref([])
+	const wasteRecyclingList = ref([])//废品回用批次
+	const notPreProcess = ref(true)
+	const curProcessAfte = ref([])
+	const showRight = ref(null) // 抽屉
+
+	onLoad(() => {
+		curPlan.value = store.planDetails;
+		normalStatus.value = 0
+		console.log(curPlan.value)
+		//废品回用的领料部门如果是当前工段,也要可以开始新批次
+		//查找当前计划单下的批次废品回用是当前工段
+		getWasteRecyclingLot({productionPlanDetailId:store.planDetails.id,requisitionDepartmentId :store.curDeptDetails.deptId}).then(res => {
+			wasteRecyclingList.value = res.rows
+			console.log(wasteRecyclingList.value.length)
+			if (store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId || wasteRecyclingList.value.length >0 ) {
+				bottomStatus.value = true;
+				store.isPreProcess = true;
+			} else {
+				bottomStatus.value = false;
+				store.isPreProcess = false;
+			}
+		})
+		console.log(wasteRecyclingList.value.length)
+	})
+
+	onShow(() => {
+		reflush();
+	})
+
+	function reflush() {
+		init(store.planDetails.id);
+	}
+
+	function handleShowTurnoverApplication(data) {
+		let _data = data ?? {}
+		carrierFinishedCheck(data).then(res => {
+			if(res.code === 200) {
+				// 调用子组件中的方法
+				turnoverApplicationDialog.value.open(_data)
+			} else  {
+				uni.showToast({
+					icon: 'none',
+					title: res.msg
+				})
+			}
+		})
+		// .catch(err => {
+		// 	uri.showToast({
+		// 		icon: "fail",
+		// 		title: "网络请求失败。"
+		// 	})
+		// })
+	}
+
+	function handleStartNewBatch() {
+		uni.navigateTo({
+			url: "/pages/addNewBatch/index"
+		})
+	}
+
+	function init(id) {
+		uni.showLoading({
+			title: '加载中'
+		});
+		let reqData = {
+			productionPlanDetailId: id,
+			deptId: store.curDeptDetails.deptId,
+			keywords: keywords.value
+		};
+
+		getDayWorkList(reqData).then(res => {
+			if (res.code == 200) {
+				tempList.value = res.data
+				listData.value =  res.data.filter(item => {
+				    return item.isWasteRecycling == 0 && item.isAmend == 0;
+				});
+				for (let i = 0; i < listData.value.length; i++) {
+					if(listData.value[i].prevProcess){
+						let sum = 0;
+						for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
+							if(listData.value[i].dayworkItemList[j].processId == listData.value[i].prevProcess.id && (listData.value[i].dayworkItemList[j].status == 2 || listData.value[i].dayworkItemList[j].status == 3)){
+								sum += listData.value[i].dayworkItemList[j].qualifiedNum;
+							}
+						}
+						listData.value[i].processQualifiedNum = sum;
+					}
+				}
+			}
+			uni.hideLoading();
+		})
+	}
+
+	function handleSearch() {
+		init(store.planDetails.id);
+	}
+
+	function handleToreportingForWork(item) {
+		store.dayworkInfo = item
+		uni.navigateTo({
+			url: "/pages/reportingForWork/index"
+		})
+	}
+
+	function handleClickProcessList(item) {
+		let curProcessAfterList = [];
+		console.log(item)
+		let nextIndex = 0;
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (item.nextProcess.id == item.processSequence[i].id) {
+				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 handleSearchCode() {
+		selectProduction.value.open(normalStatus.value);
+	}
+	
+	function switchChange(event) {
+		console.log(event.detail.value)
+		//异常批
+		if (event.detail.value) {
+			listData.value = tempList.value.filter(item => {
+			    return item.isWasteRecycling == 1 || item.isAmend == 1;
+			});
+			normalStatus.value = 1
+		} else {
+			listData.value = tempList.value.filter(item => {
+			    return item.isWasteRecycling == 0 && item.isAmend == 0;
+			});
+			normalStatus.value = 0
+		}
+	}
+	
+	function handleScanCode() {
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		const mpaasScanModule = null
+		if (mpaasScanModule) {
+			// 调用插件的 mpaasScan 方法
+			mpaasScanModule.mpaasScan({
+					// 扫码识别类型,参数可多选,qrCode、barCode,
+					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+					scanType: ["qrCode", "barCode"],
+					// 是否隐藏相册,默认false不隐藏
+					hideAlbum: false,
+				},
+				(ret) => {
+					console.log(ret);
+					let vehicleObj = JSON.parse(ret.resp_result);
+					if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
+						uni.showToast({
+							icon: "none",
+							title: "请扫载具码",
+							duration: 1000
+						})
+						return;
+					}
+					showDaywork({
+						carrierId: vehicleObj.carrierId,
+						status: 7
+					}).then(response => {
+						if (response.code == 200) {
+							console.log(response)
+							console.log(response.data[0].productionPlanDetailId)
+							console.log(store.planDetails.id)
+							if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+								console.log(response.data)
+								lotDialog.value.open(response.data);
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: '该批次不在此计划单内',
+									duration: 2000
+								})
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: response.msg,
+								duration: 2000
+							})
+						}
+					})
+				}
+			);
+		} else {
+			// 测试时用
+			showDaywork({
+				carrierId: '1770342949090017283',
+				status: 7
+			}).then(response => {
+				if (response.code == 200) {
+					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+						console.log(response.data)
+						lotDialog.value.open(response.data);
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: '该批次不在此计划单内',
+							duration: 2000
+						})
+					}
+				} else {
+					console.log(response)
+					uni.showToast({
+						icon: 'none',
+						title: response.msg,
+						duration: 2000
+					})
+				}
+			})
+		}
+	}
+	
+	// function handleScanCode() {
+	// 	uni.scanCode({
+	// 		onlyFromCamera: true,
+	// 		success: function (res) {
+	// 			if (res.scanType !== 'QR_CODE') {
+	// 				uni.showToast({
+	// 					icon: 'none',
+	// 					title: '二维码未识别成功',
+	// 					duration: 2000
+	// 				})
+	// 			}
+	// 			console.log('条码类型:' + res.scanType);
+	// 			console.log('条码内容:' + res.result);
+	// 		}
+	// 	});
+	// }
+
+	function handleAddDaywork(data) {
+		console.log(data)
+		let reqParam = [];
+		for (var i = 0; i < data.length; i++) {
+			reqParam.push(data[i].daywork)
+		}
+		console.log(data)
+		showDayworkSave(data).then(res => {
+			console.log(res)
+			init(store.planDetails.id);
+		})
+	}
+
+	function handleDoIt(data) {
+		handleAddDaywork(data);
+	}
+
+	function handleDoTurnoverAfter() {
+		reflush();
+	}
+
+	function handleCancelTurnover(data) {
+		turnoverDelete(data).then(res => {
+			if (res.code == 200) {
+				uni.showToast({
+					icon: "success",
+					title: "取消成功",
+					duration: 2000
+				})
+				init(store.planDetails.id);
+			} else {
+				uni.showToast({
+					icon: "none",
+					title: "取消失败",
+					duration: 2000
+				})
+			}
+		})
+	}
+</script>
+
+<style lang="scss">
+	$nav-height: 60rpx;
+
+	.box-bg {
+		width: 94%;
+		background-color: #F5F5F5;
+		padding: 5rpx 16rpx;
+		justify-content: space-around;
+		align-items: center;
+		margin: 24rpx auto 0;
+
+		.input-view {
+			width: 100%;
+			flex: 4;
+			background-color: #f8f8f8;
+			height: $nav-height;
+			border: 1rpx solid #999;
+			border-radius: 15rpx;
+			padding: 0 15rpx;
+			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;
+				line-height: $nav-height;
+				padding: 0 5rpx;
+				background-color: #f8f8f8;
+			}
+		}
+
+		.search {
+			width: 20%;
+			text-align: center;
+			color: #808080;
+		}
+	}
+	.list-title {
+				width: 100%;
+				margin-top: 16rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				align-items: center;
+				margin-left: 32rpx;
+
+				.label {
+			
+					font-size: 32rpx;
+					margin-right: 24rpx;
+				}
+
+				.icon-gear {
+					font-size: 56rpx;
+				}
+			}
+
+			.switch {
+				margin-top: -8rpx;
+				transform: scale(0.7);
+			}
+	.scroll-container {
+		width: 92%;
+		margin: 24rpx auto 0 auto;
+		height: calc(90% - 100rpx);
+		overflow: auto;
+	}
+
+	.list-item {
+		background-color: #fff;
+		position: relative;
+		padding: 16rpx;
+		padding-bottom: 24rpx;
+		margin-bottom: 24rpx;
+		border-radius: 24rpx;
+
+		.title-container {
+
+			margin-top: 8rpx;
+			margin-bottom: 16rpx;
+
+			.title {
+				height: 48rpx;
+				align-items: center;
+
+				.label {
+					font-size: 32rpx;
+					font-weight: bold;
+
+					&.code {
+						margin-left: 8rpx;
+					}
+				}
+			}
+
+			.tag {
+				border: 1px solid #1CE5B0;
+				background-color: #F6FFFD;
+				padding: 8rpx;
+				border-radius: 8rpx;
+
+				.label {
+					color: #1CE5B0;
+					font-size: 24rpx;
+				}
+
+				&.finished {
+					border: 1px solid #BBBBBB;
+					background-color: #F5F5F5;
+
+					.label {
+						color: #BBBBBB;
+					}
+				}
+
+				&.turnover {
+					border: 1px solid #FF7901;
+					background-color: #F6FFFD;
+
+					.label {
+						color: #FF7901;
+					}
+				}
+			}
+		}
+
+		.item-info {
+			margin-bottom: 8rpx;
+
+			.label {
+				font-size: 28rpx;
+				width: 220rpx;
+				color: #808080;
+
+				&.right {
+					flex: 1;
+					color: #000000;
+				}
+			}
+		}
+
+		.status-btn {
+			justify-content: flex-end;
+			align-items: center;
+
+			.turnover-tag {
+				padding-right: 12rpx;
+				padding-left: 12rpx;
+				border-radius: 8rpx;
+				border: 1rpx solid #FF7901;
+				background-color: #FF7901;
+				font-size: 28rpx;
+				color: #FFFFFF;
+
+			}
+
+			.reporting-tag {
+				padding-right: 12rpx;
+				padding-left: 12rpx;
+				border-radius: 8rpx;
+				margin-left: 16rpx;
+				border: 1rpx solid #1684fc;
+				background-color: #1684fc;
+				font-size: 28rpx;
+				color: #FFFFFF;
+
+			}
+		}
+	}
+
+	.bottom {
+		height: 10%;
+		position: fixed;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		height: 100rpx;
+		border-top: 1px solid #999999;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		background-color: #fff;
+		justify-content: space-evenly;
+
+		.start-batch-btn {
+			flex: 1;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 8rpx;
+			color: #FFFFFF;
+			font-size: 28rpx;
+		}
+	}
+</style>

+ 245 - 0
pages/sortProductionPlan/index.vue

@@ -0,0 +1,245 @@
+<template>
+	<view class="uni-column" style="padding: 24rpx">
+		<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 v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
+			<text>暂无生产计划</text>
+		</view>
+		<view v-else style="height: calc(100% - 100rpx); overflow: auto;">
+			<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">
+						<text class="label">生产计划单号</text>
+						<text class="label code">{{ item['productionPlanNo'] }}</text>
+					</view>
+					<view v-if="item['dayWorkList'].length > 0" class="tag"><text class="label">进行中</text></view>
+					<view v-else type="default" class="tag not-start"><text class="label">未开始</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['totalLotNumber'] }}</text>
+				</view>
+				<!-- <view class="item-info uni-row">
+					<text class="label">完成批数</text>
+					<text class="label right">{{ item['equiment'] }}</text>
+				</view> -->
+				<view class="item-info uni-row">
+					<text class="label">投产数</text>
+					<text class="label right">{{ item['productionQuantity'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">单批量</text>
+					<text class="label right">{{ item['oneLotQuantity'] }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import { getPlanDetailsList } from '@/api/business/planDetails.js'
+	import {
+		ref
+	} from 'vue'
+	import {
+		onReady,
+		onLoad,
+		onUnload,
+		onPullDownRefresh,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getToken
+	} from '@/utils/auth'
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		getUserProcess
+	} from '@/api/process/process.js'
+
+
+	const listData = ref([])
+	const keywords = ref('')
+
+	onLoad(() => {
+		// dayworkItem数据更改后刷新数据
+		// uni.$on('dayworkItemUpdate', reflush);
+	})
+	
+	onShow(() => {
+		reflush();
+	})
+
+	onUnload(() => {
+		console.log(store.curDeptDetails)
+		// uni.$off('dayworkItemUpdate', reflush)
+	})
+
+	/**	
+	 * 监听下拉刷新
+	 */
+	// onPullDownRefresh(() => {
+	// 	setTimeout(function() {
+	// 		uni.stopPullDownRefresh();
+	// 	}, 3000);
+	// })
+
+	function reflush() {
+		init();
+	}
+
+	function init(data) {
+		uni.showLoading({
+			title: '加载中'
+		});
+		getPlanDetailsList({
+			deptId: Number(store.curDeptDetails.deptId),
+			keywords:keywords.value
+		}).then(res => {
+			if(res.code == 200){
+				listData.value = res.data;
+				uni.hideLoading();
+			}
+			uni.hideLoading();
+		})
+	}
+
+	function handleToBatchReporting(item) {
+		store.planDetails = item
+		uni.navigateTo({
+			url: '/pages/sortBatchReporting/index'
+		})
+	}
+
+	function handleSearch() {
+		let reqParam = {
+			keywords: keywords.value
+		}
+		reqParam.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId;
+		init(reqParam)
+	}
+</script>
+
+<style lang="scss">
+	$nav-height: 60rpx;
+
+	.box-bg {
+		width: 100%;
+		background-color: #F5F5F5;
+		padding: 5rpx 0;
+		justify-content: space-around;
+		align-items: center;
+
+		.input-view {
+			width: 100%;
+			flex: 4;
+			background-color: #f8f8f8;
+			height: $nav-height;
+			border: 1rpx solid #999;
+			border-radius: 15rpx;
+			padding: 0 15rpx;
+			flex-wrap: nowrap;
+			margin:0 10rpx 20rpx;
+			line-height: $nav-height;
+
+			.input-uni-icon {
+				line-height: $nav-height;
+			}
+
+			.nav-bar-input {
+				width: 80%;
+				height: $nav-height;
+				line-height: $nav-height;
+				padding: 0 5rpx;
+				background-color: #f8f8f8;
+			}
+		}
+
+		.search {
+			width: 20%;
+			text-align: center;
+			color: #808080;
+			margin-top: -20rpx;
+		}
+	}
+
+	.uni-column {
+		background-color: rgba(245, 245, 245, 1);
+		height: calc(100% - 40rpx);
+	}
+
+	.list-item {
+		background-color: #fff;
+		position: relative;
+		padding: 16rpx;
+		padding-bottom: 24rpx;
+		border-radius: 24rpx;
+		margin-bottom: 24rpx;
+
+		.title-container {
+			justify-content: space-between;
+			margin-top: 8rpx;
+			margin-bottom: 16rpx;
+
+			.title {
+				height: 48rpx;
+				align-items: center;
+
+				.label {
+					font-size: 32rpx;
+					font-weight: bold;
+
+					&.code {
+						margin-left: 8rpx;
+					}
+				}
+			}
+
+			.tag {
+				border: 1px solid #1ce5b0;
+				background-color: #f6fffd;
+				padding: 8rpx;
+				border-radius: 8rpx;
+
+				.label {
+					color: #1ce5b0;
+					font-size: 24rpx;
+				}
+
+				&.not-start {
+					border: 1px solid #bbbbbb;
+					background-color: #f5f5f5;
+
+					.label {
+						color: #bbbbbb;
+					}
+				}
+			}
+		}
+
+		.item-info {
+			margin-bottom: 8rpx;
+
+			.label {
+				font-size: 28rpx;
+				width: 220rpx;
+				color: #808080;
+
+				&.right {
+					flex: 1;
+					color: #000000;
+				}
+			}
+		}
+	}
+</style>