ysy il y a 1 an
Parent
commit
05e1e34b34

+ 73 - 7
pages/pda/jobBooking/components/oneJobQualityBom.vue

@@ -101,7 +101,7 @@
 				</view>
 
 
-				<view class="item rx-sc">
+<!-- 				<view class="item rx-sc">
 					<view class="rx ww50 ">
 						<view class="lable lable150 rx-cc ">外观</view>
 						<view class="content content_num ">
@@ -127,6 +127,38 @@
 						</view>
 					</view>
 
+				</view> -->
+				
+				
+				<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="it.extInfo.isQualified"
+								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+					</view>
+				
+					<view class="rx ww50" v-if="it.extInfo.isQualified && it.extInfo.isQualified == 2">
+						<view class="lable lable150 rx-cc ">类型</view>
+						<view class="content  content_num">
+							<zxz-uni-data-select :localdata="notTypeList" v-model="it.extInfo.notType" dataValue='code'
+								format='{name}' dataKey="code" filterable :disabled="isDetails"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+					</view>
+				</view>
+				
+				<view class="item rx-sc" v-if="it.extInfo.isQualified != 1  && it.extInfo.notType != 5 ">
+					<view class="rx ">
+						<view class="lable lable150 rx-cc ">原因</view>
+						<view class="content content_num">
+							<view v-if='isDetails'>{{it.extInfo.notReason }}</view>
+							<input class="uni-input" v-else v-model="it.extInfo.notReason"></input>
+						</view>
+					</view>
+				
 				</view>
 
 
@@ -136,7 +168,7 @@
 
 
 
-			<view class="content_table2">
+			<view class="content_table2" v-if="![1,2,3,4].includes(Number(it.extInfo.notType)) ">
 				<view class="head row rx-sc">
 					<view class="item ww25" style="font-size: 20rpx;">{{it.extInfo.lastWeight ? '上道工序重量' : '物料重量'  }} {{it.extInfo.weightUnit}}
 					</view>
@@ -356,15 +388,49 @@
 				resultObj: {},
 				resultIdx: 0,
 
-				qualityList: [{
-						name: '合格',
-						value: 1
+				// qualityList: [{
+				// 		name: '合格',
+				// 		value: 1
+				// 	},
+				// 	{
+				// 		name: '不合格',
+				// 		value: 2
+				// 	}
+				// ],
+				
+				
+				isQualifiedList: [{
+						code: '1',
+						name: '合格'
+					},
+					{
+						code: '2',
+						name: '不合格'
+					}
+				],
+				
+				notTypeList: [{
+						code: "1",
+						name: '返工'
+					},
+					{
+						code: "2",
+						name: '返修'
+					},
+					{
+						code: "3",
+						name: '报废'
+					},
+					{
+						code: '4',
+						name: '降级使用'
 					},
 					{
-						name: '不合格',
-						value: 2
+						code: "5",
+						name: '让步接收'
 					}
 				]
+				
 
 
 

+ 69 - 9
pages/pda/jobBooking/components/oneJobQualityBomPL.vue

@@ -102,6 +102,8 @@
 
 
 
+
+
 			</view>
 
 
@@ -274,22 +276,29 @@
 
 
 				<view class="item rx-sc" v-if="it.extInfo.batchReportInfo.length == 0">
-					<view class="rx ">
-						<view class="lable lable150 rx-cc ">质检结果</view>
+					<view class="rx ww50">
+						<view class="lable lable150 rx-cc ">质检结果 </view>
 						<view class="content content_num ">
-							<view v-if='isDetails'>
-								{{ it.extInfo.appearance == 1 ? '合格' : it.extInfo.appearance == 2 ?  '不合格' : '' }}
-							</view>
-							<zxz-uni-data-select v-else :localdata="qualityList" v-model="it.extInfo.appearance"
-								dataValue='value' format='{name}' dataKey="value" filterable
-								:clear='false'></zxz-uni-data-select>
+							<zxz-uni-data-select :localdata="isQualifiedList" v-model="it.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="it.extInfo.isQualified && it.extInfo.isQualified == 2">
+						<view class="lable lable150 rx-cc ">类型</view>
+						<view class="content  content_num">
+							<zxz-uni-data-select :localdata="notTypeList" v-model="it.extInfo.notType" dataValue='code'
+								@change="handLoad()" format='{name}' dataKey="code" filterable :disabled="isDetails"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+					</view>
 				</view>
 
 
-				<view class="item rx-sc" v-if="it.extInfo.batchReportInfo.length == 0 ">
+				<view class="item rx-sc"
+					v-if="it.extInfo.batchReportInfo.length == 0 && ( it.extInfo.isQualified == 1 || it.extInfo.notType == 5  )">
 					<view class="rx ">
 						<view class="lable lable150 rx-cc ">处置</view>
 						<view class="content content_num ">
@@ -305,6 +314,18 @@
 					</view>
 				</view>
 
+				<view class="item rx-sc"
+					v-if="it.extInfo.batchReportInfo.length == 0 && it.extInfo.isQualified != 1  && it.extInfo.notType != 5">
+					<view class="rx ">
+						<view class="lable lable150 rx-cc ">原因</view>
+						<view class="content content_num">
+							<view v-if='isDetails'>{{it.extInfo.notReason }}</view>
+							<input class="uni-input" v-else v-model="it.extInfo.notReason"></input>
+						</view>
+					</view>
+				</view>
+
+
 
 
 
@@ -503,6 +524,40 @@
 						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: '让步接收'
+					}
 				]
 
 
