ysy 1 год назад
Родитель
Сommit
10bb8dc81e

+ 29 - 1
api/pda/workOrder.js

@@ -204,7 +204,7 @@ export async function listInProduct(params) {
 // 根据工单查委外入库信息
 export async function listOutsourceInWarehouse(params) {
 	const data = await get(
-		Vue.prototype.apiUrl + `//mes/applyoutsource/listOutsourceInWarehouse`, params, true,
+		Vue.prototype.apiUrl + `/mes/applyoutsource/listOutsourceInWarehouse`, params, true,
 	);
 	if (data.code == 0) {
 		return data.data;
@@ -663,3 +663,31 @@ export async function removeCache(params) {
 	}
 	return Promise.reject(data.message);
 }
+
+
+// 质检-获取质检参数
+
+export async function qualityParamApi(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/mes/workorder/qualityParam`, params, true,
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+
+// pda质检-取样
+
+export async function qualityQy(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/workorder/qualityParam`, params, true,
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}

+ 52 - 36
pages/pda/components/bottomOperate.vue

@@ -22,6 +22,13 @@
 			</view>
 
 
+
+			<view class="list rx-bc" v-if="newTaskObj.existOutsource == 1">
+				<view class="list_item_btn" @click="operate('outPicking', {})">委外领料</view>
+				<view class="list_item_btn" @click="operate('jobBooking', {})">委外报工</view>
+			</view>
+
+
 		</view>
 
 
@@ -174,6 +181,7 @@
 				}
 			},
 
+
 			gdStatus: {
 				immediate: true,
 				deep: true,
@@ -200,6 +208,7 @@
 				handler(newVal) {
 					console.log(newVal)
 					this.newTaskObj = newVal
+
 				}
 			},
 
@@ -220,6 +229,7 @@
 
 				btnsList: [],
 				btnState: 1,
+
 				GDStatus: null,
 				btnControlReportMethod: null,
 				btnList: {
@@ -253,9 +263,23 @@
 					],
 
 					3: [{
-						name: '报工',
-						type: 'inspection'
-					}, ],
+							name: '更换周转车',
+							type: 'qualityTurnover'
+						},
+
+						{
+							name: '质检',
+							type: 'inspection'
+						},
+
+						{
+							name: '报工',
+							type: 'inspectionJob'
+						}
+
+
+
+					],
 
 					4: [{
 							name: '领料',
@@ -340,34 +364,10 @@
 
 
 		created() {
-			this.getTwoTree()
+
 		},
 
 		methods: {
-			getTwoTree() {
-				getTwoTreeByPid(12).then(res => {
-					let _arr = res.map(m => {
-						m.type = 'inspection'
-						return m
-					})
-					this.btnList[3] = []
-
-
-					this.btnList[3] = [{
-							name: '更换周转车',
-							type: 'qualityTurnover'
-						},
-						..._arr,
-						{
-							name: '报工',
-							type: 'inspectionJob'
-						}
-					]
-
-
-				})
-			},
-
 
 
 			open() {
@@ -466,7 +466,8 @@
 
 				this.newStepsList = []
 				this.stepsList.forEach((f, i) => {
-					if (f.taskId != '-1' && f.taskId != '-2' && f.taskTypeName != '包装' && i > this.activeIndex && f
+					if (f.taskId != '-1' && f.taskId != '-2' && f.taskTypeName != '包装' && i > this
+						.activeIndex && f
 						.type == 1) {
 						this.newStepsList.push(f)
 					}
@@ -489,15 +490,15 @@
 				if (this.endTaskId) {
 					const index = this.newStepsList.findIndex(item => item.taskId === this.endTaskId) + 1;
 					if (index !== -1) {
-					    // 使用slice截取目标元素之前的部分,并通过map提取id
-					    const previousIds = this.newStepsList.slice(0, index).map(item => item.taskId);
-					this.outsourceForm.taskIds = previousIds.join(',')
-					
-					
+						// 使用slice截取目标元素之前的部分,并通过map提取id
+						const previousIds = this.newStepsList.slice(0, index).map(item => item.taskId);
+						this.outsourceForm.taskIds = previousIds.join(',')
+
+
 					} else {
-					  this.outsourceForm.taskIds = ''
+						this.outsourceForm.taskIds = ''
 					}
-					
+
 				} else {
 					this.outsourceForm.taskIds = ''
 				}
@@ -705,4 +706,19 @@
 
 		}
 	}
+
+
+	.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;
+	}
 </style>

+ 9 - 2
pages/pda/feeding/bill/index.vue

@@ -31,7 +31,7 @@
 
 						<instanceBom v-if='it.instanceList.length != 0'  :isDetails='true' :list='it.instanceList' :currentTaskDiagram='currentTaskDiagram' :equipmentList='it.equipmentList'></instanceBom>
 
-						<semiProductBom v-if='it.semiProductList.length != 0'  :isDetails='true' :list='it.semiProductList' :currentTaskDiagram='currentTaskDiagram' :equipmentList="it.equipmentList"  :workInfo="it"></semiProductBom>
+						<semiProductBom v-if='it.taskType != 3 && it.semiProductList.length != 0'  :isDetails='true' :list='it.semiProductList' :currentTaskDiagram='currentTaskDiagram' :equipmentList="it.equipmentList"  :workInfo="it"></semiProductBom>
 						
 
                         <turnoverBom v-if='it.turnover.length != 0' :list='it.turnover':isDetails='true' :wordItem='it' pattern='feed'></turnoverBom>
@@ -41,6 +41,11 @@
 						<palletBom v-if="Object.prototype.hasOwnProperty.call(it, 'palletList')" :palletList='it.palletList'></palletBom>
 						
 						<revolvingDiskBom v-if="Object.prototype.hasOwnProperty.call(it, 'revolvingDiskList')"  :revolvingDiskList="it.revolvingDiskList"></revolvingDiskBom>
+						
+						
+						
+						<inspectionBom v-if='it.taskType == 3 && Object.prototype.hasOwnProperty.call(it, "semiProductList") && it.semiProductList' :semiProductList='it.semiProductList' :isDetails='true'></inspectionBom>
+						
 
 					</view>
 
@@ -66,6 +71,7 @@
 	import revolvingDiskBom from '../components/revolvingDiskBom'
 	import productsBom from'../components/productsBom.vue'
 	import turnoverBom from '../components/turnoverBom.vue'
+	import inspectionBom from '../../sample/components/inspectionBom'
 	import {
 		feedByOrderIds
 	} from '@/api/pda/feeding.js'
@@ -80,7 +86,8 @@
 			revolvingDiskBom,
 			semiProductBom,
 			productsBom,
-			turnoverBom
+			turnoverBom,
+			inspectionBom
 		},
 		data() {
 			return {

+ 6 - 1
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -42,7 +42,12 @@
 									({{it.rootCategoryLevelId == 2 ? '在制品' :  it.rootCategoryLevelId == 23 ? '半成品' :  it.rootCategoryLevelId == 9 ? '产品' :   it.rootCategoryLevelId == 28 ? '废品' : '' }})
 								</text> </view>
 
-							<view class="tag_box " v-if="it.isCache" style="margin-right: -36rpx;">缓</view>
+					           <view class="rx-ec">
+								   <view class="tag_box "  v-if="it.isCache"  style="margin-right: -36rpx;  margin-right: 4rpx;">缓</view>
+								   <view class="tag_box "  v-if="Object.prototype.hasOwnProperty.call(it.extInfo, 'isOutsource') && it.extInfo.isOutsource == 1" style="margin-right: -36rpx;">委外</view>
+								   </view>
+							
+						
 						</view>
 					</view>
 				</view>

+ 38 - 11
pages/pda/picking/components/instanceBom.vue

@@ -16,43 +16,61 @@
 
 				<view class="item">
 					<view class="lable rx-cc">名称</view>
-					<view class="content">{{mate.name}}</view>
+					<view class="content rx-bc">{{mate.name}}
+
+						<view class="tag_box "
+							v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1" style="">委外
+						</view>
+					</view>
 				</view>
 
 
-				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop' :key="index">
+				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop'
+					:key="index">
 					<view class="lable rx-cc">{{ itm.label }}</view>
 					<view class="content">{{ mate[itm.prop] }}</view>
 
 				</view>
-				
+
 				<view class="item">
 					<view class="lable rx-cc">包装库存</view>
 					<view class="content">{{mate.packingCountBase}}/ {{mate.minUnit}}</view>
 				</view>
 
 
-				<view class="item">
+				<view class="item"  >
 					<view class="lable rx-cc">领料数量</view>
-					<view class="content content_num">
+				 <view v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1">{{ mate.demandQuantity }}</view>
+					<view class="content content_num" v-else>
 						<input class="uni-input" v-model="mate.demandQuantity"
 							@blur='mate.demandQuantity > mate.availableCountBase ?  mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
 							type="number"></input>
 						<view class="unit">/{{mate.measuringUnit}}</view>
 						<view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }} {{mate.measuringUnit}})</view>
 					</view>
+				
 				</view>
 
 
 
-				<view class="item">
+				<view class="item" v-if="!Object.prototype.hasOwnProperty.call(mate, 'isOut') || mate.isOut == 0">
 					<view class="lable rx-cc">领料仓库</view>
-				<view class="content pd4">
-									<zxz-uni-data-select :localdata="mate.warehouseLists" v-model="mate.warehouseId"
-										dataValue='warehouse_id' format='{warehouse_name}' dataKey="warehouse_name" filterable
-										:clear='false'></zxz-uni-data-select>
-								</view>
+					<view class="content pd4">
+						<zxz-uni-data-select :localdata="mate.warehouseLists" v-model="mate.warehouseId"
+							dataValue='warehouse_id' format='{warehouse_name}' dataKey="warehouse_name" filterable
+							:clear='false'></zxz-uni-data-select>
+					</view>
 				</view>
+				
+				<view class="item" v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1">
+					<view class="lable rx-cc">领料仓库</view>
+					<view class="content pd4 rx-sc">
+				    {{ mate.warehouseName}}
+					</view>
+				</view>
+				
+				
+				
 
 			</view>
 		</view>
@@ -185,4 +203,13 @@
 			}
 		}
 	}
