Browse Source

修改碳谷

chencc 1 year ago
parent
commit
d5b579b0bd

+ 2 - 2
.hbuilderx/launch.json

@@ -19,12 +19,12 @@
             "type" : "uniCloud"
         },
         {
-            "openVueDevtools" : true,
+            "openVueDevtools" : false,
             "playground" : "standard",
             "type" : "uni-app:app-android"
         },
         {
-            "openVueDevtools" : true,
+            "openVueDevtools" : false,
             "playground" : "custom",
             "type" : "uni-app:app-ios"
         },

+ 12 - 0
api/pda/picking.js

@@ -47,3 +47,15 @@ export async function pickOutInOrder(params) {
   }
   return Promise.reject(data.message);
 }
+
+
+// pda保存
+export async function findVoucherList(params) {
+  const data = await postJ(
+   Vue.prototype.apiUrl  + `/pda/mes/workreport/findVoucherList`, params,true,
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}

+ 62 - 3
api/pda/workOrder.js

@@ -241,8 +241,25 @@ export async function realTimeInventory(params) {
 }
 
 
-
-
+export async function categoryGetList(params) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/main/category/getList`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+export async function assetPdaPage(params) {
+	// 调用get函数获取数据
+	const data = await get(
+		Vue.prototype.apiUrl + `/main/asset/pdaPage`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
 
 
 // 生产明细
@@ -413,6 +430,7 @@ export async function cancelPacking(params) {
 }
 
 
+
 // pda 内包装
 
 export async function packingReport(params) {
@@ -425,6 +443,19 @@ export async function packingReport(params) {
 	}
 	return Promise.reject(data.message);
 }
+
+//最小包装
+export async function packageDisposition(taskId) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/main/category/packageDisposition/${taskId}`
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
 // pda包装 内查询
 
 export async function getPackingReport(params) {
@@ -665,6 +696,21 @@ export async function removeCache(params) {
 }
 
 
+// 获取领料详情
+
+export async function znPdaPage(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/main/asset/znPdaPage`, params, true,
+	);
+
+	if (data.code == 0) {
+		
+		return data.data.list;
+	}
+	return Promise.reject(data.message);
+}
+
+
 // 质检-获取质检参数
 
 export async function qualityParamApi(params) {
@@ -717,4 +763,17 @@ export async function checkOutsourceMaterial(param) {
 		return data.data;
 	}
 	return Promise.reject(data.message);
-}
+}
+
+export async function productReceiveCreate(param) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/pda/mes/workreport/productReceiveCreate/${param}`, 
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+// /pda/mes/workreport/findVoucherList

+ 582 - 491
pages/pda/components/bottomOperate.vue

@@ -1,22 +1,32 @@
 <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>
+			<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>
+			<view v-if="clientEnvironmentId == 2">
+				<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>
+				</view>
 			</view>
+			<view v-else>
+				<view v-for="(item, index) in btnListOne[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>
+				</view>
+			</view>
 
 			<!-- 
 
@@ -29,14 +39,14 @@
 		 -->
 
 			<view v-if="newTaskObj.existOutsource == 1" class="list rx-bc" @click="operate('outPicking', {})">
-				<view class="round">{{btnList[btnState].length + 1}}</view>
+				<view class="round">{{ btnList[btnState].length + 1 }}</view>
 				<view class="name">委外领料</view>
 				<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
 			</view>
 
 			<view v-if="newTaskObj.existOutsource == 1" class="list rx-bc"
-				@click="operate('jobBooking', { isOutsource: 1})">
-				<view class="round">{{btnList[btnState].length + 2}}</view>
+				@click="operate('jobBooking', { isOutsource: 1 })">
+				<view class="round">{{ btnList[btnState].length + 2 }}</view>
 				<view class="name">委外报工</view>
 				<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
 			</view>
@@ -47,22 +57,22 @@
 
 
 		</view>
-	
+
 
 		<view class="btn_box">
-			<view class="btn" @click="handPause()">{{ GDStatus == 9 ?  '取消暂停' : '暂停' }}</view>
+			<view class="btn" @click="handPause()">{{ GDStatus == 9 ? '取消暂停' : '暂停' }}</view>
 			<view class="btn" @click="handTerminate()">终止</view>
 			<view class="btn">转派</view>
 			<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">
-					<view class="title">【{{taskObj.currentTaskName}}】是否委外</view>
+					<view class="title">【{{ taskObj.currentTaskName }}】是否委外</view>
 
 
 
@@ -92,7 +102,7 @@
 						</u-form-item>
 
 						<u-form-item label="委外场景:" borderBottom prop="taskIds">
-								{{sceneText}}
+							{{ sceneText }}
 						</u-form-item>
 
 
@@ -100,11 +110,11 @@
 
 						<u-form-item label="直接入库:" borderBottom prop="isInWarehouse"
 							v-if="outsourceForm.isFirstTask != 1">
-							<u-checkbox-group v-model="isInWarehouse" size="15px" v-if="clientEnvironmentId != 2 ">
+							<u-checkbox-group v-model="isInWarehouse" size="15px" v-if="clientEnvironmentId != 2">
 								<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
 									label="是"></u-checkbox>
 							</u-checkbox-group>
-							<view style="font-size: 15px;" v-if="clientEnvironmentId == 2 ">是</view>
+							<view style="font-size: 15px;" v-if="clientEnvironmentId == 2">是</view>
 
 
 							<zxz-uni-data-select style="margin-left: 10px; font-size: 15px;"
@@ -157,645 +167,726 @@
 </template>
 
 <script>
-	import {
-		getTwoTreeByPid,
-		checkOutsource,
-		applyoutsourceSave,
-		producerouting,
-		getWarehouseList,
-		updateStatusPause,
-		updateStatusPauseRecover,
-		updateStatusTerminate
-	} from '@/api/pda/workOrder.js'
-
-	import SearchPopup from './searchPopup.vue'
-
-	import outsourceList from './outsourceList.vue'
-	import handover from './handover.vue'
-
-	import {
-		EventBus
-	} from '@/utils/eventBus.js'
-
-
-	export default {
-		components: {
-			SearchPopup,
-			outsourceList,
-			handover
+import {
+	getTwoTreeByPid,
+	checkOutsource,
+	applyoutsourceSave,
+	producerouting,
+	getWarehouseList,
+	updateStatusPause,
+	updateStatusPauseRecover,
+	updateStatusTerminate
+} from '@/api/pda/workOrder.js'
+
+import SearchPopup from './searchPopup.vue'
+
+import outsourceList from './outsourceList.vue'
+import handover from './handover.vue'
+
+import {
+	EventBus
+} from '@/utils/eventBus.js'
+
+
+export default {
+	components: {
+		SearchPopup,
+		outsourceList,
+		handover
+	},
+
+	props: {
+		state: String | Number,
+		gdStatus: String | Number,
+		taskObj: Object,
+
+		controlReportMethod: String | Number,
+
+		stepsList: {
+			type: Array,
+			default: () => []
 		},
 
-		props: {
-			state: String | Number,
-			gdStatus: String | Number,
-			taskObj: Object,
+	},
 
-			controlReportMethod: String | Number,
+	watch: {
+		btns: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
+				this.btnsList = []
+				this.btnsList = newVal
+			}
+		},
 
-			stepsList: {
-				type: Array,
-				default: () => []
-			},
+		state: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
+				this.btnState = newVal
+			}
+		},
 
+
+		gdStatus: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
+				this.GDStatus = newVal
+			}
 		},
 
-		watch: {
-			btns: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
-					this.btnsList = []
-					this.btnsList = newVal
-				}
-			},
 
-			state: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
-					this.btnState = newVal
-				}
-			},
 
 
-			gdStatus: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
-					this.GDStatus = newVal
-				}
-			},
+		controlReportMethod: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
 
+				this.btnControlReportMethod = newVal
+			}
+		},
 
+		taskObj: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
+				console.log(newVal)
+				this.newTaskObj = newVal
 
+			}
+		},
 
-			controlReportMethod: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
+		
+		stepsList: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
 
-					this.btnControlReportMethod = newVal
-				}
-			},
 
-			taskObj: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
-					console.log(newVal)
-					this.newTaskObj = newVal
+			}
+		}
+	},
+
+	data() {
+		return {
+			isOperate: false,
+			sceneText: '',
+			outsourceScene: null,
+			btnsList: [],
+			btnState: 1,
+			GDStatus: null,
+			btnControlReportMethod: null,
+			btnList: {
+				1: [{
+					name: '领料',
+					type: 'picking'
+				},
+				{
+					name: '投料',
+					type: 'feeding'
+				},
 
-				}
-			},
+				{
+					name: '更换周转车',
+					type: 'turnover'
+				},
+				{
+					name: '报工',
+					type: 'jobBooking',
+					isOutsource: 0
+				},
+					// {
+					// 	name: '多工单报工',
+					// 	type: ''
+					// }
 
 
-			stepsList: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
 
+				],
+				2: [{
+					name: '取样',
+					type: 'sample'
+				},
+				{
+					name: '报工',
+					type: 'sampleJob'
+				},
+				],
+
+				3: [{
+					name: '更换周转车',
+					type: 'qualityTurnover'
+				},
 
+				{
+					name: '质检',
+					type: 'inspection'
+				},
+
+				{
+					name: '报工',
+					type: 'inspectionJob'
 				}
-			}
-		},
 