@@ -564,6 +619,11 @@
 
 			},
 
+			handLoad() {
+				this.$forceUpdate()
+			},
+
+
 
 
 

+ 80 - 12
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -120,13 +120,46 @@
 
 				</view>
 
+				<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="it.extInfo.isQualified"
+								dataValue='code' format='{name}' dataKey="code" filterable :disabled="isDetails"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+					</view>
+
+					<view class="rx ww50" v-if="it.extInfo.isQualified && it.extInfo.isQualified == 2">
+						<view class="lable lable150 rx-cc ">类型</view>
+						<view class="content  content_num">
+							<zxz-uni-data-select :localdata="notTypeList" v-model="it.extInfo.notType" dataValue='code'
+								format='{name}' dataKey="code" filterable :disabled="isDetails"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+					</view>
+				</view>
+
+
+				<view class="item rx-sc" v-if="it.extInfo.isQualified != 1  && it.extInfo.notType != 5 ">
+					<view class="rx ">
+						<view class="lable lable150 rx-cc ">原因</view>
+						<view class="content content_num">
+							<view v-if='isDetails'>{{it.extInfo.notReason }}</view>
+							<input class="uni-input" v-else v-model="it.extInfo.notReason"></input>
+						</view>
+					</view>
+
+				</view>
+
+
 
 
 			</view>
 
 
 
-			<view class="content_table2">
+			<view class="content_table2" v-if="![1,2,3,4].includes(Number(it.extInfo.notType))">
 				<view class="head row rx-sc">
 					<view class="item ww25" style="font-size: 20rpx;">{{it.extInfo.newWeight ? '上道工序重量' : '物料重量'  }}
 						{{it.extInfo.weightUnit}}
@@ -140,16 +173,18 @@
 
 				<view class="table">
 					<view class="tr row rx-sc">
-						
-					<view class="item ww25" v-if="Object.prototype.hasOwnProperty.call(it.extInfo, 'newWeight') &&  it.extInfo.newWeight">
-					       {{ it.extInfo.newWeight }} 
-					</view>
-				
-					<view class="item ww25 content_num" v-if="!Object.prototype.hasOwnProperty.call(it.extInfo, 'newWeight') || it.extInfo.newWeight == 0  ">
-				  <input class="uni-input " v-model="it.extInfo.weight" type='digit'></input>
-					</view>
-						
-						
+
+						<view class="item ww25"
+							v-if="Object.prototype.hasOwnProperty.call(it.extInfo, 'newWeight') &&  it.extInfo.newWeight">
+							{{ it.extInfo.newWeight }}
+						</view>
+
+						<view class="item ww25 content_num"
+							v-if="!Object.prototype.hasOwnProperty.call(it.extInfo, 'newWeight') || it.extInfo.newWeight == 0  ">
+							<input class="uni-input " v-model="it.extInfo.weight" type='digit'></input>
+						</view>
+
+
 						<view class="item ww25 content_num">
 							<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
 							<input class="uni-input" v-else v-model="it.extInfo.reportWeight" type='digit'></input>