+
+	.tag_box {
+		padding: 2rpx 10rpx;
+		margin-right: 12rpx;
+		background: #E6A23C;
+		font-size: 22rpx;
+		color: #fff;
+		border-radius: 4rpx;
+	}
 </style>

+ 60 - 27
pages/pda/picking/details.vue

@@ -15,7 +15,7 @@
 						</view>
 
 						<view class="right_box rx-ec">
-							<u-button type="success" size="small" class="u-reset-button"
+							<u-button type="success" size="small" class="u-reset-button" v-if="isOutsource == 0"
 								@click="addPicking(item.workOrderId, item)" text="添加物料"></u-button>
 
 						</view>
@@ -79,17 +79,19 @@
 							:modelList2='item.modelList2' :code='item.code' @hendDel='hendDel'>
 						</modelBom>
 
-						<boatBom :palletList='item.palletList' :palletList2='item.palletList2' :code='item.code' :resObj='item'
-							@hendDel='hendDel'>
+						<boatBom :palletList='item.palletList' :palletList2='item.palletList2' :code='item.code'
+							:resObj='item' @hendDel='hendDel'>
 						</boatBom>
 
 						<packingBom :list='item.packingList2'></packingBom>
-						
-						
-						
-						<semiProductBom :list="[...item.semiProductList2, ...item.productList2, ...item.junkProductList2]"></semiProductBom>
-					    
-						
+
+
+
+						<semiProductBom
+							:list="[...item.semiProductList2, ...item.productList2, ...item.junkProductList2]">
+						</semiProductBom>
+
+
 						<view style="height: 80rpx;"></view>
 
 						<view class='flex_btn' v-if='isPick' @click="openDetails">已有领料单</view>
@@ -119,7 +121,8 @@
 	import packingBom from './components/packingBom'
 	import semiProductBom from './components/semiProductBom'
 	import {
-		workorderList
+		workorderList,
+		listOutsourceInWarehouse
 	} from '@/api/pda/workOrder.js'
 
 	import {
@@ -144,6 +147,7 @@
 
 				taskId: null,
 				isPick: false,
+				isOutsource: 0,
 
 
 
@@ -151,7 +155,9 @@
 		},
 		onLoad(options) {
 			let queryArray = decodeURIComponent(options.arr);
+
 			this.idsList = JSON.parse(queryArray);
+			this.isOutsource = Number(options.isOutsource)  || 0
 
 			this.taskId = options.taskId
 
@@ -164,6 +170,8 @@
 			}
 
 
+
+
 		},
 		onShow() {
 			uni.$off("setSelectList");
@@ -179,11 +187,11 @@
 						let productList2 = [] // 产品
 						let junkProductList2 = [] //废品
 
-                    
+
 
 
 						selectList.forEach(f => {
-							if (![5,8,13,23,9 ,28].includes(f.rootCategoryLevelId)) {
+							if (![5, 8, 13, 23, 9, 28].includes(f.rootCategoryLevelId)) {
 								f.automatic = 1
 								instanceList2 = instanceList2.concat(f)
 							} else if (f.rootCategoryLevelId == 5) { // 模具
@@ -195,17 +203,17 @@
 							} else if (f.rootCategoryLevelId == 13) {
 								f.automatic = 1
 								packingList2 = packingList2.concat(f)
-							} else if(f.rootCategoryLevelId == 23) {
+							} else if (f.rootCategoryLevelId == 23) {
 								f.automatic = 1
 								semiProductList2 = semiProductList2.concat(f)
-							}  else if(f.rootCategoryLevelId == 9) {
+							} else if (f.rootCategoryLevelId == 9) {
 								f.automatic = 1
 								productList2 = productList2.concat(f)
-							}  else if(f.rootCategoryLevelId == 28) {
+							} else if (f.rootCategoryLevelId == 28) {
 								f.automatic = 1
 								junkProductList2 = junkProductList2.concat(f)
 							}
-							
+
 						})
 
 						this.$set(m, 'instanceList2', instanceList2)
@@ -215,8 +223,8 @@
 						this.$set(m, 'semiProductList2', semiProductList2)
 						this.$set(m, 'productList2', productList2)
 						this.$set(m, 'junkProductList2', junkProductList2)
-						
-						
+
+
 					}
 				})
 
