chencc 1 ano atrás
pai
commit
b84c86736c

+ 59 - 18
pages/pda/components/bottomOperate.vue

@@ -1,15 +1,16 @@
 <template>
 	<view class="bottom_box">
-
+			
 		<view class="nav_box rx-cc" @click="open">
 			<image class="open_icon" :class="{open_icon_reversal : isOperate}" src="~@/static/pda/open.svg"></image>
 		</view>
  
 
-
+		<!-- // 弹出框 -->
 		<view class="operate_list" v-show="isOperate">
 			<view v-for="(item, index) in btnList[btnState]" :key="index" class="list rx-bc"
 				@click="operate(item.type, item)">
+
 				<view class="round">{{index + 1}}</view>
 				<view class="name">{{item.name}}</view>
 				<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
@@ -25,6 +26,7 @@
 
 		
 		
+		
 		<view  v-if="newTaskObj.existOutsource == 1" class="list rx-bc"  @click="operate('outPicking', {})">
 			<view class="round">{{btnList[btnState].length + 1}}</view>
 			<view class="name" >委外领料</view>
@@ -52,7 +54,8 @@
 			<view class="btn" :style="newTaskObj.existOutsource == 1 ? 'background: #FFA929' : ''" @click="handOutsource()">委外</view>
 			<view class="btn"  @click="handHandover">交接</view>
 		</view>
-
+		
+		<!-- //委外弹窗 -->
 		<SearchPopup mode="center" v-if="outsourceShow">
 			<template v-slot:list>
 				<view class="popup_list">
@@ -81,10 +84,13 @@
 
 						<u-form-item label="委外到:" borderBottom prop="taskIds">
 							<zxz-uni-data-select :localdata="newStepsList" style="font-size: 15px;" v-model="outsourceForm.taskIds"
-								dataValue='taskId' format='{taskTypeName}' dataKey="taskId" filterable
+								dataValue='taskId' format='{taskTypeName}' dataKey="taskId" filterable  @change="changeTaskId"
 								:clear='true'></zxz-uni-data-select>
 						</u-form-item>
-
+						
+						<u-form-item label="委外场景:" borderBottom prop="taskIds">
+								{{sceneText}}
+						</u-form-item>
                   
 						<u-form-item label="直接入库:" borderBottom prop="isInWarehouse"  v-if="outsourceForm.isFirstTask != 1">
 							<u-checkbox-group v-model="isInWarehouse" size="15px"  v-if="clientEnvironmentId != 2 " >
@@ -92,7 +98,6 @@
 							</u-checkbox-group>
 							<view style="font-size: 15px;" v-if="clientEnvironmentId == 2 " >是</view>
 
-
 							<zxz-uni-data-select  style="margin-left: 10px; font-size: 15px;" v-if="clientEnvironmentId == 2 || isInWarehouse.length" :localdata="warehouseList" v-model="outsourceForm.warehouseId"
 								dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
 
@@ -100,7 +105,6 @@
                
 					
 
-
 						<u-form-item label="工艺路线:"   borderBottom style="font-size: 15px;"  prop="produceRoutingId" v-if="clientEnvironmentId != 2 && outsourceForm.isFirstTask != 1 && isInWarehouse && isInWarehouse.length == 0">
 							<zxz-uni-data-select :localdata="produceList" v-model="outsourceForm.produceRoutingId"
 								dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
@@ -141,7 +145,7 @@
 				</view>
 			</template>
 		</SearchPopup>
-		
+		<!-- //委外下一步 -->
 		<outsourceList  ref="outsourceListRef" @close="outCancel()"></outsourceList>
 		<handover ref="handoverRef"></handover>
 