@@ -363,7 +398,40 @@
 				resultObj: {},
 				resultIdx: 0,
 
-				deviceList: []
+				deviceList: [],
+
+
+				isQualifiedList: [{
+						code: '1',
+						name: '合格'
+					},
+					{
+						code: '2',
+						name: '不合格'
+					}
+				],
+
+				notTypeList: [{
+						code: "1",
+						name: '返工'
+					},
+					{
+						code: "2",
+						name: '返修'
+					},
+					{
+						code: "3",
+						name: '报废'
+					},
+					{
+						code: '4',
+						name: '降级使用'
+					},
+					{
+						code: "5",
+						name: '让步接收'
+					}
+				]
 
 
 

+ 172 - 4
pages/pda/jobBooking/components/semiProductJobBomPL.vue

@@ -152,7 +152,7 @@
 
 
 						<view class="item ww40" v-if='isDetails'>
-							{{it.extInfo.taskName}}
+							{{ yy.taskName}}
 						</view>
 
 						<view class="item ww40" v-else>
@@ -175,6 +175,84 @@
 
 
 
+
+
+			<view class="content_table2">
+				<view class="head row rx-sc">
+					<view class="item ww15" style="font-size: 20rpx;">
+						不合格数
+					</view>
+					
+					<view class="item ww15" style="font-size: 20rpx;">
+						重量
+					</view>
+					
+					<view class="item ww25">类型</view>
+
+					<view class="item ww35 rx-bc">
+						<text>处置/原因</text>
+						<image v-if='!isDetails' class="icon" @click="handAddListPL4(it, idx)"
+							src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
+
+					</view>
+					<view class="item ww10 ">
+						操作
+					</view>
+				</view>
+
+				<view class="table">
+					<view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.notBatchReportInfo" :key="'not'+ idx + yyIdx">
+						<view class="item ww15 content_num">
+							<view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
+							<input class="uni-input" v-else v-model="yy.allFeedQuantity"
+								@input="blurNum2($event,idx, yyIdx)" type='number'></input>
+						</view>
+						
+						<view class="item ww15 content_num">
+							<view v-if='isDetails'>{{yy.allReportWeight }}</view>
+							<input class="uni-input" v-else v-model="yy.allReportWeight"
+								 type='number'></input>
+						</view>
+						
+						<view class="item ww25 content_num">
+							<zxz-uni-data-select :localdata="notTypeList" v-model="yy.notType" dataValue='code'
+								format='{name}' dataKey="code" filterable :disabled="isDetails" @change="handLoad()"
+								:clear='false'></zxz-uni-data-select>
+						</view>
+
+
+
+						<view class="item ww35" v-if='isDetails'>
+							{{ yy.notType == 5 ? yy.taskName : yy.notReason}}
+						</view>
+
+
+						<view class="item ww35 content_num" v-if="!isDetails && yy.notType == 5">
+
+							<zxz-uni-data-select :localdata="stepsList" v-model="yy.taskId" dataValue='taskId'
+								format='{taskTypeName}' dataKey="taskId" filterable
+								@change=" e => yy.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
+
+
+						</view>
+						<view class="item ww35 content_num" v-if="!isDetails && yy.notType != 5">
+							<input class="uni-input" v-if="yy.notType != 5 " v-model="yy.notReason"></input>
+						</view>
+
+						<view class="item ww10">
+							<uni-icons v-if='!isDetails' custom-prefix="iconfont" type="icon-shanchu" size="16"
+								@click="handDel4(idx, yyIdx)" color="#fa3534"></uni-icons>
+						</view>
+
+
+					</view>
+
+				</view>
+
+			</view>
+
+
+
 		</view>
 
 
@@ -239,7 +317,31 @@
 
 
 
-				deviceList: []
+				deviceList: [],
+
+				notTypeList: [{
+						code: "1",
+						name: '返工'
+					},
+					{
+						code: "2",
+						name: '返修'
+					},
+					{
+						code: "3",
+						name: '报废'
+					},
+					{
+						code: '4',
+						name: '降级使用'
+					},
+					{
+						code: "5",
+						name: '让步接收'
+					}
+				]
+
+
 
 
 