@@ -240,8 +248,10 @@
 						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.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2, ...
+						m.semiProductList2, ...m.productList2, ...m.junkProductList2
+					]
+					m.isOutsource = this.isOutsource
 					return {
 						...m
 					}
@@ -263,7 +273,7 @@
 					taskId: this.taskId
 				}).then(res => {
 
-                console.log('领料列表', res)
+					console.log('领料列表', res)
 
 					this.List = res.map(m => {
 						m.workOrderId = m.id
@@ -311,7 +321,9 @@
 					})
 
 
-
+					if (this.isOutsource == 1) {
+						this.outsourceInWarehouseFn()
+					}
 
 				})
 			},
@@ -358,7 +370,9 @@
 
 			addPicking(id, item) {
 				const storageKey = Date.now() + "";
-				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2, ...item.semiProductList2, ...item.productList2, ...item.junkProductList2]
+				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}`
@@ -375,6 +389,25 @@
 				})
 			},
 
+			outsourceInWarehouseFn() {
+				let param = {
+					workOrderId: this.idsList,
+					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()
+				})
+			},
+
 			openDetails() {
 				let url = `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
 				uni.navigateTo({
@@ -383,10 +416,10 @@
 			},
 
 		},
-		
-			beforeDestroy() {
-					uni.hideLoading();
-			},
+
+		beforeDestroy() {
+			uni.hideLoading();
+		},
 
 	}
 </script>

+ 0 - 1
pages/pda/sample/components/diagramLast.vue

@@ -8,7 +8,6 @@
 				<view class="item">
 					<view class="lable rx-cc">工序名称</view>
 					<view class="content">
-
 						{{item.taskNameLast}}
 					</view>
 				</view>

+ 343 - 78
pages/pda/sample/components/inspectionBom.vue

@@ -1,157 +1,297 @@
 <template>
 	<view>
 		<view class="title_box rx-bc">
-			<view class="name">质检</view>
+			<view class="name">取样列表 ({{semiProductList.length || 0}})个 </view>
 		</view>
 
 
 
 
-		<view class="content_table2" v-if='inspectionList.length > 0'>
+		<view class="content_table2" v-if='semiProductList.length > 0'>
 			<view class="head row rx-sc">
-				<view class="item ww30">类型</view>
-				<view class="item ww20">废品数量</view>
-				<view class="item ww40">处置</view>
-				<view class="item ww10">操作</view>
+				<view class="item ww10">序号</view>
+				<view class="item ww30">产品编码</view>
+
+				<view class="item ww15">数量</view>
+				<view class="item ww30">是否合格</view>
+				<view class="item ww15">操作</view>
+
 			</view>
 
 			<view class="table">
 
-				<view class="tr row rx-sc" v-for="(it, idx) in inspectionList" :key='idx'>
+				<view class="tr row rx-sc" v-for="(it, idx) in semiProductList" :key='idx'>
+					<view class="item ww10">{{ idx + 1}}</view>
 					<view class="item ww30">
-						{{ it.name }}
+						{{it.code}}
+					</view>
+					<view class="item ww15 content_num">
+						1
 					</view>
-					<view class="item ww20 content_num">
 
-						<input v-if='it.id != -1' class="uni-input" v-model="it.quantity" type="number"
-							@input="onKeyInput"></input>
-						<view v-else>{{ it.quantity || 0}}</view>
+					<view class="item ww30 rx-ac" style="color: #157A2C;">
+						
+						
+						<text  v-if='Object.prototype.hasOwnProperty.call(it.extInfo, "notType") && it.extInfo.notType != 5 '>
+							{{ it.extInfo.isQualified == 1 ? '合格':   it.extInfo.isQualified == 2 ? '不合格' : ''}}
+						</text>
+						<text
+							v-if='Object.prototype.hasOwnProperty.call(it.extInfo, "notType") && it.extInfo.notType == 5 '>让步接收</text>
 					</view>
-					<view class="item ww40 content_num" v-if='it.id != -1'>
-						<zxz-uni-data-select :localdata="warehouseList" v-model="it.warehouseId" dataValue='id'
-							dataKey="name" filterable format='{name}'></zxz-uni-data-select>
+
+					<view class="item ww15 " style="color: #157A2C;" @click="handleQuality(it, idx)">
+						质检
 					</view>
+				</view>
+
+			</view>
 
+		</view>
 
 
-					<view class="ww10 rx-ac">
-						<uni-icons custom-prefix="iconfont" v-if='it.id != -1' type="icon-shanchu" size="20"
-							color="#fa3534" @click="handleDel(idx)"></uni-icons>
+		<SearchPopup mode="center" v-if='popupShow'>
+			<template v-slot:list>
+				<view class="search_list">
+					<view class="serrch_code">产品编码:<text style="color: #157A2C;">{{qualityObj.code}}</text></view>
 
-					</view>
+					<view class="content_table2">
+						<view class="head row rx-sc">
+							<view class="item ww20"> 质检名称</view>
+							<view class="item ww20"> 工艺参数</view>
+							<view class="item ww30" style="font-size: 20rpx;">质检结果参数</view>
+							<view class="item ww30">质检结果</view>
 
+						</view>
 
-				</view>
 
+						<view class="table">
+							<view class="tr row rx-sc" v-for="(quaItem, quaItemIdx) in qualityObj.extInfo.qualityParam"
+								:key="quaItemIdx">
 
-			</view>
+								<view class="item ww20 ">
+									<view>{{quaItem.inspectionName }}</view>
+								</view>
 
+								<view class="item ww20 ">
+									<view style="display: flex">
+										<view v-if="quaItem.textType == 3" style="display: flex; align-items: center">
+											{{ quaItem.minValue }} {{ quaItem.unit }}
+											&nbsp;&nbsp;-&nbsp;&nbsp;
+											{{ quaItem.maxValue }} {{ quaItem.unit }}
+										</view>
 
+										<view v-else>
+											{{ quaItem.defaultValue }} {{ quaItem.unit }}
+										</view>
+									</view>
+								</view>
 
+								<view class="item ww30 content_num">
+									<view v-if="isDetails">{{ quaItem.qualityResultValue }}</view>
+									<input v-else class="uni-input" v-model="quaItem.qualityResultValue"></input>
 