-		data() {
-			return {
-				isOperate: false,
-				sceneText:'',
-				outsourceScene:null,
-				btnsList: [],
-				btnState: 1,
-
-				GDStatus: null,
-				btnControlReportMethod: null,
-				btnList: {
-					1: [{
-							name: '领料',
-							type: 'picking'
-						},
-						{
-							name: '投料',
-							type: 'feeding'
-						},
-
-						{
-							name: '更换周转车',
-							type: 'turnover'
-						},
-						{
-							name: '报工',
-							type: 'jobBooking',
-							isOutsource: 0
-						},
-						// {
-						// 	name: '多工单报工',
-						// 	type: ''
-						// }
-
-
-
-					],
-					2: [{
-							name: '取样',
-							type: 'sample'
-						},
-						{
-							name: '报工',
-							type: 'sampleJob'
-						},
-					],
-
-					3: [{
-							name: '更换周转车',
-							type: 'qualityTurnover'
-						},
-
-						{
-							name: '质检',
-							type: 'inspection'
-						},
-
-						{
-							name: '报工',
-							type: 'inspectionJob'
-						}
 
 
+				],
 
-					],
+				4: [{
+					name: '领料',
+					type: 'picking'
+				},
+				{
+					name: '投料',
+					type: 'feeding'
+				},
+				{
+					name: '报工',
+					type: 'jobBooking'
+				},
 
-					4: [{
-							name: '领料',
-							type: 'picking'
-						},
-						{
-							name: '投料',
-							type: 'feeding'
-						},
-						{
-							name: '报工',
-							type: 'jobBooking'
-						},
 
+				],
 
-					],
+				5: [{
+					name: '入库',
+					type: 'warehousing'
+				},
 
-					5: [{
-							name: '入库',
-							type: 'warehousing'
-						},
+				],
 
-					],
+				6: [{
+					name: '报工',
+					type: 'jobBooking'
+				},
 
-					6: [{
-							name: '报工',
-							type: 'jobBooking'
-						},
 
 
+				],
 
-					],
 
+			},
+			btnListOne: {
+				1: [{
+					name: '领料',
+					type: 'picking'
+				},
+				{
+					name: '投料',
+					type: 'feeding'
+				},
 
+				{
+					name: '报工',
+					type: 'jobBooking',
+					isOutsource: 0
 				},
-				sceneText:'',
-				outsourceScene:null,
-				newTaskObj: {},
-				outsourceShow: false,
+					// {
+					// 	name: '多工单报工',
+					// 	type: ''
+					// }
+
 
-				outsourceForm: {
 
+				],
+				2: [{
+					name: '取样',
+					type: 'sample'
+				},
+				{
+					name: '报工',
+					type: 'sampleJob'
 				},
+				],
+
+				3: [
 
-				produceList: [],
-				warehouseList: [],
 
-				typeList: [{
-						id: 4,
-						name: '带料生产委外'
-					},
 					{
-						id: 5,
-						name: '不带料生产委外'
+						name: '质检',
+						type: 'inspection'
 					},
 
+					{
+						name: '报工',
+						type: 'inspectionJob'
+					}
+
+
+
 				],
 
-				newStepsList: [],
-				
-				
+				4: [{
+					name: '领料',
+					type: 'picking'
+				},
+				{
+					name: '投料',
+					type: 'feeding'
+				},
+				{
+					name: '报工',
+					type: 'jobBooking'
+				},
 
-				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-				isInWarehouse: []
+				],
 
+				5: [{
+					name: '入库',
+					type: 'warehousing'
+				},
 
+				],
 
-			}
-		},
+				6: [{
+					name: '报工',
+					type: 'jobBooking'
+				},
 
 
-		created() {
 
-		},
+				],
 
-		methods: {
-
-			// 委外时间选择
-			
-			//委外到 类型选择
-			changeTaskId(e){
-				console.log(this.outsourceForm);
-				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
 			},
+			sceneText: '',
+			outsourceScene: null,
+			newTaskObj: {},
+			outsourceShow: false,
 
-			operate(type, item) {
+			outsourceForm: {
 
-				console.log(type, item);
+			},
+
+			produceList: [],
+			warehouseList: [],
 
-				this.$emit('operate', type, item)
+			typeList: [{
+				id: 4,
+				name: '带料生产委外'
+			},
+			{
+				id: 5,
+				name: '不带料生产委外'
 			},
 
+			],
 
-			handOutsource() {
+			newStepsList: [],
 
 
-				let param = {
-					taskId: this.newTaskObj.currentTaskId,
-					workOrderId: this.newTaskObj.workOrderId,
 
-				}
-				checkOutsource(param).then(res => {
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-					this.outsourceForm = {
-						...res,
+			isInWarehouse: []
 
 
-					}
-					this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
 
+		}
+	},
+
+
+	created() {
+
+	},
+
+	methods: {
 
+		// 委外时间选择
 
-					if (res.outsource) {
-						this.getNewSteps()
-						this.outsourceShow = true
-						this.produceFn()
-						this.getWarehouseFn()
+		//委外到 类型选择
+		changeTaskId(e) {
+			console.log(this.outsourceForm, e);
+			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 {
-						uni.showToast({
-							title: '此工序不能委外',
-							icon: 'none'
-						})
+						//多工序
+						this.sceneText = "多工序"
+						this.outsourceForm.outsourceScene = 3;
 					}
+				}
+
+			} else {
+				uni.showToast({
+					title: '委外到工序为空',
+					icon: 'none'
 				})
+			}
+		},
 
-			},
+		open() {
+			this.isOperate = !this.isOperate
+		},
 
+		operate(type, item) {
 
-			handPause() {
-				if (this.GDStatus == 9) {
-					uni.showModal({
-						title: '提示',
-						content: '确定该工单取消暂停?',
-						success: async res => {
-							if (res.confirm) {
-								updateStatusPauseRecover([this.newTaskObj.workOrderId]).then(res => {
-									this.$emit('refresh')
-								})
-							}
-						}
-					})
+			this.$emit('operate', type, item)
+		},
+
+
+		handOutsource() {
 
+
+			let param = {
+				taskId: this.newTaskObj.currentTaskId,
+				workOrderId: this.newTaskObj.workOrderId,
+
+			}
+			checkOutsource(param).then(res => {
+
+				this.outsourceForm = {
+					...res,
+
+
+				}
+				this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
+
+
+
+				if (res.outsource) {
+					this.getNewSteps()
+					this.outsourceShow = true
+					this.produceFn()
+					this.getWarehouseFn()
 				} else {
-					uni.showModal({
-						title: '提示',
-						content: '确定该工单暂停?',
-						success: async res => {
-							if (res.confirm) {
-								updateStatusPause([this.newTaskObj.workOrderId]).then(res => {
-									this.$emit('refresh')
-								})
-							}
-						}
+					uni.showToast({
+						title: '此工序不能委外',
+						icon: 'none'
 					})
 				}
+			})
 
-			},
-
-			handHandover() {
-				this.$refs.handoverRef.open()
-			},
+		},
 
-			handTerminate() {
 
+		handPause() {
+			if (this.GDStatus == 9) {
 				uni.showModal({
 					title: '提示',
-					content: '确定该工单终止?',
+					content: '确定该工单取消暂停?',
 					success: async res => {
 						if (res.confirm) {
-							updateStatusTerminate([this.newTaskObj.workOrderId]).then(res => {
+							updateStatusPauseRecover([this.newTaskObj.workOrderId]).then(res => {
 								this.$emit('refresh')
 							})
 						}
 					}
 				})
-			},
-			outCancel() {
-				this.sceneText="";//委外场景
-				this.outsourceForm.outsourceScene =null;
-				this.outsourceShow = false
-				EventBus.$off('outEvent');
-			},
 
-			getNewSteps() {
-				this.activeIndex = this.getIndexOfElementInArray(this.stepsList, this.newTaskObj.currentTaskId)
-
-				this.newStepsList = []
-				this.stepsList.forEach((f, i) => {
-					if (f.taskId != '-1' && f.taskId != '-2' && i > this.activeIndex && (f.type == 1 || f.type ==
-							4)) {
-						this.newStepsList.push(f)
+			} else {
+				uni.showModal({
+					title: '提示',
+					content: '确定该工单暂停?',
+					success: async res => {
+						if (res.confirm) {
+							updateStatusPause([this.newTaskObj.workOrderId]).then(res => {
+								this.$emit('refresh')
+							})
+						}
 					}
 				})
+			}
 
+		},
 
+		handHandover() {
+			this.$refs.handoverRef.open()
+		},
 
-			},
+		handTerminate() {
 
-			getIndexOfElementInArray(array, target) {
-				for (let i = 0; i < array.length; i++) {
-					if (array[i].taskId === target) {
-						return i; // 返回第一次出现target的索引位置
+			uni.showModal({
+				title: '提示',
+				content: '确定该工单终止?',
+				success: async res => {
+					if (res.confirm) {
+						updateStatusTerminate([this.newTaskObj.workOrderId]).then(res => {
+							this.$emit('refresh')
+						})
 					}
 				}
-				return -1; // 未找到目标值时返回-1
-			},
-
-
-
-
+			})
+		},
+		outCancel() {
+			this.sceneText = "";//委外场景
+			this.outsourceForm.outsourceScene = null;
+			this.outsourceShow = false
+			EventBus.$off('outEvent');
+		},
 
+		getNewSteps() {
+			this.activeIndex = this.getIndexOfElementInArray(this.stepsList, this.newTaskObj.currentTaskId)
 
-			// 工艺路线
-			produceFn() {
-				let param = {
-					pageNum: 1,
-					size: -1,
-					routeType: 2
+			this.newStepsList = []
+			this.stepsList.forEach((f, i) => {
+				if (f.taskId != '-1' && f.taskId != '-2' && i > this.activeIndex && (f.type == 1 || f.type ==
+					4)) {
+					this.newStepsList.push(f)
 				}
-				producerouting(param).then(res => {
-					this.produceList = res.list
+			})
 
-				})
-			},
 
-			// 仓库 
-			getWarehouseFn() {
-				getWarehouseList().then(res => {
-					this.warehouseList = res
-				})
-			},
 
+		},
 
-			outsourceOk() {
-				if (!this.outsourceForm.name) {
-					uni.showToast({
-						title: '请输入委外名称',
-						icon: 'none'
-					})
-					return false
+		getIndexOfElementInArray(array, target) {
+			for (let i = 0; i < array.length; i++) {
+				if (array[i].taskId === target) {
+					return i; // 返回第一次出现target的索引位置
 				}
+			}
+			return -1; // 未找到目标值时返回-1
+		},
 
 
-				if (!this.outsourceForm.type) {
-					uni.showToast({
-						title: '请选择委外类型',
-						icon: 'none'
-					})
-					return false
-				}
 
 
 
 
+		// 工艺路线
+		produceFn() {
+			let param = {
+				pageNum: 1,
+				size: -1,
+				routeType: 2
+			}
+			producerouting(param).then(res => {
+				this.produceList = res.list
 
-				if (!this.outsourceForm.requireDeliveryTime) {
-					uni.showToast({
-						title: '请选择委外完成时间',
-						icon: 'none'
-					})
-					return false
-				}
-				if (this.clientEnvironmentId == 2) {
-					this.outsourceForm.isInWarehouse = 1
-				} else {
-					this.isInWarehouse.length > 0 ? this.outsourceForm.isInWarehouse = 1 : this.outsourceForm
-						.isInWarehouse = 0
-				}
-				if(this.outsourceForm.requireDeliveryTime.indexOf('00:00:00')===-1){
-					this.outsourceForm.requireDeliveryTime = this.outsourceForm.requireDeliveryTime+'00:00:00';
-				}
-	
-				let param = {
-					...this.outsourceForm,
-					taskId: this.newTaskObj.currentTaskId,
-					workOrderId: this.newTaskObj.workOrderId,
+			})
+		},
 
-				}
+		// 仓库 
+		getWarehouseFn() {
+			getWarehouseList().then(res => {
+				this.warehouseList = res
+			})
+		},
 
-				console.log(param)
-				this.sceneText="";//委外场景
-				this.outsourceForm.outsourceScene =null;
-				this.$refs.outsourceListRef.open(param)
 
+		outsourceOk() {
+			if (!this.outsourceForm.name) {
+				uni.showToast({
+					title: '请输入委外名称',
+					icon: 'none'
+				})
+				return false
+			}
 
 
-				// let param = {
-				// 	...this.outsourceForm,
-				// 	taskId: this.newTaskObj.currentTaskId,
-				// 	workOrderId: this.newTaskObj.workOrderId,
-				// 	isRelease: isRelease
-				// }
+			if (!this.outsourceForm.type) {
+				uni.showToast({
+					title: '请选择委外类型',
+					icon: 'none'
+				})
+				return false
+			}
 
-				// applyoutsourceSave(param).then(res => {
-				// 	console.log(res)
-				// 	this.outCancel()
-				// })
-			},
 
 
-		}
-	}
-</script>
 
-<style lang="scss" scoped>
-	.bottom_box {
-		background: #fff;
-	}
 
-	.nav_box {
-		width: 750rpx;
-		height: 40rpx;
-		background: $theme-color;
+			if (!this.outsourceForm.requireDeliveryTime) {
+				uni.showToast({
+					title: '请选择委外完成时间',
+					icon: 'none'
+				})
+				return false
+			}
+			if (this.clientEnvironmentId == 2) {
+				this.outsourceForm.isInWarehouse = 1
+			} else {
+				this.isInWarehouse.length > 0 ? this.outsourceForm.isInWarehouse = 1 : this.outsourceForm
+					.isInWarehouse = 0
+			}
+			if (this.outsourceForm.requireDeliveryTime.indexOf('00:00:00') === -1) {
+				this.outsourceForm.requireDeliveryTime = this.outsourceForm.requireDeliveryTime + '00:00:00';
+			}
 
-		.open_icon {
-			width: 48rpx;
-			height: 48rpx;
-		}
+			let param = {
+				...this.outsourceForm,
+				taskId: this.newTaskObj.currentTaskId,
+				workOrderId: this.newTaskObj.workOrderId,
 
-		.open_icon_reversal {
-			transform: scaleY(-1);
-			/* 垂直翻转 */
+			}
 
-		}
-	}
+			console.log(param)
+			this.sceneText = "";//委外场景
+			this.outsourceForm.outsourceScene = null;
+			this.$refs.outsourceListRef.open(param)
 
-	.operate_list {
-		margin: 0 32rpx;
 
-		.list {
-			border-radius: 8rpx;
-			border: 1rpx solid $theme-color;
-			background: #F0F8F2;
-			height: 64rpx;
-			padding: 0rpx 16rpx;
-			margin-top: 16rpx;
 
-		}
+			// let param = {
+			// 	...this.outsourceForm,
+			// 	taskId: this.newTaskObj.currentTaskId,
+			// 	workOrderId: this.newTaskObj.workOrderId,
+			// 	isRelease: isRelease
+			// }
 
-		.round {
-			width: 32rpx;
-			height: 32rpx;
-			line-height: 32rpx;
-			text-align: center;
-			border-radius: 50%;
-			background: $theme-color;
-			font-size: 24rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: #fff;
-		}
+			// applyoutsourceSave(param).then(res => {
+			// 	console.log(res)
+			// 	this.outCancel()
+			// })
+		},
 
-		.name {
-			font-family: PingFang HK;
-			font-size: 24rpx;
-			font-style: normal;
-			font-weight: 600;
-			color: $theme-color;
-		}
 
-		.arrow_right {
-			width: 32rpx;
-			height: 32rpx;
-		}
 	}
+}
+</script>
 
-	.btn_box {
-		display: flex;
-		padding: 16rpx 32rpx;
-		align-items: flex-start;
-		gap: 16rpx;
-		align-self: stretch;
-
-		.btn {
-			width: 160rpx;
-			height: 64rpx;
-			line-height: 64rpx;
-			background: $theme-color;
-			text-align: center;
-			border-radius: 8rpx;
-			color: #fff;
-			font-family: PingFang HK;
-			font-size: 24rpx;
-			font-style: normal;
-			font-weight: 600;
+<style lang="scss" scoped>
+.bottom_box {
+	background: #fff;
+}
+
+.nav_box {
+	width: 750rpx;
+	height: 40rpx;
+	background: $theme-color;
+
+	.open_icon {
+		width: 48rpx;
+		height: 48rpx;
+	}
+
+	.open_icon_reversal {
+		transform: scaleY(-1);
+		/* 垂直翻转 */
 
-		}
 	}
+}
 
+.operate_list {
+	margin: 0 32rpx;
 
-	.operate_box {
-		padding: 10rpx 20rpx;
+	.list {
+		border-radius: 8rpx;
+		border: 1rpx solid $theme-color;
+		background: #F0F8F2;
+		height: 64rpx;
+		padding: 0rpx 16rpx;
+		margin-top: 16rpx;
 
-		/deep/ .u-button {
-			width: 180rpx;
-		}
 	}
 
-	.popup_list {
-		width: 78vw;
-		min-height: 360rpx;
-		padding: 0 32rpx;
-
-		.title {
-			color: #333;
-			font-size: 32rpx;
-			text-align: center;
-			padding: 30rpx;
+	.round {
+		width: 32rpx;
+		height: 32rpx;
+		line-height: 32rpx;
+		text-align: center;
+		border-radius: 50%;
+		background: $theme-color;
+		font-size: 24rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: #fff;
+	}
 
+	.name {
+		font-family: PingFang HK;
+		font-size: 24rpx;
+		font-style: normal;
+		font-weight: 600;
+		color: $theme-color;
+	}
 
-		}
+	.arrow_right {
+		width: 32rpx;
+		height: 32rpx;
 	}
+}
 
+.btn_box {
+	display: flex;
+	padding: 16rpx 32rpx;
+	align-items: flex-start;
+	gap: 16rpx;
+	align-self: stretch;
 
-	.list_item_btn {
+	.btn {
 		width: 160rpx;
-		height: 54rpx;
-		line-height: 54rpx;
+		height: 64rpx;
+		line-height: 64rpx;
 		background: $theme-color;
 		text-align: center;
 		border-radius: 8rpx;
 		color: #fff;
 		font-family: PingFang HK;
-		font-size: 22rpx;
+		font-size: 24rpx;
 		font-style: normal;
 		font-weight: 600;
+
 	}
+}
 
 
-	.content_num {
-		display: flex;
-		align-items: center;
-		padding: 0 4rpx;
+.operate_box {
+	padding: 10rpx 20rpx;
 
-		/deep/ .uni-input-input {
-			border: 2rpx solid #F0F8F2;
-			background: #F0F8F2;
-			color: $theme-color;
-		}
+	/deep/ .u-button {
+		width: 180rpx;
+	}
+}
+
+.popup_list {
+	width: 78vw;
+	min-height: 360rpx;
+	padding: 0 32rpx;
+
+	.title {
+		color: #333;
+		font-size: 32rpx;
+		text-align: center;
+		padding: 30rpx;
 
 
 	}
+}
+
+
+.list_item_btn {
+	width: 160rpx;
+	height: 54rpx;
+	line-height: 54rpx;
+	background: $theme-color;
+	text-align: center;
+	border-radius: 8rpx;
+	color: #fff;
+	font-family: PingFang HK;
+	font-size: 22rpx;
+	font-style: normal;
+	font-weight: 600;
+}
+
+
+.content_num {
+	display: flex;
+	align-items: center;
+	padding: 0 4rpx;
+
+	/deep/ .uni-input-input {
+		border: 2rpx solid #F0F8F2;
+		background: #F0F8F2;
+		color: $theme-color;
+	}
+
+
+}
 </style>

+ 8 - 3
pages/pda/components/outsourceList.vue

@@ -446,11 +446,16 @@
 			handleEvent({
 				message
 			}) {
+				console.log(message,'message999999999999');
+
 				if (message.pid == 3) {
-					this.standardOutputList = message.memoList
+					this.standardOutputList = [...this.standardOutputList,...message.memoList];
 				} else {
 					if (message.pid == 2) {
+						
 						this.bomMaterialList = message.memoList
+						// console.log(this.bomMaterialList,'1111111111');
+						// return 
 					}
 				}
 
@@ -508,7 +513,7 @@
 
 				uni.setStorageSync(storageKey, arr);
 				uni.navigateTo({
-					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=zdy&taskId=${this.outObj.taskId}&classIds=[1,23,9]`
+					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=weiwai&taskId=${this.outObj.taskId}&classIds=[1,23,9]`
 				})
 			},
 
@@ -522,7 +527,7 @@
 					return
 				}
 				let _pickOutInList = []
-				if (this.clientEnvironmentId = 2) {
+				if (this.clientEnvironmentId == 2) {
 					_pickOutInList = this.pickOutInList
 				} else {
 					_pickOutInList = this.pickOutInList.filter(f => f.checked == true)

+ 416 - 394
pages/pda/feeding/components/deviceBom.vue

@@ -50,34 +50,57 @@
 						</view>
 
 					</view>
+					<view v-if="item.isSJSB === '1'">
+						<!-- v-if="item.isSBFL==" -->
+						<view class="item">
+							<view class="lable rx-cc">炉次号</view>
+							<view class="content content_num">
+								<input class="uni-input" v-model="item.extInfo.heatNumber"></input>
+							</view>
 
+							<view v-if="clientEnvironmentId == 2" class="lable rx-cc"
+								:style="Object.prototype.hasOwnProperty.call(item.extInfo, 'turnoverList') && item.extInfo.turnoverList.length > 0 ? 'color: #E6A23C' : 'color: #157A2C'"
+								@click="handleStorage(index)">货位</view>
 
+						</view>
 
-					<view class="item" >
-
-						<view class="lable rx-cc">炉次号</view>
-						<view class="content content_num">
-							<input class="uni-input" v-model="item.extInfo.heatNumber" ></input>
+						<view class="item"
+							v-if="clientEnvironmentId == 2 && Object.prototype.hasOwnProperty.call(item, 'equipmentLabelJson') && item.equipmentLabelJson.length != 0 && item.equipmentLabelJson[0].SBFL == 1">
+							<view class="lable rx-cc">是否封炉</view>
+							<view class="content">
+								<u-checkbox-group v-model="item.isSBFL" size="15px">
+									<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
+										label="是"></u-checkbox>
+								</u-checkbox-group>
+							</view>
 						</view>
+					</view>
 
-						<view v-if="clientEnvironmentId == 2" class="lable rx-cc"
-							:style="Object.prototype.hasOwnProperty.call(item.extInfo, 'turnoverList') && item.extInfo.turnoverList.length > 0 ? 'color: #E6A23C' : 'color: #157A2C'"
-							@click="handleStorage(index)">货位</view>
+					<view v-else>
+						<!-- v-if="item.isSBFL==" -->
+						<view class="item">
+							<view class="lable rx-cc">炉次号</view>
+							<view class="content content_num">
+								<input class="uni-input" v-model="item.extInfo.heatNumber"></input>
+							</view>
 
-					</view>
+							<view v-if="clientEnvironmentId == 2" class="lable rx-cc"
+								:style="Object.prototype.hasOwnProperty.call(item.extInfo, 'turnoverList') && item.extInfo.turnoverList.length > 0 ? 'color: #E6A23C' : 'color: #157A2C'"
+								@click="handleStorage(index)">货位</view>
 
-					<view class="item"
-						v-if="clientEnvironmentId == 2 && Object.prototype.hasOwnProperty.call(item, 'equipmentLabelJson') && item.equipmentLabelJson.length != 0 && item.equipmentLabelJson[0].SBFL == 1">
-						<view class="lable rx-cc">是否封炉</view>
-						<view class="content">
-							<u-checkbox-group v-model="item.isSBFL" size="15px">
-								<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
-									label="是"></u-checkbox>
-							</u-checkbox-group>
 						</view>
-					</view>
-
 
+						<view class="item"
+							v-if="clientEnvironmentId == 2 && Object.prototype.hasOwnProperty.call(item, 'equipmentLabelJson') && item.equipmentLabelJson.length != 0 && item.equipmentLabelJson[0].SBFL == 1">
+							<view class="lable rx-cc">是否封炉</view>
+							<view class="content">
+								<u-checkbox-group v-model="item.isSBFL" size="15px">
+									<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
+										label="是"></u-checkbox>
+								</u-checkbox-group>
+							</view>
+						</view>
+					</view>
 
 				</view>
 			</view>
@@ -85,8 +108,6 @@
 		</u-list>
 		<SearchPopup mode="center" v-if='popupShow'>
 			<template v-slot:list>
-
-
 				<view class="tab_box">
 					<view class="tab_item" :style="tabAct == idxx ? 'color: #E6A23C' : ''"
 						v-for="(idItem, idxx) in turnoverList" :key="idxx" @click="handTab(idxx)">
@@ -108,7 +129,7 @@
 								<zxz-uni-data-select :localdata="turnover" v-model="idItem.turnoverId" dataValue='id'
 									format='{name}-{code}' dataKey="id" filterable :clear='false'
 									@change="e => changeTurnover(e, idxx)" v-if="!isDetails"></zxz-uni-data-select>
-								<text v-else>{{ idItem.turnoverName}} </text>
+								<text v-else>{{ idItem.turnoverName }} </text>
 							</u-form-item>
 
 
@@ -132,11 +153,11 @@
 											{{ it.code }}
 										</view>
 										<view class="item ww25 "
-											:class="{'color157': it.workOrderCode === wordItem.code}">
+											:class="{ 'color157': it.workOrderCode === wordItem.code }">
 											{{ it.workOrderCode }}
 										</view>
 										<view class="item ww25 "
-											:class="{'color157': it.workOrderCode === wordItem.code}">
+											:class="{ 'color157': it.workOrderCode === wordItem.code }">
 											{{ it.categoryCode }}
 										</view>
 
@@ -168,7 +189,7 @@
 
 
 					<!-- 卸车 -->
-					<view v-if="type!=='feeding'">	
+					<view v-if="type !== 'feeding'">
 						<view class="search_list">
 							<u-form labelPosition="left" :model="idItem" labelWidth="200" labelAlign="left"
 								class="baseForm">
@@ -178,7 +199,7 @@
 										dataValue='id' format='{name}-{code}' dataKey="id" filterable :clear='false'
 										@change="e => changeUnloadTurnover(e, idxx, idItem)"
 										v-if="!isDetails"></zxz-uni-data-select>
-									<text v-else>{{ idItem.unloadTurnoverName}} </text>
+									<text v-else>{{ idItem.unloadTurnoverName }} </text>
 								</u-form-item>
 
 
@@ -197,17 +218,18 @@
 							</view>
 							<view class="table">
 								<u-list @scrolltolower="scrolltolower" class="z_list">
-									<view class="tr row rx-sc" v-for="(it, idx) in idItem.unloadPositionList" :key='idx'>
+									<view class="tr row rx-sc" v-for="(it, idx) in idItem.unloadPositionList"
+										:key='idx'>
 										<view class="tr row rx-sc">
 											<view class="item ww10">
 												{{ it.code }}
 											</view>
 											<view class="item ww25 "
-												:class="{'color157': it.workOrderCode === wordItem.code}">
+												:class="{ 'color157': it.workOrderCode === wordItem.code }">
 												{{ it.workOrderCode }}
 											</view>
 											<view class="item ww25 "
-												:class="{'color157': it.workOrderCode === wordItem.code}">
+												:class="{ 'color157': it.workOrderCode === wordItem.code }">
 												{{ it.categoryCode }}
 											</view>
 
@@ -236,14 +258,14 @@
 				</view>
 
 
-				
+
 
 			</template>
 
 			<template v-slot:operate>
 				<view style="margin-bottom: 10px;">
 					和:{{ feedingSumNum }}
-				</view>	
+				</view>
 
 				<view class="operate_box rx-bc">
 					<u-button size="small" class="u-reset-button" @click="handleClose" v-if="ishuoWei">
@@ -265,522 +287,522 @@
 </template>
 
 <script>
-	import SearchPopup from '../../components/searchPopup.vue'
-	export default {
-		components: {
-			SearchPopup
+import SearchPopup from '../../components/searchPopup.vue'
+export default {
+	components: {
+		SearchPopup
+	},
+	props: {
+		workOrderId: {
+			type: String,
+			default: ''
 		},
-		props: {
-			workOrderId: {
-				type: String,
-				default: ''
-			},
-			
-			type: {
-				type: String,
-				default: ''
-			},
-			list: {
-				type: Array,
-				default: () => []
-			},
-
-			ishuoWei: {
-				type: Boolean,
-				default: true
-			},
-			wordItem: {
-				type: Object,
-				default: () => {}
-			},
-
-			turnover: {
-				type: Array,
-				default: () => []
-			},
-
-			isDetails: {
-				type: Boolean,
-				default: false
-			}
 
+		type: {
+			type: String,
+			default: ''
+		},
+		list: {
+			type: Array,
+			default: () => []
+		},
 
+		ishuoWei: {
+			type: Boolean,
+			default: true
+		},
+		wordItem: {
+			type: Object,
+			default: () => { }
+		},
 
+		turnover: {
+			type: Array,
+			default: () => []
 		},
-		data() {
-			return {
-				popupShow: false,
-				 
-				listIndex: null,
-				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,// *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-				turnoverList: [{
-					name: '周转车',
-					turnoverId: '',
-					turnoverName: '',
-					positionList: [],
+		isDetails: {
+			type: Boolean,
+			default: false
+		}
 
-					unloadTurnoverId: '',
-					unloadTurnoverName: '',
-					unloadPositionList: []
-				}],
 
-				unloadTurnover: [],
-				feedingSumNum: 0,
 
+	},
+	data() {
+		return {
+			popupShow: false,
 
-				tabAct: 0
+			listIndex: null,
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,// *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
+			turnoverList: [{
+				name: '周转车',
+				turnoverId: '',
+				turnoverName: '',
+				positionList: [],
 
+				unloadTurnoverId: '',
+				unloadTurnoverName: '',
+				unloadPositionList: []
+			}],
+
+			unloadTurnover: [],
+			feedingSumNum: 0,
+
+
+			tabAct: 0
 
 
-			}
-		},
-		created() {
 
 
+		}
+	},
+	created() {
+
+
+	},
+	methods: {
+		handleScan(id) {
+			this.$emit('scanIt', id,)
 		},
-		methods: {
-			handleScan(id) {
-				this.$emit('scanIt', id, )
-			},
-
-			getDelete(idx) {
-				this.list.splice(idx, 1)
-			},
-
-			handleStorage(idx) {
-				this.listIndex = idx || 0
-				this.feedingSumNum = 0;
-				if (Object.prototype.hasOwnProperty.call(this.list[0].extInfo, 'turnoverList')) {
-					this.unloadTurnover = this.turnover
-
-					this.turnoverList = JSON.parse(JSON.stringify(this.list[0].extInfo.turnoverList)) || this.turnoverList
-				}
 
-				console.log(this.turnoverList,'this.turnoverList');
+		getDelete(idx) {
+			this.list.splice(idx, 1)
+		},
+
+		handleStorage(idx) {
+			this.listIndex = idx || 0
+			this.feedingSumNum = 0;
+			if (Object.prototype.hasOwnProperty.call(this.list[0].extInfo, 'turnoverList')) {
+				this.unloadTurnover = this.turnover
+
+				this.turnoverList = JSON.parse(JSON.stringify(this.list[0].extInfo.turnoverList)) || this.turnoverList
+			}
+
+			console.log(this.turnoverList, 'this.turnoverList');
 
-				this.turnoverList.forEach(v=>{
-					v.positionList.forEach(d=>{
-						if(d.feedNum){
-							this.feedingSumNum += Number(d.feedNum)
-						}
-					})
+			this.turnoverList.forEach(v => {
+				v.positionList.forEach(d => {
+					if (d.feedNum) {
+						this.feedingSumNum += Number(d.feedNum)
+					}
+				})
 
-				}) 
+			})
 
 
 
 
 
-				this.popupShow = true
+			this.popupShow = true
 
 
-			},
+		},
 
 
 
 
 
-			handleClose() {
-				// this.list[this.listIndex].extInfo.turnoverList = []
-				this.popupShow = false
-				this.listIndex = 0
+		handleClose() {
+			// this.list[this.listIndex].extInfo.turnoverList = []
+			this.popupShow = false
+			this.listIndex = 0
 
 
 
-			},
+		},
 
-			handleOk() {
-				this.listIndex = 0
-				this.$set(this.list[this.listIndex].extInfo, 'turnoverList', this.turnoverList)
-				this.popupShow = false
-			},
+		handleOk() {
+			this.listIndex = 0
+			this.$set(this.list[this.listIndex].extInfo, 'turnoverList', this.turnoverList)
+			this.popupShow = false
+		},
 
 
-			scrolltolower() {},
+		scrolltolower() { },
 
 
-			changeTurnover(e, idxx) {
+		changeTurnover(e, idxx) {
 
 
 
-				let _arr = e.extInfo.positionList || []
-				console.log(_arr)
+			let _arr = e.extInfo.positionList || []
+			console.log(_arr)
 
-				let isFalse = _arr.some(it => {
-					return it.workOrderCode == this.wordItem.code && it.categoryCode == this.wordItem
-						.productCode && it.quantity > 0
+			let isFalse = _arr.some(it => {
+				return it.workOrderCode == this.wordItem.code && it.categoryCode == this.wordItem
+					.productCode && it.quantity > 0
+			})
+			if (!isFalse) {
+				uni.showToast({
+					title: "该周转车没有此工单",
+					icon: "none",
 				})
-				if (!isFalse) {
-					uni.showToast({
-						title: "该周转车没有此工单",
-						icon: "none",
-					})
-					this.$set(this.turnoverList[idxx], 'turnoverId', '')
-					this.$set(this.turnoverList[idxx], 'turnoverName', '')
-					this.$set(this.turnoverList[idxx], 'positionList', [])
-
-					return false
-				}
+				this.$set(this.turnoverList[idxx], 'turnoverId', '')
+				this.$set(this.turnoverList[idxx], 'turnoverName', '')
+				this.$set(this.turnoverList[idxx], 'positionList', [])
 
-				this.$set(this.turnoverList[idxx], 'turnoverName', e.name + '-' + e.code)
-				this.$set(this.turnoverList[idxx], 'positionList', JSON.parse(JSON.stringify(e.extInfo.positionList)))
-				this.$forceUpdate()
+				return false
+			}
 
-			},
+			this.$set(this.turnoverList[idxx], 'turnoverName', e.name + '-' + e.code)
+			this.$set(this.turnoverList[idxx], 'positionList', JSON.parse(JSON.stringify(e.extInfo.positionList)))
+			this.$forceUpdate()
 
-			handTabAdd() {
-				if (this.turnover.length <= this.turnoverList.length) {
-					uni.showToast({
-						title: "超过最大周转车数",
-						icon: "none",
-					})
-					return false
-				}
+		},
 
-				this.turnoverList.push({
-					name: '周转车',
-					turnoverId: '',
-					turnoverName: '',
-					positionList: []
+		handTabAdd() {
+			if (this.turnover.length <= this.turnoverList.length) {
+				uni.showToast({
+					title: "超过最大周转车数",
+					icon: "none",
 				})
+				return false
+			}
 
-				console.log(this.list[this.listIndex].extInfo)
-				this.$forceUpdate()
+			this.turnoverList.push({
+				name: '周转车',
+				turnoverId: '',
+				turnoverName: '',
+				positionList: []
+			})
 
-			},
+			console.log(this.list[this.listIndex].extInfo)
+			this.$forceUpdate()
 
-			handTab(idxx) {
-				this.tabAct = idxx
-			},
+		},
 
-			handDel(idx) {
-				if (this.turnoverList.length <= 1) {
-					uni.showToast({
-						title: "最少需要一个周转车",
-						icon: "none",
-					})
-					return
-				}
-				this.turnoverList.splice(idx, 1)
-			},
+		handTab(idxx) {
+			this.tabAct = idxx
+		},
+
+		handDel(idx) {
+			if (this.turnoverList.length <= 1) {
+				uni.showToast({
+					title: "最少需要一个周转车",
+					icon: "none",
+				})
+				return
+			}
+			this.turnoverList.splice(idx, 1)
+		},
 
 
-			changeUnloadTurnover(e, idxx, idItem) {
+		changeUnloadTurnover(e, idxx, idItem) {
 
 
-				let _arr = idItem.positionList
-				let unloadArr = e.extInfo.positionList || []
+			let _arr = idItem.positionList
+			let unloadArr = e.extInfo.positionList || []
 
-				
-				for (let obj1 of unloadArr) {
-					for (let obj2 of _arr) {
-						if (obj1.code === obj2.code && obj2.workOrderCode === this.wordItem.code && !obj1.workOrderCode &&  !obj1.quantity) {
-							obj1.workOrderCode = obj2.workOrderCode;
-							obj1.categoryCode = obj2.categoryCode;
-							obj1.quantity = obj2.quantity;
-							obj1.feedNum = obj2.feedNum;
-							break;
-						}
+
+			for (let obj1 of unloadArr) {
+				for (let obj2 of _arr) {
+					if (obj1.code === obj2.code && obj2.workOrderCode === this.wordItem.code && !obj1.workOrderCode && !obj1.quantity) {
+						obj1.workOrderCode = obj2.workOrderCode;
+						obj1.categoryCode = obj2.categoryCode;
+						obj1.quantity = obj2.quantity;
+						obj1.feedNum = obj2.feedNum;
+						break;
 					}
 				}
+			}
 
 
 
-				this.$set(this.turnoverList[idxx], 'unloadTurnoverName', e.name + '-' + e.code)
-				this.$set(this.turnoverList[idxx], 'unloadPositionList', JSON.parse(JSON.stringify(unloadArr)))
-				this.$forceUpdate()
+			this.$set(this.turnoverList[idxx], 'unloadTurnoverName', e.name + '-' + e.code)
+			this.$set(this.turnoverList[idxx], 'unloadPositionList', JSON.parse(JSON.stringify(unloadArr)))
+			this.$forceUpdate()
 
-			},
-		}
+		},
 	}
+}
 </script>
 
 <style lang="scss" scoped>
-	.title_box {
-		margin-top: 20rpx;
-
-		.name {
-			font-size: 28rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: $theme-color;
-			padding-left: 20rpx;
-
-			position: relative;
-
-			&:before {
-				position: absolute;
-				content: '';
-				left: 0rpx;
-				top: 0rpx;
-				bottom: 0rpx;
-				width: 4rpx;
-				height: 28rpx;
-				background: $theme-color;
-				margin: auto;
-			}
-
-
+.title_box {
+	margin-top: 20rpx;
+
+	.name {
+		font-size: 28rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: $theme-color;
+		padding-left: 20rpx;
+
+		position: relative;
+
+		&:before {
+			position: absolute;
+			content: '';
+			left: 0rpx;
+			top: 0rpx;
+			bottom: 0rpx;
+			width: 4rpx;
+			height: 28rpx;
+			background: $theme-color;
+			margin: auto;
 		}
 
-		.btn_box {
-			padding: 0 18rpx;
-			height: 60rpx;
-			background: $theme-color;
-			font-size: 26rpx;
-			font-style: normal;
-			font-weight: 400;
-			font-size: 24rpx;
-			color: #fff;
-			border-radius: 4rpx;
 
-			.scan {
-				width: 34rpx;
-				height: 34rpx;
-				margin-right: 12rpx;
+	}
 
-			}
+	.btn_box {
+		padding: 0 18rpx;
+		height: 60rpx;
+		background: $theme-color;
+		font-size: 26rpx;
+		font-style: normal;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #fff;
+		border-radius: 4rpx;
+
+		.scan {
+			width: 34rpx;
+			height: 34rpx;
+			margin-right: 12rpx;
 
 		}
 
 	}
 
+}
 
-	.material {
-		margin-top: 10rpx;
 
+.material {
+	margin-top: 10rpx;
 
 
-		.content_table {
-			width: 674rpx;
-			border: 2rpx solid $border-color;
-			margin-bottom: 10rpx;
 
-			.item {
-				display: flex;
-				border-bottom: 2rpx solid $border-color;
+	.content_table {
+		width: 674rpx;
+		border: 2rpx solid $border-color;
+		margin-bottom: 10rpx;
 
+		.item {
+			display: flex;
+			border-bottom: 2rpx solid $border-color;
 
-				.lable {
-					width: 132rpx;
-					text-align: center;
-					background-color: #F7F9FA;
-					font-size: 26rpx;
-					border-right: 2rpx solid $border-color;
-					flex-shrink: 0;
-				}
 
-				.lable150 {
-					width: 156rpx !important;
-					font-size: 24rpx;
-				}
+			.lable {
+				width: 132rpx;
+				text-align: center;
+				background-color: #F7F9FA;
+				font-size: 26rpx;
+				border-right: 2rpx solid $border-color;
+				flex-shrink: 0;
+			}
 
-				.ww80 {
-					width: 80rpx;
-				}
+			.lable150 {
+				width: 156rpx !important;
+				font-size: 24rpx;
+			}
 
-				.content {
-					width: 518rpx;
-					min-height: 64rpx;
-					font-size: 28rpx;
-					line-height: 28rpx;
-					font-style: normal;
-					font-weight: 400;
-					padding: 18rpx 8rpx;
-					box-sizing: border-box;
-					word-wrap: break-word;
-					flex-grow: 1 !important;
-
-
-					.unit {
-						padding: 0 4rpx;
-						font-size: 24rpx;
-						color: #404446;
-					}
+			.ww80 {
+				width: 80rpx;
+			}
 
-				}
+			.content {
+				width: 518rpx;
+				min-height: 64rpx;
+				font-size: 28rpx;
+				line-height: 28rpx;
+				font-style: normal;
+				font-weight: 400;
+				padding: 18rpx 8rpx;
+				box-sizing: border-box;
+				word-wrap: break-word;
+				flex-grow: 1 !important;
 
 
-				.pd4 {
-					padding: 4rpx 8rpx;
+				.unit {
+					padding: 0 4rpx;
+					font-size: 24rpx;
+					color: #404446;
 				}
 
-
-
-				&:last-child {
-					border-bottom: none;
-				}
 			}
 
-			.ww50 {
-				width: 50%;
 
+			.pd4 {
+				padding: 4rpx 8rpx;
 			}
 
-			.ww55 {
-				width: 55%;
-			}
 
-			.ww45 {
-				width: 45%;
+
+			&:last-child {
+				border-bottom: none;
 			}
 		}
-	}
 
+		.ww50 {
+			width: 50%;
 
+		}
 
-	.search_list {
-		min-height: 100rpx;
-		width: 96vw;
-		padding: 0 8rpx;
+		.ww55 {
+			width: 55%;
+		}
 
-		/deep/ .u-form-item__body {
-			padding: 6rpx 0rpx !important;
+		.ww45 {
+			width: 45%;
 		}
+	}
+}
+
+
 
+.search_list {
+	min-height: 100rpx;
+	width: 96vw;
+	padding: 0 8rpx;
+
+	/deep/ .u-form-item__body {
+		padding: 6rpx 0rpx !important;
 	}
 
+}
+
 
 
 
-	.content_table2 {
+.content_table2 {
+	width: 100%;
+	margin-top: 6rpx;
+
+	.row {
 		width: 100%;
-		margin-top: 6rpx;
 
-		.row {
-			width: 100%;
 
+		.item {
 
-			.item {
+			color: #404446;
+			font-size: 28rpx;
+			padding-left: 12rpx;
+			padding-right: 6rpx;
 
-				color: #404446;
-				font-size: 28rpx;
-				padding-left: 12rpx;
-				padding-right: 6rpx;
+		}
 
-			}
+		.color157 {
+			color: $theme-color;
+		}
 
-			.color157 {
-				color: $theme-color;
-			}
 
+		.ww20 {
+			width: 20%;
+		}
 
-			.ww20 {
-				width: 20%;
-			}
+		.ww25 {
+			width: 25%;
+		}
 
-			.ww25 {
-				width: 25%;
-			}
 
 
+		.ww35 {
+			width: 35%;
 
-			.ww35 {
-				width: 35%;
+		}
 
-			}
+		.ww10 {
+			width: 10%;
+		}
 
-			.ww10 {
-				width: 10%;
-			}
 
 
+	}
 
-		}
+	.head {
+		height: 64rpx;
+		background: #F7F9FA;
+		border-top: 2rpx solid #E3E5E5;
+		border-left: 2rpx solid #E3E5E5;
+		box-sizing: border-box;
 
-		.head {
+		.item {
 			height: 64rpx;
-			background: #F7F9FA;
-			border-top: 2rpx solid #E3E5E5;
-			border-left: 2rpx solid #E3E5E5;
+			line-height: 64rpx;
+			border-right: 2rpx solid #E3E5E5;
 			box-sizing: border-box;
-
-			.item {
-				height: 64rpx;
-				line-height: 64rpx;
-				border-right: 2rpx solid #E3E5E5;
-				box-sizing: border-box;
-				font-size: 24rpx;
-			}
+			font-size: 24rpx;
 		}
+	}
 
 
 
-		.tr {
-			border-top: 2rpx solid #E3E5E5;
-			border-left: 2rpx solid #E3E5E5;
-			box-sizing: border-box;
+	.tr {
+		border-top: 2rpx solid #E3E5E5;
+		border-left: 2rpx solid #E3E5E5;
+		box-sizing: border-box;
 
-			.item {
-				font-size: 24rpx;
-				min-height: 64rpx;
-				display: flex;
-				align-items: center;
-				border-right: 2rpx solid #E3E5E5;
-				box-sizing: border-box;
-				white-space: normal;
-				word-break: break-all;
+		.item {
+			font-size: 24rpx;
+			min-height: 64rpx;
+			display: flex;
+			align-items: center;
+			border-right: 2rpx solid #E3E5E5;
+			box-sizing: border-box;
+			white-space: normal;
+			word-break: break-all;
 
-			}
+		}
 
-			&:last-child {
-				border-bottom: 2rpx solid #E3E5E5;
+		&:last-child {
+			border-bottom: 2rpx solid #E3E5E5;
 
-			}
 		}
 	}
+}
 
 
-	.z_list {
-		max-height: 350rpx;
-	}
+.z_list {
+	max-height: 350rpx;
+}
 
-	.z_list2 {
-		max-height: 700rpx;
-	}
+.z_list2 {
+	max-height: 700rpx;
+}
 
-	.content_num {
-		display: flex;
-		align-items: center;
-		padding: 0 4rpx;
+.content_num {
+	display: flex;
+	align-items: center;
+	padding: 0 4rpx;
 
-		/deep/ .uni-input-input {
-			border: 2rpx solid #F0F8F2;
-			background: #F0F8F2;
-			color: $theme-color;
-		}
+	/deep/ .uni-input-input {
+		border: 2rpx solid #F0F8F2;
+		background: #F0F8F2;
+		color: $theme-color;
+	}
 
 
-	}
+}
 
 
-	.tab_box {
-		margin-top: 14rpx;
-		margin-left: 8rpx;
-		display: flex;
-		align-items: center;
+.tab_box {
+	margin-top: 14rpx;
+	margin-left: 8rpx;
+	display: flex;
+	align-items: center;
 
-		.tab_item {
-			display: flex;
-			padding: 0 6rpx;
-			height: 48rpx;
-			line-height: 48rpx;
-			width: 138rpx;
-			text-align: center;
-			background: #157A2C;
-			font-style: normal;
-			font-weight: 400;
-			font-size: 24rpx;
-			color: #fff;
-			border-radius: 4rpx;
-			margin-right: 8rpx;
-		}
+	.tab_item {
+		display: flex;
+		padding: 0 6rpx;
+		height: 48rpx;
+		line-height: 48rpx;
+		width: 138rpx;
+		text-align: center;
+		background: #157A2C;
+		font-style: normal;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #fff;
+		border-radius: 4rpx;
+		margin-right: 8rpx;
+	}
 
-		.tab_add {
-			color: #157A2C;
-			font-size: 34rpx;
-		}
+	.tab_add {
+		color: #157A2C;
+		font-size: 34rpx;
 	}
+}
 </style>

+ 21 - 7
pages/pda/feeding/details.vue

@@ -14,10 +14,12 @@
 					<paramBom v-if='item.paramDetailList.length != 0' :list='item.paramDetailList'></paramBom>
 
 					<!-- //设备信息 -->
+
 					<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId' :wordItem='item'
 						:list='item.equipmentList' :turnover="item.turnover" @scanIt='scanIt' :type="type"></deviceBom>
 
 
+
 					<!-- //在制品 -->
 					<productsBom v-if="item.product != null && item.product != '{}'" :itemObj="item"
 						:productsObj="item.product">
@@ -99,7 +101,7 @@ import deviceBom from './components/deviceBom.vue' //设备信息
 
 import modelBom from './components/modelBom.vue' //模具信息
 
-import instanceBom from './components/instanceBom.vue' 
+import instanceBom from './components/instanceBom.vue'
 import semiProductBom from './components/semiProductBom' //半成品信息
 import aridRegion from './components/aridRegion' //干燥区
 import paramBom from './components/paramBom.vue' //
@@ -107,7 +109,7 @@ import turnoverBom from './components/turnoverBom.vue' //周转车信息
 import packingBom from './components/packingBom.vue' //包装信息
 import productsBom from './components/productsBom.vue' //在制品信息
 import palletBom from './components/palletBom' //舟皿
-import revolvingDiskBom from './components/revolvingDiskBom' 
+import revolvingDiskBom from './components/revolvingDiskBom'
 
 
 import {
@@ -196,8 +198,24 @@ export default {
 
 					selectList.forEach(f => {
 						if (f.rootCategoryLevelId == 4) {
+
+
 							equipmentList = equipmentList.concat(f)
 
+							
+							equipmentList.map(d => {
+		
+								if (d.equipmentLabelJson.length) {
+									d.equipmentLabelJson.map(v => {
+										if (v.SJSB) {
+											d.isSJSB = v.SJSB
+										}
+									})
+								}
+							})
+
+							console.log(equipmentList, '----------');
+
 						}
 						if (f.rootCategoryLevelId == 5) {
 							modelList = modelList.concat(f)
@@ -251,12 +269,9 @@ export default {
 		async save(type) {
 			console.log(this.List);
 			this.List.forEach(f => {
-				this.$isJobExls(2,f)
+				this.$isJobExls(2, f)
 			})
 
-
-			return;
-
 			this.List.forEach(f => {
 				f.instanceList.forEach(e => {
 					if (Object.prototype.hasOwnProperty.call(e, 'type')) {
@@ -267,7 +282,6 @@ export default {
 
 			})
 
-			console.log(this.List);
 
 			const isCache = await this.checkCache(type)
 

+ 553 - 457
pages/pda/jobBooking/components/packingBom.vue

@@ -1,6 +1,90 @@
 <template>
 
 	<view>
+		<view class="title_box rx-bc">
+			<view class="name">最小包装单元</view>
+
+			<view class="btn_box rx-bc" @click="handCancelPacking">
+				重置打包
+			</view>
+		</view>
+
+		<view class="material ">
+
+			<view class="content_table">
+				<view class="item">
+					<view class="lable rx-cc">包装总数 </view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="formedNumLast" type='digit'></input>
+						<view class="unit">{{ objData.unit }}</view>
+					</view>
+				</view>
+
+				<view class="item rx-sc">
+					<view class="rx ww55 ">
+						<view class="lable lable150 rx-cc ">最小包装单元</view>
+						<view class="content content_num">
+							<input class="uni-input" v-model="quantity"></input>
+
+						</view>
+					</view>
+
+					<view class="rx ww45">
+						<view class="rx-cc ww80">
+							<view style="max-width: 100rpx; font-size: 24rpx;">{{ objData.unit }}</view>/
+						</view>
+						<view class="content rx-sc">
+							<zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key' format='{Value}'
+								dataKey="Key" filterable :clear='false'></zxz-uni-data-select>
+
+							<view class="penalize" @click="handleSplit">确认</view>
+						</view>
+					</view>
+
+				</view>
+
+			</view>
+
+
+
+
+			<view class="content_table2" v-if='splitList.length'>
+				<view class="head row rx-sc">
+					<view class="item ww10">序号</view>
+					<view class="item ww30">数量</view>
+					<view class="item ww50">条码</view>
+					<view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
+					<view class="item ww10" v-if="clientEnvironmentId == 3"></view>
+				</view>
+				<view class="table">
+					<u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
+						<view class="tr row rx-sc" v-for="(it, idx) in splitList" :key='idx'>
+							<view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
+							<view class="item ww30 content_num rx-sc">
+								<input class="uni-input" v-model="it.quantity" type="digit"></input>
+								<view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
+							</view>
+							<view class="item ww50">
+								{{ it.code }}
+							</view>
+							<view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck(idx, it)">
+								<image class="check" v-if='it.check == 1' src='@/static/check.png'>
+								</image>
+								<image class="check" v-if='it.check == 0 || it.check == null'
+									src='@/static/check_no.png'>
+								</image>
+							</view>
+
+						</view>
+
+					</u-list>
+				</view>
+			</view>
+
+
+
+		</view>
+
 		<view class="title_box rx-bc">
 			<view class="name">内包装</view>
 
@@ -16,7 +100,7 @@
 					<view class="lable rx-cc">包装总数 </view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="formedNumLast" type='digit'></input>
-						<view class="unit">{{objData.unit}}</view>
+						<view class="unit">{{ objData.unit }}</view>
 					</view>
 				</view>
 
@@ -31,7 +115,7 @@
 
 					<view class="rx ww45">
 						<view class="rx-cc ww80">
-							<view style="max-width: 100rpx; font-size: 24rpx;">{{objData.unit}}</view>/
+							<view style="max-width: 100rpx; font-size: 24rpx;">{{ objData.unit }}</view>/
 						</view>
 						<view class="content rx-sc">
 							<zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key' format='{Value}'
@@ -63,15 +147,15 @@
 							<view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
 							<view class="item ww30 content_num rx-sc">
 								<input class="uni-input" v-model="it.quantity" type="digit"></input>
-								<view style="width: 260rpx; font-size: 22rpx;"> {{objData.unit}}/ {{it.unit}}</view>
+								<view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
 							</view>
 							<view class="item ww50">
 								{{ it.code }}
 							</view>
-							<view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck( idx, it)">
+							<view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck(idx, it)">
 								<image class="check" v-if='it.check == 1' src='@/static/check.png'>
 								</image>
-								<image class="check" v-if='it.check == 0 || it.check == null '
+								<image class="check" v-if='it.check == 0 || it.check == null'
 									src='@/static/check_no.png'>
 								</image>
 							</view>
@@ -86,7 +170,6 @@
 
 		</view>
 
-
 		<view class="material ">
 
 			<view class="title_box rx-bc">
@@ -108,7 +191,7 @@
 						<view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
 						<view class="item ww30 content_num rx-sc">
 							<input class="uni-input" v-model="it.quantity" disabled type="digit"></input>
-							<view style="width: 260rpx; font-size: 22rpx;"> {{objData.unit}}/ {{it.unit}}</view>
+							<view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
 						</view>
 						<view class="item ww50">
 							{{ it.code }}
@@ -124,7 +207,7 @@
 					<view class="tr row rx-sc">
 						<view class="item ww10 rx-cc ">合并</view>
 						<view class="item ww90  rx-sc">
-							总共{{temporaryCount}} {{objData.unit}} / {{this.temporaryNum}} {{unit}}
+							总共{{ temporaryCount }} {{ objData.unit }} / {{ this.temporaryNum }} {{ unit }}
 							--打包成 1
 							<zxz-uni-data-select :localdata="unitList" v-model="packUnit" dataValue='Key'
 								format='{Value}' dataKey="Key" :clear='false'></zxz-uni-data-select>
@@ -133,11 +216,8 @@
 
 						</view>
 
-
 					</view>
 
-
-
 				</view>
 			</view>
 
@@ -158,7 +238,7 @@
 					<view class="tr row rx-sc " v-for="(it, idx) in packTwoList" :key='idx'>
 						<view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
 						<view class="item ww30 content_num rx-sc">
-							{{ it.quantity}} {{ objData.unit }} / {{it.unit}}
+							{{ it.quantity }} {{ objData.unit }} / {{ it.unit }}
 						</view>
 
 
@@ -195,7 +275,7 @@
 
 						<u-form-item label="外包装数:" class="required-form" borderBottom prop="assetType">
 							<input class="uni-input" v-model="formData.wPackNum" style="width: 280rpx;"
-								placeholder="外包装数"></input> / {{splitList[0].unit}}
+								placeholder="外包装数"></input> / {{ splitList[0].unit }}
 						</u-form-item>
 
 					</u-form>
@@ -227,621 +307,637 @@
 </template>
 
 <script>
-	import {
-		getByCode
-	} from '@/api/pda/common.js'
-	import {
-		cancelPacking,
-		packingReport,
-		getPackingReport,
-		packingReportRepeat,
-		getPackingReportRepeat
-	} from '@/api/pda/workOrder.js'
-	import SearchPopup from '../../components/searchPopup.vue'
-	export default {
-		components: {
-			SearchPopup
+import {
+	getByCode
+} from '@/api/pda/common.js'
+import {
+	cancelPacking,
+	packingReport,
+	getPackingReport,
+	packingReportRepeat,
+	packageDisposition,
+	getPackingReportRepeat
+} from '@/api/pda/workOrder.js'
+import SearchPopup from '../../components/searchPopup.vue'
+export default {
+	components: {
+		SearchPopup
+	},
+	props: {
+		categoryId: {
+			type: String,
+			default: ''
+		},
+		objData: {
+			type: Object,
+			default: () => { }
 		},
-		props: {
-			objData: {
-				type: Object,
-				default: () => {}
-			},
-
-			taskId: {
-				type: String,
-				default: ''
-			},
 
-			workOrderId: {
-				type: String,
-				default: ''
-			}
+		taskId: {
+			type: String,
+			default: ''
 		},
-		data() {
-			return {
-				formedNumLast: 0,
 
-				quantity: '',
-				unit: '',
+		workOrderId: {
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			formedNumLast: 0,
 
-				unitList: [],
+			quantity: '',
+			unit: '',
 
-				splitList: [],
+			unitList: [],
 
+			splitList: [],
 
 
-				packUnit: null,
-				temporaryNum: 0,
-				temporaryCount: 0,
-				temporaryList: [],
-				packTwoList: [],
 
+			packUnit: null,
+			temporaryNum: 0,
+			temporaryCount: 0,
+			temporaryList: [],
+			packTwoList: [],
+			newCategoryId:'',
 
-				show: false,
-				formData: {
-					wPackNum: null,
-				},
-				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
+			show: false,
+			formData: {
+				wPackNum: null,
+			},
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
 
+		}
+	},
+	watch:{
+		categoryId:{
+			handler(newVal){
+				console.log(newVal,'newVal');
+				this.newCategoryId = newVal;
+			},
+			deep:true,
+			immediate:true
+		},
+		
+	},
+	created() {
+		this.formedNumLast = this.objData.formedNumLast
+
+		this.byCode(),
+			this.packageDispositionFn();
+		this.getPackingDetails()
+		this.getPackingDetailsTwo()
+	},
+
+	methods: {
+		async packageDispositionFn() {
+			const res = await packageDisposition(this.newCategoryId)
+			console.log(res, '1111111');
+		},
 
 
+		byCode() {
+			getByCode('packing_unit').then(res => {
 
+				this.unitList = []
 
+				res.forEach((obj, index) => {
+					for (let key in obj) {
+						if (obj.hasOwnProperty(key)) { // 确保key是对象自身的属性
 
-			}
-		},
+							this.unitList.push({
+								Key: `${key}`,
+								Value: ` ${obj[key]}`
+							})
 
-		created() {
-			this.formedNumLast = this.objData.formedNumLast
 
-			this.byCode(),
+						}
+					}
+				});
 
-				this.getPackingDetails()
-			this.getPackingDetailsTwo()
+			})
 		},
 
-		methods: {
-			byCode() {
-				getByCode('packing_unit').then(res => {
 
-					this.unitList = []
+		getPackingDetails() {
+			let param = {
+				workOrderId: this.workOrderId,
+				taskId: this.taskId,
+				tier: 1
+			}
 
-					res.forEach((obj, index) => {
-						for (let key in obj) {
-							if (obj.hasOwnProperty(key)) { // 确保key是对象自身的属性
+			getPackingReport(param).then(res => {
+				this.splitList = res.detailList
+				this.formedNumLast = res.totalQuantity
+				this.quantity = res.quantity
+				this.unit = res.unit
 
-								this.unitList.push({
-									Key: `${key}`,
-									Value: ` ${obj[key]}`
-								})
+			})
+		},
 
 
-							}
-						}
-					});
+		handCancelPacking() {
+			uni.showModal({
+				title: `是否清空包装?`,
+				content: "",
+				confirmText: "确认",
+				success: () => {
+					let param = {
+						workOrderId: this.workOrderId,
+						taskId: this.taskId,
+					}
+					cancelPacking(param).then(res => {
+						this.getPackingDetails()
+						this.getPackingDetailsTwo()
+					})
+				},
 
-				})
-			},
+			})
 
 
-			getPackingDetails() {
-				let param = {
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 1
-				}
+		},
+
 
-				getPackingReport(param).then(res => {
-					this.splitList = res.detailList
-					this.formedNumLast = res.totalQuantity
-					this.quantity = res.quantity
-					this.unit = res.unit
+		handleSplit() {
 
+			if (this.splitList.length) {
+				uni.showToast({
+					title: '产品已分包',
+					icon: 'none'
 				})
-			},
+				return false
+			}
 
 
-			handCancelPacking() {
-				uni.showModal({
-					title: `是否清空包装?`,
-					content: "",
-					confirmText: "确认",
-					success: () => {
-						let param = {
-							workOrderId: this.workOrderId,
-							taskId: this.taskId,
-						}
-						cancelPacking(param).then(res => {
-							this.getPackingDetails()
-							this.getPackingDetailsTwo()
-						})
-					},
 
+			if (!this.formedNumLast) {
+				uni.showToast({
+					title: '包装总数数量不能为空',
+					icon: 'none'
 				})
+				return false
+			}
 
+			if (!this.quantity) {
+				uni.showToast({
+					title: '内包装单元数量不能为空',
+					icon: 'none'
+				})
+				return false
+			}
 
-			},
-
-
-			handleSplit() {
+			if (!this.unit) {
+				uni.showToast({
+					title: '请选择包装单位',
+					icon: 'none'
+				})
+				return false
+			}
 
-				if (this.splitList.length) {
-					uni.showToast({
-						title: '产品已分包',
-						icon: 'none'
-					})
-					return false
-				}
+			let param = {
+				totalQuantity: this.formedNumLast,
+				quantity: this.quantity,
+				unit: this.unit,
+				workOrderId: this.workOrderId,
+				taskId: this.taskId,
+				tier: 1
+			}
+			packingReport(param).then(res => {
+				this.splitList = res.map(m => {
 
+					return {
+						check: false,
+						...m
+					}
+				})
 
+				this.getPackingDetails()
+			})
 
-				if (!this.formedNumLast) {
-					uni.showToast({
-						title: '包装总数数量不能为空',
-						icon: 'none'
-					})
-					return false
-				}
 
-				if (!this.quantity) {
-					uni.showToast({
-						title: '内包装单元数量不能为空',
-						icon: 'none'
-					})
-					return false
-				}
+		},
 
-				if (!this.unit) {
-					uni.showToast({
-						title: '请选择包装单位',
-						icon: 'none'
-					})
-					return false
-				}
+		handleCheck(idx, it) {
 
-				let param = {
-					totalQuantity: this.formedNumLast,
-					quantity: this.quantity,
-					unit: this.unit,
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 1
-				}
-				packingReport(param).then(res => {
-					this.splitList = res.map(m => {
 
-						return {
-							check: false,
-							...m
-						}
-					})
 
-					this.getPackingDetails()
+			if (it.quantity <= 0) {
+				uni.showToast({
+					icon: 'none',
+					title: '数量为空不能勾选'
 				})
 
+				return false
+			}
 
-			},
-
-			handleCheck(idx, it) {
-
+			this.$set(this.splitList[idx], 'check', it.check ? 0 : 1)
 
+			this.temporaryList = []
 
-				if (it.quantity <= 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '数量为空不能勾选'
-					})
 
-					return false
-				}
+			this.temporaryList = this.splitList.filter(e => {
+				return e.check == 1
+			})
+			this.temporaryNum = 0
+			this.temporaryCount = 0
+			if (this.temporaryList.length > 0) {
+				this.temporaryList.forEach(e => {
+					this.temporaryNum = this.temporaryNum + 1
+					this.temporaryCount = this.temporaryCount + Number(e.quantity)
+				})
+			}
 
-				this.$set(this.splitList[idx], 'check', it.check ? 0 : 1)
 
-				this.temporaryList = []
+		},
 
 
-				this.temporaryList = this.splitList.filter(e => {
-					return e.check == 1
-				})
-				this.temporaryNum = 0
-				this.temporaryCount = 0
-				if (this.temporaryList.length > 0) {
-					this.temporaryList.forEach(e => {
-						this.temporaryNum = this.temporaryNum + 1
-						this.temporaryCount = this.temporaryCount + Number(e.quantity)
-					})
+		handclose(it) {
+			this.splitList.forEach(f => {
+				if (f.computeSize == it.computeSize) {
+					f.check = 0
 				}
+			})
 
+			this.temporaryList = []
 
-			},
-
-
-			handclose(it) {
-				this.splitList.forEach(f => {
-					if (f.computeSize == it.computeSize) {
-						f.check = 0
-					}
-				})
-
-				this.temporaryList = []
 
+			this.temporaryList = this.splitList.filter(e => {
+				return e.check == 1
+			})
+		},
 
-				this.temporaryList = this.splitList.filter(e => {
-					return e.check == 1
-				})
-			},
+		getPackingDetailsTwo() {
+			let param = {
+				totalQuantity: this.formedNumLast,
+				quantity: this.quantity,
+				unit: this.unit,
+				workOrderId: this.workOrderId,
+				taskId: this.taskId,
+				tier: 2,
 
-			getPackingDetailsTwo() {
-				let param = {
-					totalQuantity: this.formedNumLast,
-					quantity: this.quantity,
-					unit: this.unit,
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 2,
+			}
+			getPackingReportRepeat(param).then(res => {
+				this.packTwoList = res.detailList
+			})
+		},
 
+		handlePack() {
+			let _arr = []
+			_arr = this.temporaryList.map(m => {
+				return {
+					...m,
+					isChecked: 1
 				}
-				getPackingReportRepeat(param).then(res => {
-					this.packTwoList = res.detailList
-				})
-			},
-
-			handlePack() {
-				let _arr = []
-				_arr = this.temporaryList.map(m => {
-					return {
-						...m,
-						isChecked: 1
-					}
-				})
+			})
+
+			let param = {
+				detailList: _arr,
+				quantity: this.temporaryCount,
+				totalQuantity: this.formedNumLast,
+				unit: this.packUnit,
+				taskId: this.taskId,
+				workOrderId: this.workOrderId,
+				tier: 2
+			}
 
-				let param = {
-					detailList: _arr,
-					quantity: this.temporaryCount,
-					totalQuantity: this.formedNumLast,
-					unit: this.packUnit,
-					taskId: this.taskId,
-					workOrderId: this.workOrderId,
-					tier: 2
-				}
+			packingReportRepeat(param).then(res => {
+				this.temporaryList = []
+				this.getPackingDetails()
+				this.getPackingDetailsTwo()
+			})
+		},
 
-				packingReportRepeat(param).then(res => {
-					this.temporaryList = []
-					this.getPackingDetails()
-					this.getPackingDetailsTwo()
-				})
-			},
 
+		scrolltolower() {
 
-			scrolltolower() {
+		},
 
-			},
+		getData() {
+			let _packingReportMarginList = []
 
-			getData() {
-				let _packingReportMarginList = []
+			_packingReportMarginList = this.splitList.filter(e => {
+				return !e.parentId
+			})
 
-				_packingReportMarginList = this.splitList.filter(e => {
-					return !e.parentId
-				})
+			let packInfo = {
+				packingReportList: this.packTwoList,
+				packingReportMarginList: _packingReportMarginList,
+				formedNumLast: this.formedNumLast
+			}
+			return packInfo
+		},
 
-				let packInfo = {
-					packingReportList: this.packTwoList,
-					packingReportMarginList: _packingReportMarginList,
-					formedNumLast: this.formedNumLast
-				}
-				return packInfo
-			},
+		calculation() {
+			this.show = true
+		},
 
-			calculation() {
-				this.show = true
-			},
+		calculationSave() {
+			let count = this.splitList.filter(item => item.isChecked != 1).length;
 
-			calculationSave() {
-				let count = this.splitList.filter(item => item.isChecked != 1).length;
+			if (this.formData.wPackNum <= count && count != 0) {
+				for (let i = 0; i < this.formData.wPackNum; i++) {
+					this.splitList[i].check = 1
+				}
+				this.handleCheck(0, 0)
+				this.calculationClose()
 
-				if (this.formData.wPackNum <= count && count != 0) {
-					for (let i = 0; i < this.formData.wPackNum; i++) {
+			} else {
+				if (count != 0) {
+					for (let i = 0; i < count; i++) {
 						this.splitList[i].check = 1
 					}
 					this.handleCheck(0, 0)
 					this.calculationClose()
+				}
+				uni.showToast({
+					icon: 'none',
+					title: '外包装数超出内包装条数'
+				})
 
-				} else {
-					if (count != 0) {
-						for (let i = 0; i < count; i++) {
-							this.splitList[i].check = 1
-						}
-						this.handleCheck(0, 0)
-						this.calculationClose()
-					}
-					uni.showToast({
-						icon: 'none',
-						title: '外包装数超出内包装条数'
-					})
 
+			}
 
-				}
+		},
 
-			},
+		calculationClose() {
+			this.show = false
+		},
 
-			calculationClose() {
-				this.show = false
-			},
+		calculationReset() {
 
-			calculationReset() {
+			this.formData.wPackNum = null
+			this.splitList.forEach(f => {
+				f.check = null
+			})
+			this.temporaryList = []
+			this.show = false
 
-				this.formData.wPackNum = null
-				this.splitList.forEach(f => {
-					f.check = null
-				})
-				this.temporaryList = []
-				this.show = false
-
-			}
-		},
-	}
+		}
+	},
+}
 </script>
 
 <style lang="scss" scoped>
-	.title_box {
-		margin-top: 20rpx;
-
-		.name {
-			font-size: 28rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: $theme-color;
-			padding-left: 20rpx;
-
-			position: relative;
-
-			&:before {
-				position: absolute;
-				content: '';
-				left: 0rpx;
-				top: 0rpx;
-				bottom: 0rpx;
-				width: 4rpx;
-				height: 28rpx;
-				background: $theme-color;
-				margin: auto;
-			}
+.title_box {
+	margin-top: 20rpx;
+
+	.name {
+		font-size: 28rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: $theme-color;
+		padding-left: 20rpx;
+
+		position: relative;
+
+		&:before {
+			position: absolute;
+			content: '';
+			left: 0rpx;
+			top: 0rpx;
+			bottom: 0rpx;
+			width: 4rpx;
+			height: 28rpx;
+			background: $theme-color;
+			margin: auto;
 		}
+	}
 
 
-		.btn_box {
-			color: $theme-color;
-		}
+	.btn_box {
+		color: $theme-color;
 	}
+}
 
 
-	.material {
-		margin-top: 10rpx;
+.material {
+	margin-top: 10rpx;
 
 
 
-		.content_table {
-			width: 100%;
-			border: 2rpx solid $border-color;
-
-			.item {
-				display: flex;
-				border-bottom: 2rpx solid $border-color;
+	.content_table {
+		width: 100%;
+		border: 2rpx solid $border-color;
 
+		.item {
+			display: flex;
+			border-bottom: 2rpx solid $border-color;
 
-				.lable {
-					width: 132rpx;
-					text-align: center;
-					background-color: #F7F9FA;
-					font-size: 26rpx;
-					border-right: 2rpx solid $border-color;
-					flex-shrink: 0;
-				}
 
-				.lable220 {
-					width: 220rpx !important;
-					font-size: 24rpx;
-				}
+			.lable {
+				width: 132rpx;
+				text-align: center;
+				background-color: #F7F9FA;
+				font-size: 26rpx;
+				border-right: 2rpx solid $border-color;
+				flex-shrink: 0;
+			}
 
-				.lable150 {
-					width: 156rpx !important;
-					font-size: 24rpx;
-				}
+			.lable220 {
+				width: 220rpx !important;
+				font-size: 24rpx;
+			}
 
-				.ww80 {
-					width: 80rpx;
-				}
+			.lable150 {
+				width: 156rpx !important;
+				font-size: 24rpx;
+			}
 
-				.content {
-					width: 518rpx;
-					min-height: 64rpx;
-					font-size: 28rpx;
-					line-height: 28rpx;
-					font-style: normal;
-					font-weight: 400;
-					// padding: 18rpx 8rpx;
-					box-sizing: border-box;
-					word-wrap: break-word;
-					flex-grow: 1 !important;
-
-
-					.unit {
-						padding: 0 4rpx;
-						font-size: 24rpx;
-						color: #404446;
-					}
+			.ww80 {
+				width: 80rpx;
+			}
 
+			.content {
+				width: 518rpx;
+				min-height: 64rpx;
+				font-size: 28rpx;
+				line-height: 28rpx;
+				font-style: normal;
+				font-weight: 400;
+				// padding: 18rpx 8rpx;
+				box-sizing: border-box;
+				word-wrap: break-word;
+				flex-grow: 1 !important;
 
 
+				.unit {
+					padding: 0 4rpx;
+					font-size: 24rpx;
+					color: #404446;
 				}
 
 
 
-				&:last-child {
-					border-bottom: none;
-				}
 			}
 
 
 
-			.ww55 {
-				width: 55%;
+			&:last-child {
+				border-bottom: none;
 			}
+		}
+
 
-			.ww45 {
-				width: 45%;
-			}
 
+		.ww55 {
+			width: 55%;
+		}
 
+		.ww45 {
+			width: 45%;
 		}
+
+
 	}
+}
 
 
 
 
-	.content_table2 {
+.content_table2 {
+	width: 100%;
+	margin-top: 16rpx;
+
+	.row {
 		width: 100%;
-		margin-top: 16rpx;
 
-		.row {
-			width: 100%;
 
+		.item {
 
-			.item {
+			color: #404446;
+			font-size: 28rpx;
+			padding-left: 12rpx;
 
-				color: #404446;
-				font-size: 28rpx;
-				padding-left: 12rpx;
+		}
 
-			}
+		.color157 {
+			color: $theme-color;
+		}
 
-			.color157 {
-				color: $theme-color;
-			}
+		.ww30 {
+			width: 30%;
+		}
 
-			.ww30 {
-				width: 30%;
-			}
+		.ww50 {
+			width: 50%;
 
-			.ww50 {
-				width: 50%;
+		}
 
-			}
+		.ww90 {
+			width: 90%;
+		}
 
-			.ww90 {
-				width: 90%;
-			}
+		.ww15 {
+			width: 15%;
+		}
 
-			.ww15 {
-				width: 15%;
-			}
+		.ww10 {
+			width: 10%;
+		}
 
-			.ww10 {
-				width: 10%;
-			}
+		.ww30 {
+			width: 30%;
+		}
 
-			.ww30 {
-				width: 30%;
-			}
+		.jsColor {
+			color: $theme-color;
+			font-size: 20rpx;
+		}
 
-			.jsColor {
-				color: $theme-color;
-				font-size: 20rpx;
-			}
+	}
 
-		}
+	.head {
+		height: 64rpx;
+		background: #F7F9FA;
+		border-top: 2rpx solid #E3E5E5;
+		border-left: 2rpx solid #E3E5E5;
 
-		.head {
+		.item {
 			height: 64rpx;
-			background: #F7F9FA;
-			border-top: 2rpx solid #E3E5E5;
-			border-left: 2rpx solid #E3E5E5;
-
-			.item {
-				height: 64rpx;
-				line-height: 64rpx;
-				border-right: 2rpx solid #E3E5E5;
-				box-sizing: border-box;
-			}
+			line-height: 64rpx;
+			border-right: 2rpx solid #E3E5E5;
+			box-sizing: border-box;
 		}
+	}
 
 
 
-		.tr {
-			border-top: 2rpx solid #E3E5E5;
-			border-left: 2rpx solid #E3E5E5;
+	.tr {
+		border-top: 2rpx solid #E3E5E5;
+		border-left: 2rpx solid #E3E5E5;
 
 
-			.item {
-				font-size: 24rpx;
-				min-height: 64rpx;
-				display: flex;
-				align-items: center;
-				border-right: 2rpx solid #E3E5E5;
-				box-sizing: border-box;
-				white-space: normal;
-				word-break: break-all;
+		.item {
+			font-size: 24rpx;
+			min-height: 64rpx;
+			display: flex;
+			align-items: center;
+			border-right: 2rpx solid #E3E5E5;
+			box-sizing: border-box;
+			white-space: normal;
+			word-break: break-all;
 
-			}
+		}
 
-			&:last-child {
-				border-bottom: 2rpx solid #E3E5E5;
+		&:last-child {
+			border-bottom: 2rpx solid #E3E5E5;
 
-			}
 		}
 	}
+}
 
 
 
 
-	.content_num {
-		display: flex;
-		align-items: center;
-		padding: 0 4rpx;
+.content_num {
+	display: flex;
+	align-items: center;
+	padding: 0 4rpx;
 
-		/deep/ .uni-input-input {
-			border: 2rpx solid #F0F8F2;
-			background: #F0F8F2;
-			color: $theme-color;
-		}
+	/deep/ .uni-input-input {
+		border: 2rpx solid #F0F8F2;
+		background: #F0F8F2;
+		color: $theme-color;
+	}
 
 
-	}
+}
 
-	.penalize {
-		width: 86rpx;
-		line-height: 60rpx;
-		background: $theme-color;
-		font-size: 24rpx;
-		text-align: center;
-		color: #fff;
-	}
+.penalize {
+	width: 86rpx;
+	line-height: 60rpx;
+	background: $theme-color;
+	font-size: 24rpx;
+	text-align: center;
+	color: #fff;
+}
 
-	.check {
-		width: 30rpx;
-		height: 30rpx;
-	}
+.check {
+	width: 30rpx;
+	height: 30rpx;
+}
 
-	.z_list {
-		max-height: 500rpx;
-	}
+.z_list {
+	max-height: 500rpx;
+}
 
 
-	.search_list {
-		min-height: 100rpx;
-		width: 80vw;
+.search_list {
+	min-height: 100rpx;
+	width: 80vw;
 
-		/deep/ .baseForm {
-			padding: 0 20rpx;
-		}
+	/deep/ .baseForm {
+		padding: 0 20rpx;
 	}
+}
 
-	.operate_box {
-		padding: 10rpx 32rpx;
+.operate_box {
+	padding: 10rpx 32rpx;
 
-		/deep/ .u-button {
-			width: 30%;
-		}
+	/deep/ .u-button {
+		width: 30%;
 	}
+}
 </style>

+ 0 - 2
pages/pda/jobBooking/components/packingTgBom.vue

@@ -3,8 +3,6 @@
 		<view class="title_box rx-bc">
 			<view class="name">打包信息: ({{ isWarehousing ? list.length : item.pickOutInList.length || 0}})个</view>
 		</view>
-  
-
 
 		<view class="material " v-for="(it, idx) in isWarehousing ? list :  item.pickOutInList" :key="idx">
    	

+ 21 - 7
pages/pda/jobBooking/index/index.vue

@@ -65,16 +65,23 @@
 						:wordItem='objData' pattern='job' @handleScan='handleScan' @formedNumFn='formedNumFn'>
 					</turnoverBom>
 
+					<!-- // 区域扫码 -->
 
 					<aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
 						:remainingTime='remainingTime' @handleScan='handleScan' :isType='true'></aridRegion>
 
-					<packingBom :taskId='taskId' :workOrderId='id' :objData='objData' ref="packRef"
-						v-if='taskType == 4 && clientEnvironmentId != 3 && objData'></packingBom>
+					<!-- //包装扫码 -->
+					<view v-if="clientEnvironmentId != 2">
+
+						<packingBom :taskId='taskId' :workOrderId='id' :objData='objData' ref="packRef"
+							v-if='taskType == 4 && clientEnvironmentId != 3 && objData' :categoryId="categoryId"></packingBom>
+
+					</view>
+					
 
 					<packingTgBom
 						v-if='objData.pickOutInList && objData.pickOutInList.length != 0 && taskType == 4 && clientEnvironmentId == 3'
-						:list='objData.pickOutInList' :item='objData'></packingTgBom>
+						:list='objData.pickOutInList' :item='objData' ></packingTgBom>
 
 
 					<view class="operate_box rx-sc">
@@ -246,7 +253,7 @@ export default {
 			title: '',
 			taskType: 1,
 			isLoad: true,
-
+			categoryId:'',
 			objData: {
 				equipmentList: [],
 				modelList: [],
@@ -291,11 +298,14 @@ export default {
 		}
 	},
 	onLoad(options) {
+		console.log('1111111110',options);
+
 		this.title = options.taskName ? options.taskName + '-报工' : '报工'
 		this.taskType = options.taskType
 		this.id = options.id
 		this.taskId = options.taskId
 		this.isOutsource = options.isOutsource
+		this.categoryId = options.categoryId
 		this.getList()
 	},
 
@@ -462,8 +472,11 @@ export default {
 
 		getList() {
 			this.isLoad = false
-
+			 
 			let URL = this.isOutsource == 0 ? getByIdReport : outSourceGetByIdReport
+
+			console.log(URL,'URLURLURL');
+
 			URL(this.id, this.taskId).then(res => {
 				// currentTaskDiagram  有是否可以报工
 				this.objData = res;
@@ -743,7 +756,7 @@ export default {
 
 
 
-			if (this.taskType == 4 && this.clientEnvironmentId != 3) {
+			if (this.taskType == 4 && this.clientEnvironmentId != 3 && this.clientEnvironmentId != 2 ) {
 				const isPack = await this.checkPack()
 
 				if (!isPack) {
@@ -801,7 +814,6 @@ export default {
 				}
 			}
 
-			console.log('报工', this.objData)
 
 
 			jobSave(this.objData).then(res => {
@@ -867,7 +879,9 @@ export default {
 		checkPack() {
 			uni.hideLoading();
 			return new Promise((resolve) => {
+
 				let packInfo = this.$refs.packRef.getData()
+
 				this.objData.packInfo = packInfo
 				this.objData.taskType = this.taskType
 

+ 488 - 403
pages/pda/picking/details.vue

@@ -7,11 +7,11 @@
 			<u-list @scrolltolower="scrolltolower">
 
 
-				<view v-for="(item,index) in List" :key="index" class="card_box">
+				<view v-for="(item, index) in List" :key="index" class="card_box">
 					<view class="title_box rx-bc">
 						<view class="left rx-sc">
-							<view class="round">{{index + 1}}</view>
-							<view class="code">工单编号:{{item.code}}</view>
+							<view class="round">{{ index + 1 }}</view>
+							<view class="code">工单编号:{{ item.code }}</view>
 						</view>
 
 						<view class="right_box rx-ec">
@@ -22,9 +22,9 @@
 
 					</view>
 
-					<view class="material rx-ss" v-for="(mate, idx) in item.bomList">
-						<view class="left rx-ss" @click="mate.checked = ! mate.checked">
-							<view class="zdy_check rx-cc" :class="{ check_active : mate.checked   }">
+					<view class="material rx-ss" v-for="(mate, idx) in item.bomList" :key="idx">
+						<view class="left rx-ss" @click="mate.checked = !mate.checked">
+							<view class="zdy_check rx-cc" :class="{ check_active: mate.checked }">
 								<u-icon size="28" v-if='mate.checked' name='checkbox-mark'></u-icon>
 							</view>
 						</view>
@@ -32,26 +32,26 @@
 							<view class="item">
 								<view class="lable rx-cc">物料编码</view>
 								<view class="content">
-									{{mate.categoryCode}}
+									{{ mate.categoryCode }}
 								</view>
 							</view>
 
 							<view class="item">
 								<view class="lable rx-cc">名称</view>
-								<view class="content">{{mate.categoryName}}</view>
+								<view class="content">{{ mate.categoryName }}</view>
 							</view>
 
 							<view class="item rx-sc">
 								<view class="rx ww55 ">
 									<view class="lable rx-cc">牌号</view>
-									<view class="content ">{{mate.brandNum}}</view>
+									<view class="content ">{{ mate.brandNum }}</view>
 								</view>
 
 								<view class="rx ww45">
 									<view class="lable rx-cc ww80">数量</view>
 									<view class="content content_num">
 										<input class="uni-input" v-model="mate.demandQuantity" type="digit"></input>
-										<view class="unit">{{mate.unit}}</view>
+										<view class="unit">{{ mate.unit }}</view>
 
 									</view>
 								</view>
@@ -90,8 +90,8 @@
 						<semiProductBom
 							:list="[...item.semiProductList2, ...item.productList2, ...item.junkProductList2]">
 						</semiProductBom>
-						
-					
+
+
 
 						<view style="height: 80rpx;"></view>
 
@@ -101,22 +101,21 @@
 					</view>
 
 				</view>
-			
-			
-		<view class="out_box" v-if="isOutsource == 1">
-			<view class="out_text" @click="getListOutsource()">重新获取委外领料单</view>
-		</view>
-			
-			
+
+
+				<view class="out_box" v-if="isOutsource == 1">
+					<view class="out_text" @click="getListOutsource()">重新获取委外领料单</view>
+				</view>
+
+
 			</u-list>
 
 		</view>
 
 		<view class="bottom-wrapper">
 			<view class="btn_box" @click="save">提交</view>
-
 		</view>
-		
+
 		<outsourceOrder ref="outsourceRef" @outsourceEmit="outsourceFn"></outsourceOrder>
 
 
@@ -125,203 +124,224 @@
 </template>
 
 <script>
-	import instanceBom from './components/instanceBom.vue'
-	import modelBom from './components/modelBom.vue'
-	import boatBom from './components/boatBom.vue'
-	import packingBom from './components/packingBom'
-	import semiProductBom from './components/semiProductBom'
-	import outsourceOrder from './components/outsourceOrder'
-	import {
-		workorderList,
-		listOutsourceInWarehouse,
-		listOutsource
-	} from '@/api/pda/workOrder.js'
-
-	import {
-		batchSave,
-		pickDetails
-	} from '@/api/pda/picking.js'
-
-	export default {
-		components: {
-			instanceBom,
-			modelBom,
-			boatBom,
-			packingBom,
-			semiProductBom,
-			outsourceOrder
-		},
-		data() {
-			return {
-				idsList: [],
-				List: [],
+import instanceBom from './components/instanceBom.vue'
+import modelBom from './components/modelBom.vue'
+import boatBom from './components/boatBom.vue'
+import packingBom from './components/packingBom'
+import semiProductBom from './components/semiProductBom'
+import outsourceOrder from './components/outsourceOrder'
+import {
+	znPdaPage,
+	workorderList,
+	listOutsourceInWarehouse,
+	listOutsource
+} from '@/api/pda/workOrder.js'
+
+import {
+	batchSave,
+	pickDetails,
+	findVoucherList
+} from '@/api/pda/picking.js'
+
+export default {
+	components: {
+		instanceBom,
+		modelBom,
+		boatBom,
+		packingBom,
+		semiProductBom,
+		outsourceOrder
+	},
+	data() {
+		return {
+			idsList: [],
+			List: [],
+
+			classificationList: [], //分类数据
+
+			taskId: null,
+			isPick: false,
+			isOutsource: 0,
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+				.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-				classificationList: [], //分类数据
 
-				taskId: null,
-				isPick: false,
-				isOutsource: 0,
+		}
+	},
+	onLoad(options) {
 
 
+		let queryArray = decodeURIComponent(options.arr);
 
-			}
-		},
-		onLoad(options) {
-			let queryArray = decodeURIComponent(options.arr);
+		this.idsList = JSON.parse(queryArray);
+		this.isOutsource = Number(options.isOutsource) || 0
 
-			this.idsList = JSON.parse(queryArray);
-			this.isOutsource = Number(options.isOutsource)  || 0
+		this.taskId = options.taskId
 
-			this.taskId = options.taskId
+		console.log(this.clientEnvironmentId, 'this.clientEnvironmentId');
 
 
 
-			  this.getList()
+		if (this.clientEnvironmentId == 21) {
+			this.getZnList()
+		} else {
+			this.getList()
+		}
 
-			if (this.idsList.length == 1) {
-				this.getPick()
-			}
 
 
-          if(this.isOutsource == 1) {
-			  this.getListOutsource()
-		  } 
+		if (this.idsList.length == 1) {
+			this.getPick()
+		}
 
 
+		if (this.isOutsource == 1) {
+			this.getListOutsource()
+		}
 
-		},
-		onShow() {
-			uni.$off("setSelectList");
-
-			uni.$on("setSelectList", (selectList, id) => {
-				this.List.forEach(m => {
-					if (m.workOrderId == id) {
-						let instanceList2 = [] // 投料
-						let modelList2 = [] // 模具
-						let palletList2 = []
-						let packingList2 = [] // 包装
-						let semiProductList2 = [] //半成品
-						let productList2 = [] // 产品
-						let junkProductList2 = [] //废品
-
-
-
-
-						selectList.forEach(f => {
-							if (![5, 8, 13, 23, 9, 28].includes(f.rootCategoryLevelId)) {
-								f.automatic = 1
-								instanceList2 = instanceList2.concat(f)
-							} else if (f.rootCategoryLevelId == 5) { // 模具
-								f.automatic = 1
-								modelList2 = modelList2.concat(f)
-							} else if (f.rootCategoryLevelId == 8) { // 舟皿
-								f.automatic = 1
-								palletList2 = palletList2.concat(f)
-							} else if (f.rootCategoryLevelId == 13) {
-								f.automatic = 1
-								packingList2 = packingList2.concat(f)
-							} else if (f.rootCategoryLevelId == 23) {
-								f.automatic = 1
-								semiProductList2 = semiProductList2.concat(f)
-							} else if (f.rootCategoryLevelId == 9) {
-								f.automatic = 1
-								productList2 = productList2.concat(f)
-							} else if (f.rootCategoryLevelId == 28) {
-								f.automatic = 1
-								junkProductList2 = junkProductList2.concat(f)
-							}
-
-						})
-
-						this.$set(m, 'instanceList2', instanceList2)
-						this.$set(m, 'modelList2', modelList2)
-						this.$set(m, 'palletList2', palletList2)
-						this.$set(m, 'packingList2', packingList2)
-						this.$set(m, 'semiProductList2', semiProductList2)
-						this.$set(m, 'productList2', productList2)
-						this.$set(m, 'junkProductList2', junkProductList2)
 
 
-					}
-				})
+	},
+	onShow() {
+		uni.$off("setSelectList");
+
+		uni.$on("setSelectList", (selectList, id) => {
+			this.List.forEach(m => {
+				if (m.workOrderId == id) {
+					let instanceList2 = [] // 投料
+					let modelList2 = [] // 模具
+					let palletList2 = []
+					let packingList2 = [] // 包装
+					let semiProductList2 = [] //半成品
+					let productList2 = [] // 产品
+					let junkProductList2 = [] //废品
+
+					selectList.forEach(f => {
+						if (![5, 8, 13, 23, 9, 28].includes(f.rootCategoryLevelId)) {
+							f.automatic = 1
+							instanceList2 = instanceList2.concat(f)
+						} else if (f.rootCategoryLevelId == 5) { // 模具
+							f.automatic = 1
+							modelList2 = modelList2.concat(f)
+						} else if (f.rootCategoryLevelId == 8) { // 舟皿
+							f.automatic = 1
+							palletList2 = palletList2.concat(f)
+						} else if (f.rootCategoryLevelId == 13) {
+							f.automatic = 1
+							packingList2 = packingList2.concat(f)
+						} else if (f.rootCategoryLevelId == 23) {
+							f.automatic = 1
+							semiProductList2 = semiProductList2.concat(f)
+						} else if (f.rootCategoryLevelId == 9) {
+							f.automatic = 1
+							productList2 = productList2.concat(f)
+						} else if (f.rootCategoryLevelId == 28) {
+							f.automatic = 1
+							junkProductList2 = junkProductList2.concat(f)
+						}
 
+					})
 
+					this.$set(m, 'instanceList2', instanceList2)
+					this.$set(m, 'modelList2', modelList2)
+					this.$set(m, 'palletList2', palletList2)
+					this.$set(m, 'packingList2', packingList2)
+					this.$set(m, 'semiProductList2', semiProductList2)
+					this.$set(m, 'productList2', productList2)
+					this.$set(m, 'junkProductList2', junkProductList2)
 
 
-			});
+				}
+			})
 
-		},
 
-		methods: {
-			scrolltolower() {},
 
-			save() {
 
+		});
 
-				let _arr = []
-				_arr = this.List.map(m => {
+	},
 
-					if (m.bomList.length > 0) {
-						let bomList = m.bomList.filter(f => f.checked)
-						m['bomDetailDTOSList'] = [...bomList, ...m.modelList, ...m.palletList]
-					}
-					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2, ...
-						m.semiProductList2, ...m.productList2, ...m.junkProductList2
-					]
-					m.isOutsource = this.isOutsource
-					return {
-						...m
-					}
-				})
+	methods: {
+		scrolltolower() { },
 
+		save() {
 
-				batchSave(_arr).then(res => {
+
+			let _arr = []
+			_arr = this.List.map(m => {
+
+				if (m.bomList.length > 0) {
+					let bomList = m.bomList.filter(f => f.checked)
+					m['bomDetailDTOSList'] = [...bomList, ...m.modelList, ...m.palletList]
+				}
+				m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2, ...
+					m.semiProductList2, ...m.productList2, ...m.junkProductList2
+				]
+				m.isOutsource = this.isOutsource
+				return {
+					...m
+				}
+			})
+			console.log(this.clientEnvironmentId,'this.clientEnvironmentId');
+			if (this.clientEnvironmentId == 21) {
+				console.log(1111111111111111111);
+
+				findVoucherList({workOrderId:this.idsList[0]}).then(res => {
 					uni.navigateTo({
 						url: `/pages/pda/picking/index/index?pickStatus=1`,
 					});
 
 				})
-			},
-
-			getList() {
-
-				workorderList({
 				
-					ids: this.idsList,
-					taskId: this.taskId
-				}).then(res => {
+			} else {
+				batchSave(_arr).then(res => {
+					uni.navigateTo({
+						url: `/pages/pda/picking/index/index?pickStatus=1`,
+					});
+
+				})
+			}
 
-					console.log('领料列表', res)
 
+			
+		},
+		// 中赢保存
+		getZnList() {
+			znPdaPage({
+				// ids: ,
+				workId: this.idsList[0]
+			}).then(res => {
+				console.log(res, 'res');
+				if (res?.length) {
 					this.List = res.map(m => {
 						m.workOrderId = m.id
 						let modelList = []
 						let palletList = []
-						let bomList = []
+						// let bomList = []
 
-						m.bomDetailDTOS.forEach((f, i) => {
+						// m.bomDetailDTOS.forEach((f, i) => {
 
-							if (f.rootCategoryLevelId == 5) {
-								f.automatic = 2
-								modelList = modelList.concat(f)
-							}
+						// 	if (f.rootCategoryLevelId == 5) {
+						// 		f.automatic = 2
+						// 		modelList = modelList.concat(f)
+						// 	}
 
-							if (f.rootCategoryLevelId == 8) {
-								f.automatic = 2
-								palletList = palletList.concat(f)
-							}
-							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) {
-								f.automatic = 2
-								bomList = bomList.concat(f)
-							}
+						// 	if (f.rootCategoryLevelId == 8) {
+						// 		f.automatic = 2
+						// 		palletList = palletList.concat(f)
+						// 	}
+						// 	if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) {
+						// 		f.automatic = 2
+						// 		bomList = bomList.concat(f)
+						// 	}
 
-						})
+						// })
 
 
 
 						m['modelList'] = modelList
 						m['palletList'] = palletList
-						m['bomList'] = bomList
+						// m['bomList'] = bomList
 
 
 						m['modelList2'] = []
@@ -338,325 +358,390 @@
 						}
 					})
 
+					console.log(this.List,'1111111111111111');
+				}
+
 
-				
 
-				})
-			},
+			})
+		},
 
-			hendDel(type, code, list) {
 
-				if (type == 'modelBom') {
-					console.log(list.length)
-					if (list.length == 0) {
 
-					}
-					this.List.forEach(f => {
-						if (f.code == code) {
-							if (list.length == 0) {
-								f.modelList2 = []
-								f.modelList = []
-								return false
-							}
-							f.modelList2 = list.filter(t => t.automatic == 1)
-							f.modelList = list.filter(t => t.automatic == 2)
+		getList() {
+
+			workorderList({
+
+				ids: this.idsList,
+				taskId: this.taskId
+			}).then(res => {
+
+				console.log('领料列表', res)
+
+				this.List = res.map(m => {
+					m.workOrderId = m.id
+					let modelList = []
+					let palletList = []
+					let bomList = []
+
+					m.bomDetailDTOS.forEach((f, i) => {
+
+						if (f.rootCategoryLevelId == 5) {
+							f.automatic = 2
+							modelList = modelList.concat(f)
 						}
-					})
-				}
-				if (type == 'boatBom') {
-					this.List.forEach(f => {
-						if (f.code == code) {
-							if (list.length == 0) {
-								f.palletList2 = []
-								f.palletList = []
-								return false
-							}
-							f.palletList2 = list.filter(t => t.automatic == 1)
-							f.palletList = list.filter(t => t.automatic == 2)
+
+						if (f.rootCategoryLevelId == 8) {
+							f.automatic = 2
+							palletList = palletList.concat(f)
+						}
+						if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) {
+							f.automatic = 2
+							bomList = bomList.concat(f)
 						}
+
 					})
-				}
 
-				this.$forceUpdate()
 
-			},
-			
-			getListOutsource(list) {
-				let param = {
-					workOrderId: this.idsList,
-					taskId: this.taskId
+
+					m['modelList'] = modelList
+					m['palletList'] = palletList
+					m['bomList'] = bomList
+
+
+					m['modelList2'] = []
+					m['instanceList2'] = []
+					m['palletList2'] = []
+					m['packingList2'] = []
+					m['semiProductList2'] = []
+					m['productList2'] = []
+					m['junkProductList2'] = []
+
+					delete m.id
+					return {
+						...m
+					}
+				})
+
+
+
+
+			})
+		},
+
+		hendDel(type, code, list) {
+
+			if (type == 'modelBom') {
+				console.log(list.length)
+				if (list.length == 0) {
+
 				}
-				
-				listOutsource(param).then(res => {
-			
-					if(res) {
-						this.$refs.outsourceRef.open(res)
-					} else {
+				this.List.forEach(f => {
+					if (f.code == code) {
+						if (list.length == 0) {
+							f.modelList2 = []
+							f.modelList = []
+							return false
+						}
+						f.modelList2 = list.filter(t => t.automatic == 1)
+						f.modelList = list.filter(t => t.automatic == 2)
+					}
+				})
+			}
+			if (type == 'boatBom') {
+				this.List.forEach(f => {
+					if (f.code == code) {
+						if (list.length == 0) {
+							f.palletList2 = []
+							f.palletList = []
+							return false
+						}
+						f.palletList2 = list.filter(t => t.automatic == 1)
+						f.palletList = list.filter(t => t.automatic == 2)
+					}
+				})
+			}
+
+			this.$forceUpdate()
+
+		},
+
+		getListOutsource(list) {
+			let param = {
+				workOrderId: this.idsList,
+				taskId: this.taskId
+			}
+
+			listOutsource(param).then(res => {
+
+				if (res) {
+					this.$refs.outsourceRef.open(res)
+				} else {
 					uni.showToast({
 						title: '暂无委外申请单',
 						icon: 'none'
 					})
-					}
-				})
-			},
-			
-			outsourceFn(list) {
-				this.outsourceInWarehouseFn(list)
-				
-		
-			},
+				}
+			})
+		},
 
+		outsourceFn(list) {
+			this.outsourceInWarehouseFn(list)
 
 
+		},
 
-			addPicking(id, item) {
-				const storageKey = Date.now() + "";
-				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2, ...item
-					.semiProductList2, ...item.productList2, ...item.junkProductList2
-				]
-				uni.setStorageSync(storageKey, arr);
-				uni.navigateTo({
-					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=pick&taskId=${this.taskId}`
-				})
-			},
 
-			getPick() {
-				pickDetails(this.idsList).then(res => {
 
-					if (res && res.length > 0) {
-						this.isPick = true
-					}
 
-				})
-			},
+		addPicking(id, item) {
+			const storageKey = Date.now() + "";
+			let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2, ...item
+				.semiProductList2, ...item.productList2, ...item.junkProductList2
+			]
+			uni.setStorageSync(storageKey, arr);
+			uni.navigateTo({
+				url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=pick&taskId=${this.taskId}`
+			})
+		},
+
+		getPick() {
+			pickDetails(this.idsList).then(res => {
 
-			outsourceInWarehouseFn(list) {
-				let param = {
-					outsourceOrder: list ||  [],
-					workOrderId: this.idsList[0],
-					taskId: this.taskId
+				if (res && res.length > 0) {
+					this.isPick = true
 				}
 
-				listOutsourceInWarehouse(param).then(res => {
-					res.list.map(m => {
-						m.isOut = 1
-						return {
-							...m
-						}
-					})
-					let _arr = [...this.List[0].instanceList2, ...res.list]
-					this.$set(this.List[0], 'instanceList2', _arr)
-					this.$forceUpdate()
-				})
-			},
+			})
+		},
 
-			openDetails() {
-				let url = `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
-				uni.navigateTo({
-					url
-				})
-			},
+		outsourceInWarehouseFn(list) {
+			let param = {
+				outsourceOrder: list || [],
+				workOrderId: this.idsList[0],
+				taskId: this.taskId
+			}
 
+			listOutsourceInWarehouse(param).then(res => {
+				res.list.map(m => {
+					m.isOut = 1
+					return {
+						...m
+					}
+				})
+				let _arr = [...this.List[0].instanceList2, ...res.list]
+				this.$set(this.List[0], 'instanceList2', _arr)
+				this.$forceUpdate()
+			})
 		},
 
-		beforeDestroy() {
-			uni.hideLoading();
+		openDetails() {
+			let url = `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
+			uni.navigateTo({
+				url
+			})
 		},
 
-	}
+	},
+
+	beforeDestroy() {
+		uni.hideLoading();
+	},
+
+}
 </script>
 
 <style lang="scss" scoped>
-	.content-box {
-		height: 100vh;
-		overflow: hidden;
-		display: flex;
-		flex-direction: column;
+.content-box {
+	height: 100vh;
+	overflow: hidden;
+	display: flex;
+	flex-direction: column;
 
-	}
+}
 
 
-	.list_box {
-		flex: 1;
-		overflow: hidden;
-		padding: 4rpx 0;
+.list_box {
+	flex: 1;
+	overflow: hidden;
+	padding: 4rpx 0;
 
-		.u-list {
-			height: 100% !important;
-		}
+	.u-list {
+		height: 100% !important;
+	}
 
-		.card_box {
-			padding: 16rpx 24rpx;
+	.card_box {
+		padding: 16rpx 24rpx;
 
-		}
+	}
 
 
-		.title_box {
-			.round {
-				width: 32rpx;
-				height: 32rpx;
-				line-height: 32rpx;
-				border-radius: 50%;
-				background: $theme-color;
-				color: #fff;
-				text-align: center;
-				font-size: 20rpx;
-			}
+	.title_box {
+		.round {
+			width: 32rpx;
+			height: 32rpx;
+			line-height: 32rpx;
+			border-radius: 50%;
+			background: $theme-color;
+			color: #fff;
+			text-align: center;
+			font-size: 20rpx;
+		}
 
-			.code {
-				margin-left: 16rpx;
-				font-family: PingFang SC;
-				font-size: 28rpx;
-				font-style: normal;
-				font-weight: 400;
-				color: $theme-color;
-			}
+		.code {
+			margin-left: 16rpx;
+			font-family: PingFang SC;
+			font-size: 28rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: $theme-color;
 		}
+	}
 
-		.right_box {}
+	.right_box {}
 
 
-		.material {
-			margin-top: 10rpx;
+	.material {
+		margin-top: 10rpx;
 
-			.left {
-				width: 40rpx;
-			}
+		.left {
+			width: 40rpx;
+		}
 
-			.zdy_check {
-				width: 30rpx;
-				height: 30rpx;
-				border: 2rpx solid #c8c9cc;
-				border-radius: 4rpx;
+		.zdy_check {
+			width: 30rpx;
+			height: 30rpx;
+			border: 2rpx solid #c8c9cc;
+			border-radius: 4rpx;
 
 
-			}
+		}
 
-			.check_active {
-				background: $theme-color;
-				border: 2rpx solid $theme-color;
+		.check_active {
+			background: $theme-color;
+			border: 2rpx solid $theme-color;
 
-				/deep/ .u-icon__icon {
-					color: #fff !important;
-				}
+			/deep/ .u-icon__icon {
+				color: #fff !important;
 			}
+		}
 
-			.content_table {
-				width: 652rpx;
-				border: 2rpx solid $border-color;
-
-				.item {
-					display: flex;
-					border-bottom: 2rpx solid $border-color;
-
+		.content_table {
+			width: 652rpx;
+			border: 2rpx solid $border-color;
 
-					.lable {
-						width: 132rpx;
-						text-align: center;
-						background-color: #F7F9FA;
-						font-size: 26rpx;
-						border-right: 2rpx solid $border-color;
-						flex-shrink: 0;
-					}
+			.item {
+				display: flex;
+				border-bottom: 2rpx solid $border-color;
 
-					.ww80 {
-						width: 80rpx;
-					}
 
-					.content {
-						width: 518rpx;
-						min-height: 64rpx;
-						font-size: 28rpx;
-						line-height: 28rpx;
-						font-style: normal;
-						font-weight: 400;
-						padding: 18rpx 8rpx;
-						box-sizing: border-box;
-						word-wrap: break-word;
-						flex-grow: 1 !important;
+				.lable {
+					width: 132rpx;
+					text-align: center;
+					background-color: #F7F9FA;
+					font-size: 26rpx;
+					border-right: 2rpx solid $border-color;
+					flex-shrink: 0;
+				}
 
-					}
+				.ww80 {
+					width: 80rpx;
+				}
 
-					.content_num {
-						display: flex;
-						align-items: center;
-						padding: 0 4rpx;
+				.content {
+					width: 518rpx;
+					min-height: 64rpx;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					font-style: normal;
+					font-weight: 400;
+					padding: 18rpx 8rpx;
+					box-sizing: border-box;
+					word-wrap: break-word;
+					flex-grow: 1 !important;
 
-						/deep/ .uni-input-input {
-							border: 2rpx solid #F0F8F2;
-							background: #F0F8F2;
-							color: $theme-color;
-						}
+				}
 
-						.unit {
-							width: 90rpx;
-							text-align: center;
-							font-size: 24rpx;
-							color: #404446;
-						}
-					}
+				.content_num {
+					display: flex;
+					align-items: center;
+					padding: 0 4rpx;
 
-					.pd4 {
-						padding: 4rpx 8rpx;
+					/deep/ .uni-input-input {
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
 					}
 
-
-
-					&:last-child {
-						border-bottom: none;
+					.unit {
+						width: 90rpx;
+						text-align: center;
+						font-size: 24rpx;
+						color: #404446;
 					}
 				}
 
-				.ww55 {
-					width: 55%;
+				.pd4 {
+					padding: 4rpx 8rpx;
 				}
 
-				.ww45 {
-					width: 45%;
+
+
+				&:last-child {
+					border-bottom: none;
 				}
 			}
-		}
-
 
-	}
+			.ww55 {
+				width: 55%;
+			}
 
-	.bottom-wrapper {
-		.btn_box {
-			width: 750rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			background: $theme-color;
-			text-align: center;
-			font-size: 36rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: #fff;
+			.ww45 {
+				width: 45%;
+			}
 		}
 	}
 
 
-	.flex_btn {
-		position: fixed;
+}
 
-		right: 0;
-		bottom: 160rpx;
-		width: 140rpx;
-		height: 66rpx;
-		line-height: 66rpx;
-		border-radius: 22rpx 0 0 22rpx;
+.bottom-wrapper {
+	.btn_box {
+		width: 750rpx;
+		height: 88rpx;
+		line-height: 88rpx;
 		background: $theme-color;
 		text-align: center;
-		font-size: 22rpx;
+		font-size: 36rpx;
 		font-style: normal;
 		font-weight: 400;
 		color: #fff;
 	}
-	
-	.out_box{
-		margin: 20rpx ;
-		display: flex;
-		justify-content: center;
-		color:  $theme-color;
-		font-size: 28rpx;
-	}
+}
+
+
+.flex_btn {
+	position: fixed;
+
+	right: 0;
+	bottom: 160rpx;
+	width: 140rpx;
+	height: 66rpx;
+	line-height: 66rpx;
+	border-radius: 22rpx 0 0 22rpx;
+	background: $theme-color;
+	text-align: center;
+	font-size: 22rpx;
+	font-style: normal;
+	font-weight: 400;
+	color: #fff;
+}
+
+.out_box {
+	margin: 20rpx;
+	display: flex;
+	justify-content: center;
+	color: $theme-color;
+	font-size: 28rpx;
+}
 </style>

+ 532 - 0
pages/pda/warehousing/components/jobBom.vue

@@ -0,0 +1,532 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">报工信息</view>
+		</view>
+
+
+		<view class="material ">
+
+
+			<view class="content_table">
+
+
+				<view class="item rx-sc"
+					v-if="Object.prototype.hasOwnProperty.call(item, 'product') && clientEnvironmentId != 3">
+					<view class="rx ">
+						<view class="lable lable220 rx-cc ">投料数量</view>
+						<view class="content">
+
+							{{ item.product[0] && item.product[0].feedQuantity }}
+						</view>
+					</view>
+				</view>
+
+
+				<view class="item rx-sc">
+					<view class="rx ww55 ">
+						<view class="lable lable150 rx-cc ">要求生产数量</view>
+						<view class="content rx-sc">
+							<view>{{ item.formingNum }}</view>
+							<view class="unit">{{ item.unit }}</view>
+						</view>
+					</view>
+
+					<view class="rx ww45">
+						<view class="lable rx-cc ww80">重量</view>
+						<view class="content content_num">
+							<view>{{ item.formingWeight }}</view>
+							<view class="unit">{{ item.weightUnit }}</view>
+
+						</view>
+					</view>
+
+				</view>
+
+
+
+
+				<view class="item rx-sc">
+					<view class="rx ww55 ">
+						<view class="lable lable150 rx-cc ">合格品数量</view>
+						<view class="content content_num">
+							<input class="uni-input" v-model="item.workReportInfo.formedNum" :disabled="true"
+								 type="digit"></input>
+							<view class="unit">{{ item.unit }}</view>
+						</view>
+					</view>
+
+					<view class="rx ww45">
+						<view class="lable rx-cc ww80">重量</view>
+						<view class="content content_num">
+							<input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"
+								:disabled="isDetails"></input>
+							<view class="unit">{{ item.weightUnit }}</view>
+						</view>
+					</view>
+
+				</view>
+
+
+
+				<view class="item rx-sc" v-for="(not, notIndex) in notFormedList" :key='notIndex'>
+
+					<view class="rx ww55 ">
+
+						<view class="lable lable150 rx-cc ">不合格数量</view>
+						<view class="content content_num">
+							<!-- //详情 -->
+							<input class="uni-input" v-model="item.workReportInfo.notFormedNum" type="digit" :disabled="isDetails"
+						
+								@input="changeNum"></input>
+								
+							<input class="uni-input" v-model="not.notFormedNum" type="number" 
+						
+								></input>	
+								<!-- @input="changeNum(not)" -->
+							<view class="unit">{{ item.unit }}</view>
+						</view>
+					</view>
+
+					<view class="rx ww45">
+						<view class="lable rx-cc ww80">重量</view>
+						<view class="content content_num">
+							<input class="uni-input" v-model="item.workReportInfo.notFormedWeight" type="digit"
+								:disabled="isDetails" ></input>
+							<input class="uni-input" v-model="not.notFormedWeight" type="digit"
+								:disabled="isDetails" ></input>	
+							<view class="unit">{{ item.weightUnit }}</view>
+
+							<!-- <view class="penalize" v-if='!isDetails'
+								:style="{ background: not.warehouseId ? '#FFA07A' : '' }" @click="penalize">处置</view> -->
+							<!-- <view class="penalize" v-if='isDetails'
+								:style="{ background: not.warehouseId ? '#FFA07A' : '' }"
+								@click="handleView(isDetails ? not.warehouseName : item.warehouseName)">查看</view> -->
+						</view>
+					</view>
+				</view>
+				<view class="item rx-sc">
+					<view class="rx ww55 ">
+						<view class="lable lable150 rx-cc ">报工备注</view>
+						<view class="content content_num" style="width: 100%;">
+							<input class="uni-input" v-model="item.workReportInfo.remark" :disabled="isDetails"
+								 type="text"></input>
+						</view>
+					</view>
+					<view class="rx ww45 ">
+						<view class="lable ww80 rx-cc ">批次号</view>
+						<view class="content content_num" style="width: 100%;">
+							{{ item.batchNo }}
+							<input class="uni-input" v-model="item.workReportInfo.remark" :disabled="isDetails"
+								 type="text"></input>
+						</view>
+					</view>
+				</view>
+
+
+			</view>
+
+
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		item: {
+			type: Object,
+			default: () => { }
+		},
+		notFormed: {
+			type: Array,
+			default: () => []
+		},
+		isDetails: {
+			type: Boolean,
+			default: false
+		},
+
+
+
+	},
+
+	watch: {
+
+		notFormed: {
+			immediate: true,
+			deep: true,
+			handler(newVal) {
+				this.notFormedList = newVal
+			}
+		}
+	},
+
+
+	data() {
+		return {
+			notFormedList: [],
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+				.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
+
+		}
+	},
+	created() {
+
+
+
+
+		if (this.isDetails) {
+			this.notFormedList = this.notFormedList.map(m => {
+				return {
+					notFormedNum: Number(m.quantity),
+					notFormedWeight: m.weight,
+					...m
+				}
+
+			})
+		}
+
+	},
+	methods: {
+
+
+		setFormedNum(num) {
+			
+
+			this.item.workReportInfo.formedNum = num
+
+
+			let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
+				.item.weightMultiple)
+
+			if (['G', 'g', '克'].includes(this.item.singleWeightUnit)) {
+				weight = parseFloat((weight / 1000).toFixed(2))
+			} else {
+				weight = parseFloat(weight.toFixed(2))
+			}
+
+			this.$set(this.item.workReportInfo, 'formedWeight', weight)
+
+
+			this.$forceUpdate()
+		},
+
+
+		penalize() {
+
+			this.$emit('penalize', null)
+		},
+
+		handleView(name) {
+			uni.showToast({
+				icon: 'none',
+				title: name || '未设置'
+			})
+		},
+
+		blurNum(value) {
+			console.log(num,'6666666666666');
+
+			let total = 0;
+			//匹配非数字
+			let val=value.formedNum;
+			let reg = new RegExp("([^0-9]*)","g");
+			let ma = val.match(reg);
+			//如果有非数字,替换成""
+			if(ma.length>0){
+				for(let k in ma){
+					if(ma[k]!=""){
+						val = val.replace(ma[k],0);
+					}
+				}
+			}
+			//可以为0,但不能以0开头
+			if(val.startsWith("0")&&val.length>1){
+				val = val.substring(1,val.length);
+			}
+			value.formedNum=val;
+
+			if (this.item.currentTaskDiagram.isFirstTask) {
+
+				// formingNum 生产数量  feedQuantity   this.item.product[0] //投料数量
+				if (value.formedNum > this.item.formingNum) {
+					this.$set(this.item.workReportInfo, 'workReportInfo', this.item.formingNum)
+					this.$set(this.notFormedList[0], 'notFormedNum', 0)
+					this.notForme()
+					return uni.showToast({
+						icon: 'none',
+						title: '合格品数量不能大于要求生产数量'
+					})
+				}
+			} else {
+				if (this.item.product.length) {
+
+					if (value.formedNum > this.item.product[0].feedQuantity) {
+						console.log(this.item.product[0].feedQuantity);
+						this.$set(this.item.workReportInfo, 'workReportInfo', this.item.product[0].feedQuantity)
+						this.$set(this.notFormedList[0], 'notFormedNum', 0)
+						this.notForme()
+						return uni.showToast({
+							icon: 'none',
+							title: '合格品数量不能大于投料数量'
+						})
+					}
+					
+				}
+			}
+
+
+			if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.item.workReportInfo
+				.formedNum)) {
+
+				this.$set(this.notFormedList[0], 'notFormedNum', this.item.product[0].feedQuantity - Number(this.item
+					.workReportInfo.formedNum))
+				this.notForme()
+
+			}
+
+
+			let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
+				.item.weightMultiple)
+
+			if (['G', 'g', '克'].includes(this.item.singleWeightUnit)) {
+				weight = parseFloat((weight / 1000).toFixed(2))
+			} else {
+				weight = parseFloat(weight.toFixed(2))
+			}
+
+			this.$set(this.item.workReportInfo, 'formedWeight', weight)
+
+			total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
+
+			console.log(total);
+
+			this.$emit('modeNum', total)
+
+			this.$forceUpdate()
+
+		},
+		modeNum(num) {
+			console.log(num, '------------', this.objData.modelList.length);
+			if (this.objData.modelList.length == 0) {
+				return false
+			}
+			console.log(num);
+			this.$refs.modelRef.setNum(num)
+		},
+		notForme() {
+			console.log(num,'77777777777777');
+			let weight = Number(this.notFormedList[0].notFormedNum||0) * Number(this.item.singleWeight) * Number(this
+				.item.weightMultiple)
+			if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
+				'克') {
+				weight = parseFloat((weight / 1000).toFixed(2))
+			} else {
+				weight = parseFloat(weight.toFixed(2))
+			}
+			this.$set(this.notFormedList[0], 'notFormedWeight', weight)
+
+
+			if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.notFormedList[0]
+				.notFormedNum)) {
+				this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this
+					.notFormedList[0]
+					.notFormedNum))
+
+
+				let weight = Number(this.item.workReportInfo?.formedNum||0) * Number(this.item.singleWeight) * Number(this
+					.item.weightMultiple)
+				if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item
+					.singleWeightUnit == '克') {
+					weight = parseFloat((weight / 1000).toFixed(2))
+				} else {
+					weight = parseFloat(weight.toFixed(2))
+				}
+				this.$set(this.item.workReportInfo, 'formedWeight', weight)
+
+			}
+
+
+
+			this.$forceUpdate()
+
+		},
+
+		changeNum(value) {
+			// 不合格数量
+			let val = value.notFormedNum;
+			//匹配非数字
+			let reg = new RegExp("([^0-9]*)","g");
+			let ma = val.match(reg);
+			//如果有非数字,替换成""
+			if(ma.length>0){
+				for(let k in ma){
+					if(ma[k]!=""){
+						val = val.replace(ma[k],"0");
+					}
+				}
+			}
+			//可以为0,但不能以0开头
+			if(val.startsWith("0")&&val.length>1){
+				val = val.substring(1,val.length);
+			}
+
+			// this.$set(this.item.workReportInfo, 'formedNum', val)
+			value.notFormedNum = val;
+
+
+
+
+			let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
+
+			
+			console.log(total);
+
+			this.$emit('modeNum', total)
+
+			this.notForme()
+			// this.blurNum()
+		},
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.title_box {
+	margin-top: 20rpx;
+
+	.name {
+		font-size: 28rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: $theme-color;
+		padding-left: 20rpx;
+
+		position: relative;
+
+		&:before {
+			position: absolute;
+			content: '';
+			left: 0rpx;
+			top: 0rpx;
+			bottom: 0rpx;
+			width: 4rpx;
+			height: 28rpx;
+			background: $theme-color;
+			margin: auto;
+		}
+
+
+	}
+
+
+
+}
+
+
+.material {
+	margin-top: 10rpx;
+
+
+
+	.content_table {
+		width: 100%;
+		border: 2rpx solid $border-color;
+
+		.item {
+			display: flex;
+			border-bottom: 2rpx solid $border-color;
+
+
+			.lable {
+				width: 132rpx;
+				text-align: center;
+				background-color: #F7F9FA;
+				font-size: 26rpx;
+				border-right: 2rpx solid $border-color;
+				flex-shrink: 0;
+			}
+
+			.lable220 {
+				width: 220rpx !important;
+				font-size: 24rpx;
+			}
+
+			.lable150 {
+				width: 156rpx !important;
+				font-size: 24rpx;
+			}
+
+			.ww80 {
+				width: 80rpx;
+			}
+
+			.content {
+				width: 518rpx;
+				min-height: 64rpx;
+				font-size: 28rpx;
+				line-height: 28rpx;
+				font-style: normal;
+				font-weight: 400;
+				padding: 18rpx 8rpx;
+				box-sizing: border-box;
+				word-wrap: break-word;
+				flex-grow: 1 !important;
+
+
+				.unit {
+					padding: 0 4rpx;
+					font-size: 24rpx;
+					color: #404446;
+				}
+
+				.penalize {
+					width: 160rpx;
+					line-height: 60rpx;
+					background: $theme-color;
+					font-size: 24rpx;
+					text-align: center;
+					color: #fff;
+				}
+
+			}
+
+			.content_num {
+				display: flex;
+				align-items: center;
+				padding: 0 4rpx;
+
+				/deep/ .uni-input-input {
+					border: 2rpx solid #F0F8F2;
+					background: #F0F8F2;
+					color: $theme-color;
+				}
+
+
+			}
+
+			.pd4 {
+				padding: 4rpx 8rpx;
+			}
+
+
+
+			&:last-child {
+				border-bottom: none;
+			}
+		}
+
+		.ww55 {
+			width: 55%;
+		}
+
+		.ww45 {
+			width: 45%;
+		}
+	}
+}
+</style>

+ 201 - 151
pages/pda/warehousing/index.vue

@@ -10,6 +10,9 @@
 				<view class="card_box">
 					<workOrderBom :item='objData' v-if='objData' @handleScan='handleScan'></workOrderBom>
 
+					<jobBom v-if="clientEnvironmentId == 2" :item='objData' ref='jobRef'
+						:notFormed='objData.notFormedList' @penalize='penalize' @modeNum='modeNum'></jobBom>
+
 					<view class="select_box">
 						<zxz-uni-data-select :localdata="warehouseList" placeholder="请选择入库仓库" v-model="warehouseId"
 							dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
@@ -23,7 +26,7 @@
 
 					<view class="list_box" v-for="(it, index) in tgList" :key="index" v-if="clientEnvironmentId == 3">
 						<view class="time">打包时间: {{ it.createTime }}</view>
-						<packingTgBom :list='it.extInfo.pickOutInList' :isWarehousing='true' :item='it' ></packingTgBom>
+						<packingTgBom :list='it.extInfo.pickOutInList' :isWarehousing='true' :item='it'></packingTgBom>
 					</view>
 
 
@@ -42,210 +45,257 @@
 </template>
 
 <script>
-	import {
-		getByIdReport,
-		jobSave
-	} from '@/api/pda/jobBooking.js'
-
-	import {
-		getWarehouseList,
-		listPDAToWarehouse,
-		listPDAToWarehouseTG
-	} from '@/api/pda/workOrder.js'
-
-	import packingBom from './components/packingBom.vue'
-	import workOrderBom from '../feeding/components/workOrderBom.vue'
-	import packingTgBom from '../jobBooking/components/packingTgBom.vue'
-	export default {
-		components: {
-			workOrderBom,
-			packingBom,
-			packingTgBom
-		},
-		data() {
-			return {
-				id: null,
-				taskId: null,
+import {
+	getByIdReport,
+	jobSave
+} from '@/api/pda/jobBooking.js'
 
-				objData: {},
-				warehouseList: [],
-				warehouseId: null,
-				delta: -1,
+import {
+	getWarehouseList,
+	listPDAToWarehouse,
+	listPDAToWarehouseTG,
+	productReceiveCreate
+} from '@/api/pda/workOrder.js'
 
-				List: [],
+import jobBom from './components/jobBom.vue'
 
-				tgList: [],
 
+import packingBom from './components/packingBom.vue'
+import workOrderBom from '../feeding/components/workOrderBom.vue'
+import packingTgBom from '../jobBooking/components/packingTgBom.vue'
 
-				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
-					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
+export default {
+	components: {
+		workOrderBom,
+		packingBom,
+		packingTgBom,
+		jobBom
+	},
+	data() {
+		return {
+			id: null,
+			taskId: null,
 
-				inWarehouseType: null,
+			objData: {},
+			warehouseList: [],
+			warehouseId: null,
+			delta: -1,
 
-			}
-		},
+			List: [],
 
-		onLoad(options) {
-			this.id = options.workOrderId
-			this.taskId = options.taskId
-			this.workReportId = options.workReportId
-			this.delta = options.delta
-		
-			this.getList()
+			tgList: [],
 
-			this.getWarehouseListFn()
 
-			if (this.clientEnvironmentId == 3) {
-				this.getTgWarehouse()
-			} else {
-				this.getWarehouse()
-			}
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+				.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-		},
+			inWarehouseType: null,
 
-		methods: {
-			getList() {
-				getByIdReport(this.id, this.taskId).then(res => {
-					this.objData = res
-					if (res.workOrderType == 1) {
-						this.inWarehouseType = 1
-					} else if (res.workOrderType == 2) {
-						this.inWarehouseType = 8 //  "1入库类型1生产入库2半成品入库"
-					}
+		}
+	},
 
+	onLoad(options) {
+		this.id = options.workOrderId
+		this.taskId = options.taskId
+		this.workReportId = options.workReportId
+		this.delta = options.delta
 
-					this.objData.workReportInfo = {
-						formingNum: null,
-						formingWeight: null,
-						formedNum: null,
-						formedWeight: null,
-						taskId: this.taskId
+		this.getList()
 
-					}
+		this.getWarehouseListFn()
 
-				})
-			},
+		if (this.clientEnvironmentId == 3) {
+			this.getTgWarehouse()
+		} else {
+			this.getWarehouse()
+		}
 
-			getWarehouseListFn() {
-				getWarehouseList().then(res => {
-					this.warehouseList = res
-				})
-			},
+	},
 
-			getWarehouse() {
-				let param = {
-					workOrderId: this.id,
-					taskId: this.taskId,
-					workReportId: this.workReportId
+	methods: {
+		getList() {
+			getByIdReport(this.id, this.taskId).then(res => {
+				this.objData = res
 
+				// console.log(this.objData,'222222222222222222222');
+				if (res.workOrderType == 1) {
+					this.inWarehouseType = 1
+				} else if (res.workOrderType == 2) {
+					this.inWarehouseType = 8 //  "1入库类型1生产入库2半成品入库"
 				}
-				listPDAToWarehouse(param).then(res => {
-					this.List = res
-				})
-			},
-
-
-			getTgWarehouse() {
-				let param = {
-					workOrderId: this.id,
-					taskId: this.taskId,
-					workReportId: this.workReportId
+				// workReportInfo.formedNum
+				this.objData.notFormedList = [{
+					notFormedNum: null,
+					notFormedWeight: null,
+					weightUnit: res.weightUnit,
+					unit: res.unit,
+					warehouseId: null, // 处置 仓库id
+				}]
+				this.objData.workReportInfo = {
+					formingNum: null,
+					formingWeight: null,
+					formedNum: this.objData.product[0] && this.objData.product[0].feedQuantity,
+					formedWeight: null,
+					taskId: this.taskId
 
 				}
-				listPDAToWarehouseTG(param).then(res => {
-					this.tgList = res
-				})
-			},
 
+			})
+		},
 
-			handleScan() {
+		getWarehouseListFn() {
+			getWarehouseList().then(res => {
+				this.warehouseList = res
+			})
+		},
 
-			},
-			scrolltolower() {},
+		getWarehouse() {
+			let param = {
+				workOrderId: this.id,
+				taskId: this.taskId,
+				workReportId: this.workReportId
 
-			save() {
+			}
+			listPDAToWarehouse(param).then(res => {
+				this.List = res
+			})
+		},
 
-				if (!this.warehouseId) {
-					uni.showToast({
-						icon: 'none',
-						title: '请先选择入库仓库'
-					})
-					return false
-				}
 
+		getTgWarehouse() {
+			let param = {
+				workOrderId: this.id,
+				taskId: this.taskId,
+				workReportId: this.workReportId
 
+			}
+			listPDAToWarehouseTG(param).then(res => {
+				this.tgList = res
+			})
+		},
 
-				let storageInfo = {
-					warehouseId: this.warehouseId,
-					inWarehouseType: this.inWarehouseType,
-					toWarehouseList: this.clientEnvironmentId == 3 ? this.tgList : this.List,
-				}
-				this.objData['storageInfo'] = storageInfo
 
+		handleScan() {
+
+		},
+		scrolltolower() { },
 
-				jobSave(this.objData).then(res => {
-					uni.navigateBack();
+		save() {
 
+			if (!this.warehouseId) {
+				uni.showToast({
+					icon: 'none',
+					title: '请先选择入库仓库'
 				})
+				return false
+			}
+
 
-			},
 
+			// if (this.clientEnvironmentId == 21) {
+			// 	// /pda/mes/workreport/productReceiveCreate/{workId}
+			// 	productReceiveCreate(this.objData.workOrderId).then(v=>{
+			// 		uni.navigateBack();
+			// 	})
+
+			// } else {
+
+			let categoryId = '',rootCategoryLevelId='';
+
+			if (this.objData.product.length) {
+				categoryId = this.objData.product[0].categoryId;
+				rootCategoryLevelId = this.objData.product[0].rootCategoryLevelId;
+			}
+			
+
+			let storageInfo = {
+				warehouseId: this.warehouseId,
+				inWarehouseType: this.inWarehouseType,
+			toWarehouseList: this.clientEnvironmentId == 3 ? this.tgList : this.List,
+			}
+			if (this.clientEnvironmentId==2) {
+				storageInfo.packingReportList= [{
+					code: this.objData.productCode,
+					categoryId: categoryId,
+					workOrderId: this.objData.workOrderId,
+					rootCategoryLevelId: rootCategoryLevelId,
+					totalQuantity: this.objData.workReportInfo.formedNum,
+					quantity: this.objData.workReportInfo.formedNum,
+					unit: this.objData.unit,
+					packingNum: 1,
+					taskId: -1
+				}]
+			}
+
+
+			this.objData['storageInfo'] = storageInfo
 	
+			jobSave(this.objData).then(res => {
+				uni.navigateBack();
+
+			})
+			// }
+
+
+
+		},
+
+
 	}
-	}
+}
 </script>
 <style lang="scss" scoped>
-	.content-box {
-		height: 100vh;
-		overflow: hidden;
-		display: flex;
-		flex-direction: column;
+.content-box {
+	height: 100vh;
+	overflow: hidden;
+	display: flex;
+	flex-direction: column;
 
-	}
+}
 
-	.list_box {
-		flex: 1;
-		overflow: hidden;
-		padding: 4rpx 0;
+.list_box {
+	flex: 1;
+	overflow: hidden;
+	padding: 4rpx 0;
 
-		.u-list {
-			height: 100% !important;
-		}
+	.u-list {
+		height: 100% !important;
+	}
 
-		.card_box {
-			padding: 16rpx 24rpx;
-		}
+	.card_box {
+		padding: 16rpx 24rpx;
+	}
 
 
 
-	}
+}
 
-	.bottom-wrapper {
-		.btn_box {
-			width: 750rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			background: $theme-color;
-			text-align: center;
-			font-size: 36rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: #fff;
-		}
+.bottom-wrapper {
+	.btn_box {
+		width: 750rpx;
+		height: 88rpx;
+		line-height: 88rpx;
+		background: $theme-color;
+		text-align: center;
+		font-size: 36rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: #fff;
 	}
+}
 
 
 
 
-	.select_box {
-		margin-top: 20rpx;
-	}
+.select_box {
+	margin-top: 20rpx;
+}
 
-	.list_box {
-		margin-top: 40rpx;
+.list_box {
+	margin-top: 40rpx;
 
-		.time {
-			font-size: 28rpx;
-		}
+	.time {
+		font-size: 28rpx;
 	}
+}
 </style>

+ 12 - 3
pages/pda/workOrder/extrusionMolding/index.vue

@@ -44,7 +44,10 @@
 					<text> {{ info.productCode }}</text>
 				</view>
 
-
+				<view class="item_list rx-bc">
+					<text class="lable">委外状态</text>
+					<text> {{ info.outsourceStatus | outsourceStatusText}}</text>
+				</view>
 	
 
 
@@ -212,6 +215,11 @@
 			stepsNav,
 			productionDetailed
 		},
+		filters:{
+			outsourceStatusText(v){
+				return v==1?"未委外":v==2?"委外中":v==3?"完成委外":"";
+			}
+		},
 		data() {
 			return {
 				title: '',
@@ -339,7 +347,7 @@
 			},
 
 			operate(type, item) {
-				console.log(4444, type)
+				console.log(4444, type,item)
 
 				// if (this.info.outsourceStatus == 2) {
 				// 	uni.showToast({
@@ -374,6 +382,7 @@
 				let url
 				let taskId = this.currentTaskId || this.taskId
 				let taskName = this.currentTaskName || this.info.taskName
+				
 				if (type == 'picking') {
 					url = '/pages/pda/picking/details'
 					let _arr = JSON.stringify([this.info.id])
@@ -409,7 +418,7 @@
 				
 					
 					url = '/pages/pda/jobBooking/index/index'
-					url += `?id=${this.info.id}&taskId=${taskId }&taskName=${taskName}&taskType=${this.currentType}&isOutsource=${item.isOutsource}`
+					url += `?id=${this.info.id}&taskId=${taskId }&taskName=${taskName}&taskType=${this.currentType}&isOutsource=${item.isOutsource||0}&categoryId=${this.info.categoryId}`
 					uni.navigateTo({
 						url
 					})

+ 28 - 5
pages/pda/workOrder/search/index.vue

@@ -227,7 +227,9 @@
 		getMaterielDetails,
 		listInProduct,
 		listOutsourceInWarehouse,
-		outsourceEndPick
+		outsourceEndPick,
+		categoryGetList,
+		assetPdaPage
 	} from '@/api/pda/workOrder.js'
 
 
@@ -304,7 +306,10 @@
 		},
 
 		onLoad(option) {
+			
 			this.pid = option.id
+			this.classIds = option.classIds || [];
+
 			this.isType = option.isType
 			if (option.taskId == 'undefined') {
 				this.taskId = null
@@ -314,7 +319,7 @@
 			if (Object.prototype.hasOwnProperty.call(option, 'classIds')) {
 				this.classIds = option.classIds
 			}
-
+			
 			if (option.storageKey) {
 				this.storageKey = option.storageKey
 
@@ -417,6 +422,7 @@
 
 			getTreeList() {
 				let params = {}
+				console.log(this.classIds,'option',this.isType);
 				if (this.isType == 'feed') {
 					params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 28]
 				} else if (this.isType == 'pick') {
@@ -425,10 +431,13 @@
 					params['ids'] = [4, 7]
 				} else if (this.isType == 'zdy') {
 					params['ids'] = JSON.parse(this.classIds);
+				} else if (this.isType == 'weiwai') {
+					params['ids'] = JSON.parse(this.classIds)
 				}
 
 
 
+
 				treeByPid(params).then(res => {
 					this.classificationList = res
 					this.confirm([res[0].id], res[0].name, res[0].rootCategoryLevelId)
@@ -436,11 +445,14 @@
 			},
 
 			confirm(id, name, rootCategoryLevelId) {
+
 				this.rootCategoryLevelId = rootCategoryLevelId
 
 				this.categoryLevelId = id
 
 				this.list = []
+
+				console.log('是这里嘛');
 				this.getList()
 			},
 
@@ -510,8 +522,18 @@
 
 				} else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
 					URL = assetPage
+				} else if (this.isType == 'weiwai') { // 出库
+					if(this.pid==3){
+						URL = categoryGetList
+					}else{
+						URL = assetPdaPage
+					}
+					
 				}
 
+				console.log(this.pid,param,'11111111111');
+
+
 				URL(param).then(res => {
 				
 					if (this.rootCategoryLevelId == '11') {
@@ -603,15 +625,16 @@
 			//跳转回添加页面
 			jumpAdd(type) {
 				if (type == 1) {
-					if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy') {
+					if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy'|| this.isType == 'weiwai') {
 						
 						
-						if(this.isType == 'zdy' && ( this.pid == 2 ||  this.pid == 3 )) {
+						if((this.isType == 'zdy'|| this.isType == 'weiwai') && ( this.pid == 2 ||  this.pid == 3 )) {
 							let param = {
 								memoList: this.memoList,
 								pid:this.pid
 							}
-							
+							// console.log(param,'param1234567890');
+							// return
 						
 							EventBus.$emit('outEvent', { message: param });
 						} else {