@@ -251,6 +353,7 @@
 
 			this.getSteps()
 
+			console.log(this.list)
 
 		},
 		methods: {
@@ -277,6 +380,7 @@
 					taskId: '',
 					taskName: ''
 				})
+				this.$forceUpdate()
 			},
 
 			handDel3(idx, yyIdx) {
@@ -293,14 +397,20 @@
 				this.list[idx].extInfo.batchReportInfo.forEach(m => {
 					count = count + Number(m.allFeedQuantity || 0)
 				})
+				
+					let count2 = 0
+				this.list[idx].extInfo.notBatchReportInfo.forEach(m => {
+					count2 = count2 + Number(m.allFeedQuantity || 0)
+				})
+				
 
-				if (count > this.list[idx].feedQuantity) {
+				if (Number(count + count2) > this.list[idx].feedQuantity) {
 
 					this.$set(this.list[idx].extInfo.batchReportInfo[yyIdx], 'allFeedQuantity', 0)
 					this.$forceUpdate()
 
 					uni.showToast({
-						title: `投料合格品数不能大于投料数量`,
+						title: `投料数不能大于投料数量`,
 						icon: 'none'
 					})
 
@@ -308,6 +418,39 @@
 				}
 
 			},
+			
+			
+			blurNum2(event, idx, yyIdx) {
+			
+				let value = event.target.value;
+				value = value.replace(/\./g, '');
+				this.$set(this.list[idx].extInfo.notBatchReportInfo[yyIdx], 'allFeedQuantity', value);
+			
+				let count = 0
+				this.list[idx].extInfo.batchReportInfo.forEach(m => {
+					count = count + Number(m.allFeedQuantity || 0)
+				})
+				
+					let count2 = 0
+				this.list[idx].extInfo.notBatchReportInfo.forEach(m => {
+					count2 = count2 + Number(m.allFeedQuantity || 0)
+				})
+				
+			
+				if (Number(count + count2) > this.list[idx].feedQuantity) {
+			
+					this.$set(this.list[idx].extInfo.notBatchReportInfo[yyIdx], 'allFeedQuantity', 0)
+					this.$forceUpdate()
+			
+					uni.showToast({
+						title: `投料数不能大于投料数量`,
+						icon: 'none'
+					})
+			
+			
+				}
+			
+			},
 
 
 			getDelete2(idx) {
@@ -324,6 +467,27 @@
 				})
 			},
 
+			handAddListPL4(it, idx) {
+				this.list[idx].extInfo.notBatchReportInfo.push({
+					allFeedQuantity: '',
+					allReportWeight: '',
+					notType: '',
+					taskId: '',
+					taskName: '',
+					notReason: ''
+				})
+				this.$forceUpdate()
+			},
+
+			handDel4(idx, yyIdx) {
+				this.list[idx].extInfo.notBatchReportInfo.splice(yyIdx, 1)
+				this.$forceUpdate()
+			},
+
+			handLoad() {
+				this.$forceUpdate()
+			},
+
 
 
 			changeHeatNumber() {
@@ -560,6 +724,10 @@
 				width: 25%;
 			}
 
+        	.ww35 {
+				width: 35%;
+			}
+			
 			.ww50 {
 				width: 50%;
 			}

+ 16 - 2
pages/pda/jobBooking/index/index.vue

@@ -530,6 +530,16 @@
 								taskId: '',
 								taskName: ''
 							}]
+							
+							a.extInfo.notBatchReportInfo = [{
+								allFeedQuantity: '',
+								allReportWeight: '',
+								notType: '',
+								taskId: '',
+								taskName: '',
+								notReason: ''
+							}]
+							
 							return {
 								a
 							}
@@ -683,8 +693,12 @@
 						if (this.taskType == 6) {
 							return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId
 						} else {
-							return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId && e.extInfo
-								.reportWeight
+						 if(e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
+							 return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId && e.extInfo
+							 	.reportWeight
+						 } else {
+							 return e.extInfo.hasOwnProperty('notType') && e.extInfo.notType 
+						 }
 
 						}