+								</view>
 
+								<view class="item ww30 content_num">
+									<view v-if='isDetails'>
+										{{ quaItem.qualityResult ?  qualityList[quaItem.qualityResult - 1].name : ''  }}
+									</view>
 
+									<zxz-uni-data-select v-else :localdata="qualityList" v-model="quaItem.qualityResult"
+										dataValue='value' format='{name}' dataKey="value" filterable
+										:clear='false'></zxz-uni-data-select>
+								</view>
 
 
 
 
-		</view>
+							</view>
+
+						</view>
+
+					</view>
+
+
+					<view class="material">
+						<view class="content_table">
+							<view class="item rx-sc">
+								<view class="rx ww50">
+									<view class="lable lable150 rx-cc ">质检结果 </view>
+									<view class="content content_num ">
+										<zxz-uni-data-select :localdata="isQualifiedList"
+											v-model="qualityObj.extInfo.isQualified" dataValue='code' format='{name}'
+											dataKey="code" filterable :disabled="isDetails" @change="handLoad()"
+											:clear='false'></zxz-uni-data-select>
+
+									</view>
+								</view>
+
+								<view class="rx ww50"
+									v-if="qualityObj.extInfo.isQualified && qualityObj.extInfo.isQualified == 2">
+									<view class="lable lable150 rx-cc ">类型</view>
+									<view class="content  content_num">
+										<zxz-uni-data-select :localdata="notTypeList"
+											v-model="qualityObj.extInfo.notType" dataValue='code' format='{name}'
+											dataKey="code" @change="handLoad()" filterable :disabled="isDetails"
+											:clear='false'></zxz-uni-data-select>
+									</view>
+								</view>
+							</view>
+
+
+							<view class="item rx-sc"
+								v-if="qualityObj.extInfo.isQualified && qualityObj.extInfo.isQualified != 1  && qualityObj.extInfo.notType != 5">
+								<view class="rx ">
+									<view class="lable lable150 rx-cc ">原因</view>
+									<view class="content content_num">
+										<view v-if='isDetails'>{{qualityObj.extInfo.notReason }}</view>
+										<input class="uni-input" v-else v-model="qualityObj.extInfo.notReason"></input>
+									</view>
+								</view>
+							</view>
+
+
+						</view>
+					</view>
+
+				</view>
+			</template>
+
+			<template v-slot:operate>
+				<view class="operate_box rx-bc">
+					<u-button size="small" class="u-reset-button" @click="handleClose">
+						取消
+					</u-button>
+
+
+					<u-button type="success" size="small" class="u-reset-button" @click="handleOk">
+						确定
+					</u-button>
+
+				</view>
+			</template>
+
+		</SearchPopup>
+
 
 
-		<!-- <ba-tree-picker ref="treePicker" :selectedData='selectedData' key="verify" :multiple="false"
-			@select-change="confirm" title="选择分类" :localdata="classificationList" valueKey="id" textKey="name"
-			childrenKey="children" multiple :selectParent='false' /> -->
 
 	</view>
 </template>
 
 <script>
-	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
-
 	import {
-
 		getWarehouseList,
 	} from '@/api/pda/workOrder.js'