@@ -254,7 +258,7 @@
 		data() {
 			return {
 				isOperate: false,
-
+				
 				btnsList: [],
 				btnState: 1,
 
@@ -350,7 +354,8 @@
 
 
 				},
-
+				sceneText:'',
+				outsourceScene:null,
 				newTaskObj: {},
 				outsourceShow: false,
 
@@ -363,17 +368,18 @@
 
 				typeList: [{
 						id: 4,
-						name: '带料委外'
+						name: '带料生产委外'
 					},
 					{
 						id: 5,
-						name: '无料委外'
+						name: '不带料生产委外'
 					},
 
 				],
 
 				newStepsList: [],
-
+				
+				
 
 				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
 					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
@@ -391,7 +397,39 @@
 		},
 
 		methods: {
-
+			
+			//委外到 类型选择
+			changeTaskId(e){
+				console.log(this.newStepsList);
+				if(this.newStepsList.length){
+					const id =this.newStepsList[0].sourceTaskId;
+					//isFirstTask 1是首工序 0不是
+					if(this.outsourceForm.isFirstTask){
+						this.sceneText = "首工序";
+						this.outsourceForm.outsourceScene = 1;
+						if(e.sourceTaskId!==id){
+							this.sceneText = "首工序及多工序";
+							this.outsourceForm.outsourceScene = 4;
+						}
+					}else{
+						if(e.sourceTaskId===id){
+							// 单工序
+							this.sceneText = "单工序"
+							this.outsourceForm.outsourceScene = 2;
+						}else{
+							//多工序
+							this.sceneText = "多工序"
+							this.outsourceForm.outsourceScene =3;
+						}
+					}
+					
+				}else{
+					uni.showToast({
+						title: '委外到工序为空',
+						icon: 'none'
+					})
+				}
+			},
 
 			open() {
 				this.isOperate = !this.isOperate
@@ -414,14 +452,12 @@
 
 					this.outsourceForm = {
 						...res,
-				    
-
+				
 					}
 					this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
 
 
 
-
 					if (res.outsource) {
 						this.getNewSteps()
 						this.outsourceShow = true
@@ -487,6 +523,8 @@
 				})
 			},
 			outCancel() {
+				this.sceneText="";//委外场景
+				this.outsourceForm.outsourceScene =null;
 				this.outsourceShow = false
 				EventBus.$off('outEvent');
 			},
@@ -570,6 +608,8 @@
 					})
 					return false
 				}
+				
+				
 				if(this.clientEnvironmentId == 2) {
 					this.outsourceForm.isInWarehouse = 1
 				} else {
@@ -584,7 +624,8 @@
 				}
 				
 				console.log(param)
-				
+				this.sceneText="";//委外场景
+				this.outsourceForm.outsourceScene =null;
 				this.$refs.outsourceListRef.open(param)
         
 

+ 5 - 2
pages/pda/components/outsourceList.vue

@@ -1,5 +1,6 @@
 <template>
 	<view>
+		<!-- 委外下一步 -->
 		<u-popup :show="show" :mode='mode' :closeOnClickOverlay='false'>
 
 
@@ -385,8 +386,10 @@
 			open(obj) {
 				this.outObj = obj
 				this.actTab = '物品清单',
-
-					this.outsourceMaterialFn()
+				
+				console.log(this.outObj)
+				
+				this.outsourceMaterialFn()
 				this.getWarehouseFn()
 				this.show = true
 			},

+ 0 - 1
pages/pda/components/searchPopup.vue

@@ -3,7 +3,6 @@
 		<u-popup :show="show" :mode='mode' :closeOnClickOverlay='false' >
 			
 			<view  :style="{paddingTop: mode == 'top' ?  topHight + 'px' : ''}">
-
 				<slot name="list"></slot>
 				<slot name="operate"></slot>
 

+ 1 - 2
pages/pda/workOrder/extrusionMolding/index.vue

@@ -1,9 +1,9 @@
 <template>
+	<!-- 生产首页 -->
 	<view class="content-box">
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#157A2C"
 			color="#fff" @clickLeft="back"></uni-nav-bar>
 
-
 		<view class="top-wrapper cx">
 			<stepsNav v-if='info.taskId && stepsList.length' :stepsList="stepsList" :taskId="info.taskId"
 				@selectStep='selectStep'></stepsNav>
@@ -181,7 +181,6 @@
 		</view>
 
 		<view class="bottom-wrapper">
-
 			<bottomOperate @operate='operate' @refresh='refresh'
 				:taskObj="{'currentTaskName': currentTaskName || info.taskName, 'currentTaskId': currentTaskId || info.taskId, 'workOrderId' : id , 'existOutsource': existOutsource }"
 				:state='currentType' :gdStatus='info.status' :controlReportMethod='controlReportMethod'

+ 0 - 1
pages/pda/workOrder/index/details.vue

@@ -12,7 +12,6 @@
 						<view>{{index + 1}}</view>
 						<view>报工时间: {{objData.createTime}}</view>
 					</view>
-
 					<workOrderBom :item='objData' v-if='objData' :isDetails='true'></workOrderBom>
 					
 					

+ 1 - 1
static/svg-icons-lib.js

@@ -6,7 +6,7 @@
  *
  * !!! DO NOT MODIFY MANUALLY !!!
  *
- * @datetime 2025/1/11 17:05:24
+ * @datetime 2025/3/21 15:38:39
  *
  */