Переглянути джерело

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_app

ezhizao_zx 1 рік тому
батько
коміт
c369127d7c

+ 2 - 2
api/resourceGroup/resourceGroupDetail.js

@@ -1,9 +1,9 @@
 import req from '@/utils/request.js'
 
 
-export function getEquipmentByUidAndDid(planDetailId,deptId) {
+export function getEquipmentByUidAndDid(planDetailId,deptId,lotId) {
 	return req.request({
-		url:'/business/detail/getEquipmentByUidAndDid?planDetailId=' + planDetailId + '&deptId=' + deptId,
+		url:'/business/detail/getEquipmentByUidAndDid?planDetailId=' + planDetailId + '&deptId=' + deptId+ '&lotId=' + lotId,
 		method: 'GET',
 	})
 }

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

@@ -175,7 +175,7 @@
 		// 		}
 		// 		baseDialog.value.open()
 		// 	});
-		getEquipmentByUidAndDid(store.planDetails.id,store.curDeptDetails.deptId).then(equipmentRes => {
+		getEquipmentByUidAndDid(store.planDetails.id,store.curDeptDetails.deptId,store.dayworkInfo.lotId).then(equipmentRes => {
 			if(equipmentRes.code == 200){
 				for (var i = 0; i < equipmentRes.rows.length; i++) {
 					equipmentList.value[i] = {

+ 9 - 4
pages.json

@@ -32,7 +32,7 @@
 			"style": {
 				"navigationBarTitleText": "批次报工"
 			}
-		}, 
+		},
 		{
 			"path": "pages/addNewBatch/index",
 			"style": {
@@ -74,6 +74,12 @@
 			"style": {
 				"navigationBarTitleText": "领取确认"
 			}
+		},
+		{
+			"path": "pages/fastProductionPlaan/index",
+			"style": {
+				"navigationBarTitleText": "快速报工"
+			}
 		}
 	],
 	"globalStyle": {
@@ -83,10 +89,9 @@
 		"backgroundColor": "#F8F8F8"
 	},
 	"uniIdRouter": {},
-	"condition" : { //模式配置,仅开发期间生效
+	"condition": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
+		"list": [{
 				"name": "", //模式名称
 				"path": "pages/index/index",
 				"query": "" //启动参数,在页面的onLoad函数里面得到

+ 44 - 23
pages/dashboard/index.vue

@@ -24,10 +24,15 @@
 			</uni-section>
 		</view>
 		<!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
-		<view class="business-btn uni-row" v-if="showOther" @click="handeleToReportHistory"><text class="label">我的报工</text></view>
-		<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="handeleToReportHistory"><text
+				class="label">我的报工</text></view>
+		<view class="business-btn uni-row" v-if="showOther" @click="handleFastToProductionPlan"><text
+				class="label">快速报工</text></view>
+		<view class="business-btn uni-row" v-if="showOther" @click="handleToProductionPlan"><text
+				class="label">报工</text></view>
 		<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
-		<view class="business-btn uni-row" v-if="showTurn" @click="handleToHandlingList"><text class="label">周转</text></view>
+		<view class="business-btn uni-row" v-if="showTurn" @click="handleToHandlingList"><text class="label">周转</text>
+		</view>
 		<view class="bottom-btn-container">
 			<view class="start-batch-btn uni-row" @click="handleToEquiPmentList"><text class="label">绑定设备</text></view>
 			<view class="start-batch-btn uni-row" @click="handleSwitchOrQuit"><text class="label">切换 / 退出账号</text>
@@ -73,15 +78,16 @@
 	onLoad(() => {
 		userInfo.value = store.userInfo || {
 			nickName: ""
-		};getUserDepts
+		};
+		getUserDepts
 		store.tenantId = userInfo.value.tenantId;
-		if(store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length > 1){
+		if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length > 1) {
 			showTurn.value = true;
 			showOther.value = true;
-		}else if(store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length == 1){
+		} else if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length == 1) {
 			showTurn.value = true;
 			showOther.value = false;
-		}else{
+		} else {
 			showTurn.value = false;
 			showOther.value = true;
 		}
@@ -90,35 +96,50 @@
 
 	function init() {
 		getTenant();
-		getUserDepts(store.userInfo.userId,store.tenantId);
+		getUserDepts(store.userInfo.userId, store.tenantId);
 		getDeptsByTenantId(store.tenantId);
 	}
 
-	function handleRecerptSfprod() { 
-		if(curSelectedDept.value){
+	function handleRecerptSfprod() {
+		if (curSelectedDept.value) {
 			uni.navigateTo({
 				url: '/pages/recerptSfprod/index'
 			})
-		}else{
+		} else {
 			uni.showToast({
 				icon: "none",
 				title: "请选择工段"
 			})
 		}
 	}
-	
-	function handeleToReportHistory(){
+
+	function handeleToReportHistory() {
 		uni.navigateTo({
 			url: '/pages/reportHistory/index'
 		})
 	}
 
+
+
+	function handleFastToProductionPlan() {
+		if (curSelectedDept.value) {
+			uni.navigateTo({
+				url: '/pages/fastProductionPlaan/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
+
 	function handleToProductionPlan() {
-		if(curSelectedDept.value){
+		if (curSelectedDept.value) {
 			uni.navigateTo({
 				url: '/pages/productionPlan/index'
 			})
-		}else{
+		} else {
 			uni.showToast({
 				icon: "none",
 				title: "请选择工段"
@@ -150,12 +171,12 @@
 		})
 	}
 
-	function getUserDepts(userId,tenantId) {
+	function getUserDepts(userId, tenantId) {
 		getUserDeptList(userId).then((res) => {
 			if (res.code == 200) {
 				userDeptList.value = res.data;
 				for (let i = 0; i < res.data.length; i++) {
-					if(res.data[i].tenantId == tenantId){
+					if (res.data[i].tenantId == tenantId) {
 						userDeptsByTenantId.value[i] = {
 							text: res.data[i].deptName,
 							value: res.data[i]
@@ -173,9 +194,9 @@
 		})
 	}
 
-	function getDeptsByTenantId(tenantId){
+	function getDeptsByTenantId(tenantId) {
 		userDeptsByTenantId.value = [];
-		let newArr = userDeptList.value.filter((item,index,arrs) => item.tenantId == tenantId);
+		let newArr = userDeptList.value.filter((item, index, arrs) => item.tenantId == tenantId);
 		// curSelectedDept.value = newArr.length > 0 ? newArr[0].deptId : null; 
 		for (var i = 0; i < newArr.length; i++) {
 			userDeptsByTenantId.value[i] = {
@@ -189,7 +210,7 @@
 		// 	store.curDeptDetails = userDeptsByTenantId.value[0].value;
 		// }
 		console.log(userDeptsByTenantId.value);
-	} 
+	}
 
 	function getTenant() {
 		getTenantList().then((res) => {
@@ -208,7 +229,7 @@
 
 	function handleTenantChange() {
 		store.tenantId = curSelectedTenant.value;
-		curSelectedDept.value = null; 
+		curSelectedDept.value = null;
 		getDeptsByTenantId(store.tenantId);
 	}
 
@@ -297,7 +318,7 @@
 	.business-btn {
 		margin: 0 20rpx 20rpx 20rpx;
 		background-color: #fff;
-		height: 200rpx;
+		height: 100rpx;
 		width: 94%;
 		align-items: center;
 		justify-content: center;
@@ -305,7 +326,7 @@
 		border-radius: 8rpx;
 
 		.label {
-			font-size: 40rpx;
+			font-size: 35rpx;
 		}
 	}
 

+ 32 - 0
pages/fastProductionPlaan/index.vue

@@ -0,0 +1,32 @@
+<template>
+	<view class="uni-column" style="padding: 24rpx">
+		<view style="color: #999;margin: 50% auto;">
+			<text>扫码开始快速报工</text>
+		</view>
+	</view>
+	<view class='bottom-btn-container'>
+		<button class="start-batch-btn uni-row" type=primary @click='handleAdd'>扫码开始报工</button>
+	</view>
+</template>
+
+<script>
+	import {
+		ref
+	} from 'vue'
+	import path from '@/api/base/path.js'
+</script>
+
+<style lang="scss">
+	.bottom-btn-container {
+		position: fixed;
+		right: 20rpx;
+		left: 20rpx;
+
+		.start-batch-btn {
+			margin-bottom: 24rpx;
+			border-radius: 8rpx;
+			background-color: #00e2a6;
+			width: 80%;
+		}
+	}
+</style>

+ 1 - 1
pages/reportingForWork/index.vue

@@ -171,7 +171,7 @@
 			}
 		})
 
-		getEquipmentByUidAndDid(store.planDetails.id, store.curDeptDetails.deptId).then(equipmentRes => {
+		getEquipmentByUidAndDid(store.planDetails.id, store.curDeptDetails.deptId,store.dayworkInfo.lotId).then(equipmentRes => {
 			if (equipmentRes.code == 200) {
 				hasEquipment.value = equipmentRes.rows.length > 0 ? true : false;
 			}