+
+	import SearchPopup from '../../components/searchPopup.vue'
 	export default {
 
 		components: {
-			baTreePicker,
+			SearchPopup
 		},
 		props: {
-			inspectionList: {
+			semiProductList: {
 				type: Array,
 				default: () => []
 			},
 
-			normalQuality: {
-				type: Object,
-				default: () => {}
+			isDetails: {
+				type: Boolean,
+				default: false
 			}
+
+
 		},
 		data() {
 			return {
 
-				// classificationList: [],
-				// selectedData: [],
-
+				popupShow: false,
 
-				count: 0,
-				warehouseList: []
-			}
-		},
+				qualityIdx: null,
+				qualityObj: {},
 
-		created() {
-			this.getWarehouse()
-			setTimeout(() => {
-					this.onKeyInput()
-				}, 500)
-		},
 
-		methods: {
+				qualityList: [{
+						name: '合格',
+						value: 1
+					},
+					{
+						name: '不合格',
+						value: 2
+					},
+					{
+						name: '让步接受',
+						value: 3
+					},
 
+				],
 
 
+				isQualifiedList: [{
+						code: '1',
+						name: '合格'
+					},
+					{
+						code: '2',
+						name: '不合格'
+					}
+				],
+
+
+				notTypeList: [{
+						code: "1",
+						name: '返工'
+					},
+					{
+						code: "2",
+						name: '返修'
+					},
+					{
+						code: "3",
+						name: '报废'
+					},
+					{
+						code: '4',
+						name: '降级使用'
+					},
+					{
+						code: "5",
+						name: '让步接收'
+					}
+				]
 
-			// confirm(id, name, list) {
-			// 	this.List = list
-			// 	this.selectedData = []
-			// 	this.selectedData = this.List.map(m => {
-			// 		return m.id
-			// 	})
 
-			// },
+			}
+		},
 
-			handleDel(idx) {
-				this.inspectionList.splice(idx, 1)
-	
-			},
-			onKeyInput() {
-				this.count = 0
-				this.inspectionList.map(L => {
-				
-					if (Number(L.quantity) != NaN && Number(L.quantity || 0) >= 0  && L.id != -1) {
-						this.count = Number(this.count) + Number(L.quantity || 0)
-					
-						this.inspectionList[this.inspectionList.length - 1]['quantity'] = this.count
-						this.normalQuality['quantity'] = this.count
-					
-					
-					}
+		created() {
 
+		},
 
-				})
-			},
+		methods: {
 
 
-			getWarehouse() {
-			
-				getWarehouseList().then(res => {
-					this.warehouseList = res.filter(f => f.inventoryType == 11)
+			handleQuality(it, idx) {
+				this.qualityObj = it
+				this.qualityIdx = idx
+				this.popupShow = true
+				console.log(this.qualityObj)
+			},
 
-				})
+			handleClose() {
+				this.qualityIdx = null
+				this.popupShow = false
+			},
 
-			}
+			handleOk() {
+				this.semiProductList[this.qualityIdx].isQualified = this.qualityObj.extInfo.isQualified
+				this.handleClose()
+			},
 
+			handLoad() {
+				this.$forceUpdate()
+			},
 
 
 		}
@@ -209,6 +349,107 @@
 
 
 
+	.material {
+		margin-top: 16rpx;
+
+
+
+		.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;
+				}
+
+				.lable150 {
+					width: 156rpx !important;
+					font-size: 24rpx;
+				}
+
+				.lable190 {
+					width: 190rpx !important;
+					font-size: 24rpx;
+				}
+
+				.ww80 {
+					width: 80rpx;
+				}
+
+				.content {
+					width: 500rpx;
+					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_H {
+					min-height: 92rpx;
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww50 {
+				width: 50%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+	}
+
+
+
+
 	.content_table2 {
 		width: 100%;
 		margin-top: 18rpx;
@@ -239,6 +480,11 @@
 
 			}
 
+			.ww15 {
+				width: 15%;
+
+			}
+
 			.ww40 {
 				width: 40%;
 
@@ -302,4 +548,23 @@
 		}
 
 	}
+
+
+
+	.search_list {
+		min-height: 100rpx;
+		width: 96vw;
+		padding: 0 8rpx;
+
+		/deep/ .u-form-item__body {
+			padding: 6rpx 0rpx !important;
+		}
+
+		.serrch_code {
+			padding: 8rpx 4rpx;
+			color: #000;
+			font-size: 26rpx;
+		}
+
+	}
 </style>

+ 0 - 257
pages/pda/sample/components/qualityStat.vue

@@ -1,257 +0,0 @@
-<template>
-	<view>
-		<view class="title_box rx-bc">
-			<view class="name">质检统计</view>
-		</view>
-
-
-		<view class="material ">
-
-			<view class="content_table" v-for="(item, index) in normalQuality" :key="index">
-				<view class="item">
-					<view class="lable rx-cc">质检类型</view>
-					<view class="content">
-						{{ item.inspectionName }}
-					</view>
-				</view>
-
-
-
-				<view class="item rx-sc">
-					<view class="rx ww55 ">
-						<view class="lable  rx-cc">废品数量</view>
-						<view class="content rx-sc">
-							<view>{{item.quantity}}</view>
-							<view class="unit">{{item.unit}}</view>
-						</view>
-					</view>
-
-					<view class="rx ww45">
-						<view class="lable rx-cc ww80"></view>
-						<view class="content">
-						</view>
-					</view>
-
-				</view>
-
-
-			</view>
-
-
-			<view class="content_table" v-if='normalQuality.length > 0'>
-				<view class="item">
-					<view class="lable rx-cc">废品总数</view>
-					<view class="content color157">
-						{{ wasteCount }} {{ unit }}
-					</view>
-				</view>
-			</view>
-
-
-
-		</view>
-
-
-
-
-
-
-
-
-	</view>
-</template>
-
-<script>
-	export default {
-		props: {
-
-			normalQuality: {
-				type: Array,
-				default: () => []
-			}
-
-
-		},
-		data() {
-			return {
-              wasteCount: 0, //废品总数
-			  unit: null,
-			}
-		},
-		created() {
-			this.wasteCount = 0
-            if(this.normalQuality && this.normalQuality.length > 0) {
-				this.normalQuality.forEach(e => {
-					 this.unit = e.unit
-					this.wasteCount =  Number(this.wasteCount) + Number(e.quantity)
-				})
-			}
-		},
-		methods: {
-
-
-
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.title_box {
-		margin-top: 28rpx;
-
-		.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;
-
-			}
-
-		}
-
-	}
-
-
-	.material {
-		margin-top: 10rpx;
-
-
-
-		.content_table {
-			width: 100%;
-			border: 2rpx solid $border-color;
-
-			.item {
-				display: flex;
-				border-bottom: 2rpx solid $border-color;
-
-
-				.lable {
-					width: 156rpx;
-					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;
-				}
-
-				.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: 200rpx;
-						line-height: 60rpx;
-						background: $theme-color;
-						font-size: 24rpx;
-						text-align: center;
-						color: #fff;
-					}
-
-				}
-
-
-				.pd4 {
-					padding: 4rpx 8rpx;
-				}
-
-
-
-				&:last-child {
-					border-bottom: none;
-				}
-			}
-
-			.ww55 {
-				width: 55%;
-			}
-
-			.ww45 {
-				width: 45%;
-			}
-		}
-
-
-	}
-
-
-	.content_num {
-		display: flex;
-		align-items: center;
-		padding: 0 4rpx;
-		box-sizing: border-box;
-
-		/deep/ .uni-input-input {
-			border: 2rpx solid #F0F8F2;
-			min-width: 100rpx;
-			background: #F0F8F2;
-			color: $theme-color;
-			box-sizing: border-box;
-		}
-
-
-	}
-	
-	.color157{
-		color: #157a2c;
-	}
-</style>

+ 127 - 202
pages/pda/sample/inspection/index.vue

@@ -4,37 +4,33 @@
 			color="#000" @clickLeft="back">
 		</uni-nav-bar>
 
-
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
-				<view class="card_box" v-for="(item,index) in List" :key="index">
-					<workOrderBom :item='item' v-if='item' @handleScan='handleWordScan'></workOrderBom>
+				<view class="card_box" v-for="(item, index) in List" :key="index">
+					<workOrderBom :item="item" v-if="item" @handleScan="handleWordScan"></workOrderBom>
 
-					<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId'
-						:list='item.equipmentList' @scanIt='scanIt'></deviceBom>
+					<deviceBom v-if="item.equipmentList.length != 0" :workOrderId="item.workOrderId"
+						:list="item.equipmentList" @scanIt="scanIt"></deviceBom>
 
-					<turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item' pattern='job'>
+					<turnoverBom v-if="item.turnover.length != 0" :list="item.turnover" :wordItem="item" pattern="job">
 					</turnoverBom>
 
-
-
 					<view class="operate_box rx-sc">
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="handAdd(item.workOrderId)">手动添加</u-button>
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="scanIt(item.workOrderId)">扫一扫</u-button>
-					</view>
-
-
-
-					<diagramLast :item='item.lastObj' v-if='item && item.workOrderType != 2'></diagramLast>
 
-
-					<inspectionBom v-if='inspectionList.length' :inspectionList='inspectionList'
-						:normalQuality='item.normalQuality'></inspectionBom>
+						<u-button size="small" class="u-reset-button" type="success" @click="handQuality">质检</u-button>
+					</view>
 
 
+					<diagramLast v-if="item && Object.prototype.hasOwnProperty.call(item, 'lastObj') &&
+						item.workOrderType !=2" :item="item.lastObj"></diagramLast>
 
+					<inspectionBom
+						v-if='Object.prototype.hasOwnProperty.call(item, "semiProductList") && item.semiProductList'
+						:semiProductList='item.semiProductList'></inspectionBom>
 				</view>
 			</u-list>
 		</view>
@@ -42,32 +38,25 @@
 		<view class="bottom-wrapper">
 			<view class="btn_box" @click="save">确认</view>
 		</view>
-
-
-
-
 	</view>
-
-
 </template>
 
 <script>
 	import {
 		workorderList,
-		getLastTreeByPid,
 		scanLedger,
-		qualityReview
-	} from '@/api/pda/workOrder.js'
+		qualityQy
+	} from "@/api/pda/workOrder.js";
 	import {
 		batchSave
-	} from '@/api/pda/feeding.js'
+	} from "@/api/pda/feeding.js";
 
-	import workOrderBom from '../../feeding/components/workOrderBom.vue'
-	import inspectionBom from '../components/inspectionBom.vue'
-	import deviceBom from '../../feeding/components/deviceBom.vue'
-	import diagramLast from '../components/diagramLast.vue'
+	import workOrderBom from "../../feeding/components/workOrderBom.vue";
+	import inspectionBom from "../components/inspectionBom.vue";
+	import deviceBom from "../../feeding/components/deviceBom.vue";
+	import diagramLast from "../components/diagramLast.vue";
 
-	import turnoverBom from '../../sample/components/turnoverBom.vue'
+	import turnoverBom from "../../sample/components/turnoverBom.vue";
 
 	export default {
 		components: {
@@ -75,7 +64,7 @@
 			inspectionBom,
 			deviceBom,
 			diagramLast,
-			turnoverBom
+			turnoverBom,
 		},
 		data() {
 			return {
@@ -83,27 +72,17 @@
 				id: null,
 				taskId: null,
 
-				inspectionId: null,
-				inspectionName: null,
 				List: [],
-				inspectionList: [],
-
-				isLastJob: true
 
-
-			}
+			};
 		},
 
 		onLoad(options) {
-			this.title = options.taskName ? options.taskName + '-' + options.inspectionName : '质检'
-			this.inspectionId = options.inspectionId
-			this.inspectionName = options.inspectionName
-			this.id = options.workOrderId
-			this.taskId = options.taskId
-			this.getList()
-
+			this.title = options.taskName || '质检'
+			this.id = options.workOrderId;
+			this.taskId = options.taskId;
+			this.getList();
 
-			this.getLastTree()
 
 		},
 
@@ -111,30 +90,26 @@
 			uni.$off("setSelectList");
 
 			uni.$on("setSelectList", (selectList, id) => {
-
-				this.List.forEach(m => {
+				this.List.forEach((m) => {
 					if (m.workOrderId == id) {
-						let equipmentList = [] // 生产设备
-						let turnover = []
+						let equipmentList = []; // 生产设备
+						let turnover = [];
 
-						selectList.forEach(f => {
+						selectList.forEach((f) => {
 							if (f.rootCategoryLevelId == 4) {
-								equipmentList = equipmentList.concat(f)
+								equipmentList = equipmentList.concat(f);
 							}
 
 							if (f.rootCategoryLevelId == 7) {
-								turnover = turnover.concat(f)
+								turnover = turnover.concat(f);
 							}
-						})
-
-						this.$set(m, 'equipmentList', equipmentList)
-						this.$set(m, 'turnover', turnover)
+						});
 
+						this.$set(m, "equipmentList", equipmentList);
+						this.$set(m, "turnover", turnover);
 					}
-
-				})
-
-			})
+				});
+			});
 		},
 
 		methods: {
@@ -142,202 +117,157 @@
 				workorderList({
 					ids: [this.id],
 					taskId: this.taskId,
+				}).then((res) => {
+					this.List = res.map((m) => {
+						m.workOrderId = m.id;
 
-				}).then(res => {
-
-
-					this.List = res.map(m => {
-						m.workOrderId = m.id
-
-						m.equipmentList = [] // 设备
-						m.turnover = [] // 周转车
-
-
-						if (m.normalQuality == null) {
-							this.isLastJob = false
-						}
-
-
-						if (!Object.prototype.hasOwnProperty.call(m, 'normalQuality')) {
-							this.$set(m, 'normalQuality', {})
-						}
-						m.normalQuality.quantity = 0
-						m.normalQuality.inspectionId = this.inspectionId
-						m.normalQuality.inspectionName = this.inspectionName
-
+						m.equipmentList = []; // 设备
+						m.turnover = []; // 周转车
 
 
 						m.lastObj = {
 							formedNum: m.formedNumLast,
 							taskNameLast: m.taskNameLast,
-							unit: m.unit
-						}
-						m.feedType = 3
-
+							unit: m.unit,
+						};
+						m.feedType = 3;
 
-				
-
-						delete m.id
+						delete m.id;
 
 						if (this.taskId) {
-							m.taskId = this.taskId
+							m.taskId = this.taskId;
 						}
+
 						return {
-							...m
-						}
-					})
-				})
+							...m,
+						};
+					});
+				});
 			},
 
 
 
-			getLastTree() {
-
-
-				getLastTreeByPid(this.inspectionId).then(res => {
-
-					this.inspectionList = res
-
-					this.inspectionList.push({
-						id: -1,
-						name: '废品总数量'
-					})
-
-					this.getGualityReview()
-				})
-			},
-
-			getGualityReview() {
-				let param = {
-					inspectionId: this.inspectionId,
-					workOrderId: this.id,
-					taskId: this.taskId,
-				}
-				qualityReview(param).then(res => {
-					if (res && res.extInfo && res.extInfo.inspectionList) {
-						this.inspectionList = res.extInfo.inspectionList
-					}
-				})
-
-			},
-
-
 
 			scrolltolower() {},
 			handleWordScan() {
 				uni.showToast({
-					icon: 'none',
-					title: '不支持换工单'
-				})
+					icon: "none",
+					title: "不支持换工单",
+				});
 			},
 
 			scanIt(id) {
-
-
 				uni.scanCode({
 					success: (res) => {
-						this.scanItData(res.result, id)
-					}
-				})
+						this.scanItData(res.result, id);
+					},
+				});
 			},
 
 			scanItData(result, id) {
-				scanLedger(result).then(res => {
-
-					let _arr = []
-					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
-						_arr = this.List
+				scanLedger(result).then((res) => {
+					let _arr = [];
+					if (res.length == 1 && res[0].rootCategoryLevelId == 4) {
+						// 设备
+						_arr = this.List;
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
-								_arr[index].equipmentList = res
+								_arr[index].equipmentList = res;
 							}
-						})
-						this.List = _arr
-						this.$forceUpdate()
-
+						});
+						this.List = _arr;
+						this.$forceUpdate();
 					}
 
-
-					if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
-						_arr = this.List
+					if (res.length == 1 && res[0].rootCategoryLevelId == 7) {
+						// 周转车
+						_arr = this.List;
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
-								_arr[index].turnover = res
+								_arr[index].turnover = res;
 							}
-						})
-						this.List = _arr
-						this.$forceUpdate()
-
+						});
+						this.List = _arr;
+						this.$forceUpdate();
 					}
+				});
+			},
+			handQuality() {
+				console.log(this.List[0]);
+				if (this.List[0].turnover.length == 0) {
+					uni.showToast({
+						icon: "none",
+						title: "请先添加周转车取样",
+					});
+					return false;
+				}
 
+				let _count = 0;
+				this.List[0].turnover &&
+					this.List[0].turnover.forEach((f) => {
+						if (
+							f.extInfo &&
+							f.extInfo.positionList &&
+							f.extInfo.positionList.length > 0
+						) {
 
-				})
+							f.extInfo.positionList.forEach((o) => {
 
-			},
+								if (Object.prototype.hasOwnProperty.call(o, "sampleNum") && o.sampleNum >= 1) {
+									_count = _count + Number(o.sampleNum);
 
-			save() {
+								}
+							});
+						}
+					});
 
-				if (!this.isLastJob) {
+				if (_count < 1) {
 					uni.showToast({
-						icon: 'none',
-						title: '上道工序暂未报工'
-					})
-					return false
+						icon: "none",
+						title: "请先取样",
+					});
+					return false;
+				}
 
+				let param = {
+					taskId: this.taskId,
+					workOrderId: this.id,
+					quantity: _count
 				}
 
+				qualityQy(param).then(res => {
+					this.$set(this.List[0], 'semiProductList', res)
+					this.$forceUpdate()
+				})
+
 
-				if (this.List[0].normalQuality.quantity < 0) {
 
-					uni.showToast({
-						icon: 'none',
-						title: '废品数量小于0'
-					})
-					return false
-				}
 
-				if (this.List[0].normalQuality.formedNum - this.List[0].normalQuality.quantity < 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '废品数量不能大于合格数量'
-					})
-					return false
-				}
 
+			},
 
-				this.List[0].normalQuality.inspectionList = this.inspectionList
+			save() {
 
-				// let _arr = JSON.parse(JSON.stringify(this.List))
-				// _arr.forEach(e => {
-				// 	e.turnover.forEach((o) => {
-				// 		o.extInfo.positionList.forEach(f => {
-				// 			f.quantity = f.quantity - Number(f.sampleNum)
-				// 			f.sampleNum = 0
 
-				// 		})
-				// 	})
 
-				// })
 
-				batchSave(this.List).then(res => {
-					uni.navigateBack()
-				})
-			},
 
+				batchSave(this.List).then((res) => {
+					uni.navigateBack();
+				});
+			},
 
 			handAdd(id) {
-				console.log(id)
+				console.log(id);
 
 				const storageKey = Date.now() + "";
 				uni.setStorageSync(storageKey, this.List || []);
 				uni.navigateTo({
-					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=zdy&taskId=${this.taskId}&classIds=[4,7]`
-				})
+					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=zdy&taskId=${this.taskId}&classIds=[4,7]`,
+				});
 			},
-
-
-		}
-	}
+		},
+	};
 </script>
 <style lang="scss" scoped>
 	.content-box {
@@ -345,7 +275,6 @@
 		overflow: hidden;
 		display: flex;
 		flex-direction: column;
-
 	}
 
 	.list_box {
@@ -360,9 +289,6 @@
 		.card_box {
 			padding: 16rpx 24rpx;
 		}
-
-
-
 	}
 
 	.bottom-wrapper {
@@ -379,9 +305,8 @@
 		}
 	}
 
-
 	.operate_box {
-		padding: 10rpx 160rpx;
+		padding: 10rpx 20rpx;
 
 		/deep/ .u-button {
 			width: 160rpx;

+ 15 - 8
pages/pda/sample/inspection/job.vue

@@ -15,7 +15,8 @@
 					
 					<deviceBom v-if='objData && objData.equipmentList.length != 0' :list='objData.equipmentList' ></deviceBom>
 
-					<qualityStat :normalQuality='objData.normalQuality' v-if='objData'></qualityStat>
+					
+					<inspectionBom v-if='objData && Object.prototype.hasOwnProperty.call(objData, "semiProductList") && objData.semiProductList.length' :semiProductList='objData.semiProductList'></inspectionBom>
 
 					<u-form labelPosition="left" labelWidth="160" labelAlign="center" style="margin-top: 40rpx;">
 
@@ -54,15 +55,16 @@
 	} from '@/api/pda/workOrder.js'
 
 	import workOrderBom from '../../feeding/components/workOrderBom.vue'
-	import qualityStat from '../components/qualityStat.vue'
+
 	import diagramLast from '../components/diagramLast.vue'
 	import deviceBom from '../../feeding/components/deviceBom.vue'
+	import inspectionBom from "../components/inspectionBom.vue";
 	export default {
 		components: {
 			workOrderBom,
-			qualityStat,
 			diagramLast,
-			deviceBom
+			deviceBom,
+			inspectionBom
 		},
 		data() {
 			return {
@@ -118,10 +120,15 @@
 
 					this.formedNumLast = res.formedNumLast
 					this.formedNum = 0
-					res.normalQuality.forEach(f => {
-						this.formedNumLast = this.formedNumLast - Number(f.quantity)
-						this.formedNum  = this.formedNumLast
+					let _num  = 0
+					res.semiProductList.forEach(f => {
+						if( (f.extInfo.isQualified == 2 && Object.prototype.hasOwnProperty.call(f.extInfo, "notType") && f.extInfo.notType != 5) ) {
+							_num = _num + 1
+						}
+					
 					})
+					this.formedNumLast = this.formedNumLast - Number(_num)
+					this.formedNum  = this.formedNumLast
 
 
 					this.lastObj = {
@@ -131,7 +138,7 @@
 					}
 
 					this.objData = res
-					console.log(66,this.objData )
+				
 
 
 				})

+ 44 - 26
pages/pda/workOrder/extrusionMolding/index.vue

@@ -11,6 +11,7 @@
 				<view class="tab_item" :class="{active: tabType == 1}" @click="handTab(1)">基本信息</view>
 				<view class="tab_item" :class="{active: tabType == 2}" @click="handTab(2)">生产明细</view>
 				<view class="tab_item" :class="{active: tabType == 3}" @click="handTab(3)">详情</view>
+
 			</view>
 		</view>
 
@@ -37,13 +38,13 @@
 					<text class="lable">产品编码</text>
 					<text> {{ info.productCode }}</text>
 				</view>
-				
-				
+
+
 				<view class="item_list rx-bc">
 					<text class="lable">批次号</text>
 					<text> {{ info.batchNo }}</text>
 				</view>
-				
+
 
 
 				<view class="item_list rx-bc">
@@ -75,13 +76,13 @@
 					<text class="lable">要求生产重量</text>
 					<text>{{ info.formingWeight }} {{info.weightUnit}}</text>
 				</view>
-				
+
 				<view class="item_list rx-bc">
 					<text class="lable">报工类型</text>
 					<text>{{info.singleReport == 1 ? '单个报工' : '批量报工'}}</text>
 				</view>
-				
-				
+
+
 
 				<view class="item_list rx-bc">
 					<text class="lable">已完成生产数量</text>
@@ -156,19 +157,23 @@
 				<view style="margin-top: 15px;">
 					<button class="search_btn" @click="handleDetails">报工详情</button>
 				</view>
-				
+
 				<view style="margin-top: 15px;">
 					<button class="search_btn" @click="handleFeedDetails">投料详情</button>
 				</view>
 			</u-list>
 
+
+
+
 		</view>
 
 		<view class="bottom-wrapper">
 
 			<bottomOperate @operate='operate' @refresh='refresh'
-				:taskObj="{'currentTaskName': currentTaskName || info.taskName, 'currentTaskId': currentTaskId || info.taskId, 'workOrderId' : id }"
-				:state='currentType' :gdStatus='info.status' :controlReportMethod='controlReportMethod' :stepsList="stepsList"></bottomOperate>
+				:taskObj="{'currentTaskName': currentTaskName || info.taskName, 'currentTaskId': currentTaskId || info.taskId, 'workOrderId' : id , 'existOutsource': existOutsource }"
+				:state='currentType' :gdStatus='info.status' :controlReportMethod='controlReportMethod'
+				:stepsList="stepsList"></bottomOperate>
 		</view>
 
 	</view>
@@ -209,6 +214,7 @@
 				currentTaskId: null,
 				currentTaskName: null,
 				currentType: 1,
+				existOutsource: 0,
 				controlReportMethod: null,
 
 				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
@@ -265,10 +271,10 @@
 
 				})
 			},
-			
+
 			refresh() {
 				console.log(1)
-				 this.getInfo()
+				this.getInfo()
 			},
 
 			getInfo() {
@@ -289,7 +295,8 @@
 					let id = this.currentTaskId || this.taskId
 					if (f.taskId == id) {
 						this.currentType = f.type,
-							this.controlReportMethod = f.controlReportMethod
+							this.existOutsource = f.existOutsource
+						this.controlReportMethod = f.controlReportMethod
 					}
 
 				})
@@ -304,8 +311,10 @@
 			},
 
 			selectStep(item) {
+
 				this.currentTaskId = item.taskId
 				this.currentTaskName = item.taskTypeName
+				this.existOutsource = item.existOutsource
 
 				this.currentType = item.type
 				this.controlReportMethod = item.controlReportMethod
@@ -315,15 +324,16 @@
 			},
 
 			operate(type, item) {
+				console.log(4444, type)
 
-				if (this.info.outsourceStatus == 2) {
-					uni.showToast({
-						title: "工单在委外中",
-						icon: "none",
-					})
+				// if (this.info.outsourceStatus == 2) {
+				// 	uni.showToast({
+				// 		title: "工单在委外中",
+				// 		icon: "none",
+				// 	})
 
-					return false
-				}
+				// 	return false
+				// }
 
 				if (this.info.status == 9) {
 					uni.showToast({
@@ -333,16 +343,16 @@
 
 					return false
 				}
-				
+
 				if (this.info.status == 10) {
 					uni.showToast({
 						title: "工单已终止",
 						icon: "none",
 					})
-				
+
 					return false
 				}
-				
+
 
 
 
@@ -414,7 +424,7 @@
 				} else if (type == 'inspection') {
 					url = '/pages/pda/sample/inspection/index'
 					url +=
-						`?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}&inspectionId=${item.id}&inspectionName=${item.name}`
+						`?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}`
 					uni.navigateTo({
 						url
 					})
@@ -451,6 +461,14 @@
 							}
 						}
 					})
+				} else if (type == 'outPicking') {
+						url = '/pages/pda/picking/details'
+						let _arr = JSON.stringify([this.info.id])
+						url += `?arr=${encodeURIComponent(_arr)}&taskId=${taskId}&isOutsource=1`
+						uni.navigateTo({
+							url
+						})
+			
 				}
 
 
@@ -476,7 +494,7 @@
 				})
 
 			},
-			
+
 			handleFeedDetails() {
 				let taskId = this.currentTaskId || this.taskId
 				let url = '/pages/pda/feeding/bill/index'
@@ -484,8 +502,8 @@
 				uni.navigateTo({
 					url
 				})
-				
-		
+
+
 			},
 		}
 	}

+ 7 - 7
pages/pda/workOrder/index/details.vue

@@ -25,7 +25,7 @@
 					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
 					</modelBom>
 
-					<qualityStat :normalQuality='objData.normalQuality' v-if='objData  && taskType == 3'></qualityStat>
+				    <inspectionBom :semiProductList='objData.semiProductList'  :isDetails='true' v-if='Object.prototype.hasOwnProperty.call(objData, "semiProductList") && objData.semiProductList.length  && taskType == 3'></inspectionBom> 
 
 					<sampleBom :item='objData.quality' v-if='objData.quality && taskType == 2'
 						:workReportInfo='objData.workReportInfo' :isDetails='true'></sampleBom>
@@ -37,20 +37,20 @@
 					<revolvingDiskBom v-if="objData.revolvingDiskList.length > 0"  pattern='job'
 						:revolvingDiskList="objData.revolvingDiskList"></revolvingDiskBom>
 
-					<oneJobBom v-if='objData.instanceList &&  objData.instanceList.length != 0 & taskType != 6'
+					<oneJobBom v-if='objData.instanceList &&  objData.instanceList.length != 0  &&  taskType != 6'
 						:list='objData.instanceList' :item='objData' :isDetails='true'> </oneJobBom>
 
 					<semiProductJobBom
-						v-if='objData.semiProductList &&  objData.semiProductList.length != 0 & taskType != 6  && objData.singleReport == 1' 
+						v-if='objData.semiProductList &&  objData.semiProductList.length != 0  &&  taskType != 6  && objData.singleReport == 1' 
 						:list='objData.semiProductList' :item='objData' :isDetails='true'> </semiProductJobBom>
 						
 					<semiProductJobBomPL
-							v-if='objData.semiProductList &&  objData.semiProductList.length != 0 & taskType != 6  && objData.singleReport == 0'
+							v-if='objData.semiProductList &&  objData.semiProductList.length != 0  &&  taskType != 6  &&  taskType != 3  && objData.singleReport == 0'
 							:list='objData.semiProductList' :item='objData' :isDetails='true'> </semiProductJobBomPL>
 
 
 
-					<oneJobQualityBom v-if='objData.semiProductList &&  objData.semiProductList.length != 0 & taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 1'
+					<oneJobQualityBom v-if='objData.semiProductList &&  objData.semiProductList.length != 0  &&  taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 1'
 						:list='objData.semiProductList' :item='objData' :isDetails='true'></oneJobQualityBom>
 						
 
@@ -135,7 +135,7 @@
 	import aridRegion from '../../feeding/components/aridRegion.vue'
 	import paramBom from '../../feeding/components/paramBom.vue'
 
-	import qualityStat from '../../sample/components/qualityStat.vue'
+	import inspectionBom from '../../sample/components/inspectionBom.vue'
 	import sampleBom from '../../sample/components/sampleBom.vue'
 	import palletBom from '../../feeding/components/palletBom.vue'
 	
@@ -167,7 +167,7 @@
 			aridRegion,
 			paramBom,
 
-			qualityStat,
+			inspectionBom,
 			sampleBom,
 			palletBom,
 			revolvingDiskBom,