ysy há 2 anos atrás
pai
commit
e45348a73c

+ 3 - 3
pages/pda/feeding/components/deviceBom.vue

@@ -39,21 +39,21 @@
 				<view class="item rx-sc">
 					<view class="rx ww50">
 						<view class="lable  rx-cc">固资编码</view>
-						<view class="content">{{item.fixCode }} </view>
+						<view class="content">{{item.extInfo.fixCode }} </view>
 
 					</view>
 
 
 					<view class="rx ww50">
 						<view class="lable ww80 rx-cc">编号</view>
-						<view class="content">{{item.codeNumber}}</view>
+						<view class="content">{{item.extInfo.codeNumber}}</view>
 					</view>
 
 				</view>
 
 
 
-				<view class="item" v-if="clientEnvironmentId == 3">
+				<view class="item" >
 					<view class="lable rx-cc">炉次号</view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="item.extInfo.heatNumber" type="number"></input>

+ 27 - 3
pages/pda/jobBooking/components/turnoverBom.vue

@@ -45,7 +45,7 @@
 
 				<view class="table">
 					<u-list @scrolltolower="scrolltolower" class="z_list">
-						<view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx' >
+						<view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
 							<view class="item ww10">{{it.code}}</view>
 							<view class="item ww35" :class="{'color157': it.workOrderCode === wordItem.code}">
 								{{ it.workOrderCode }}
@@ -56,7 +56,8 @@
 
 							<view class="item ww20  " :class="{'content_num' : pattern == 'job' }" v-if='!isDetails'>
 								<input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
-									v-model="it.quantity" type="digit" :disabled="pattern != 'job'"></input>
+									v-model="it.quantity" type="digit"
+									:disabled="it.isOccupy || pattern != 'job'"></input>
 								<text v-else>{{it.quantity}}</text>
 							</view>
 
@@ -105,8 +106,11 @@
 				immediate: true,
 				deep: true,
 				handler(newVal) {
+
+			
 					this.newList = newVal
 
+
 				}
 			}
 		},
@@ -114,7 +118,11 @@
 		data() {
 			return {
 				recycleQuantity: '',
-				newList: []
+				newList: [],
+
+				totalCount: 0,
+
+
 			}
 		},
 
@@ -132,6 +140,22 @@
 				}
 
 
+				this.totalCount = 0
+				this.newList.forEach(f => {
+					f.extInfo.positionList.forEach(o => {
+						if (o.isOccupy == 0 && o.quantity > 0) {
+							this.totalCount = Number(this.totalCount) + Number(o.quantity)
+						}
+					})
+				})
+
+				uni.showToast({
+					icon: 'none',
+					title: `已经放${this.totalCount}`
+				})
+
+
+
 			},
 
 			handleScan(index) {

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

@@ -271,11 +271,8 @@
 			// 相机扫码
 			HandlScanCode() {
 
-
-
-				
 				uni.scanCode({
-				 success: (res) => {
+					success: (res) => {
 						this.scanItAllData(res.result)
 					}
 				})
@@ -340,9 +337,9 @@
 
 			handleScan(id, type) {
 
-		
+
 				uni.scanCode({
-					 success: (res) => {
+					success: (res) => {
 						this.scanData(res.result, type, id)
 					}
 				})
@@ -675,7 +672,7 @@
 									uni.navigateTo({
 										url: `/pages/pda/warehousing/index?workOrderId=${this.id}&taskId=-1&workReportId=${res}`
 									})
-								} else { 
+								} else {
 									uni.navigateBack()
 								}
 

+ 0 - 1
pages/pda/turnover/components/qualityTurnoverBom.vue

@@ -178,7 +178,6 @@
 				// this.$refs.turnoverRef.open('SL-020-SB-001011003', this.wordInfo, this.newList, this.wordItem, index)
 				// return false
 		
-
 				
 				uni.scanCode({
 					success: (res) => {

+ 38 - 3
pages/pda/turnover/index/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content-box">
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
-			color="#000" @clickLeft="back"></uni-nav-bar>
+			color="#000" @clickLeft="back" right-icon="scan" @clickRight="HandlScanCode"></uni-nav-bar>
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
@@ -31,6 +31,7 @@
 
 	import {
 		getVehicle,
+		scanLedger
 	} from '@/api/pda/workOrder.js'
 
 
@@ -87,7 +88,7 @@
 					}
 
 					this.List.push(res)
-					
+
 				})
 			},
 
@@ -109,7 +110,7 @@
 			handleScan(id, type) {
 
 				uni.scanCode({
-				success: (res) => {
+					success: (res) => {
 						this.scanData(res.result, type, id)
 					}
 				})
@@ -118,6 +119,40 @@
 			},
 
 
+			// 相机扫码
+			HandlScanCode() {
+
+				uni.scanCode({
+					success: (res) => {
+						this.scanItAllData(res.result)
+					}
+				})
+
+			},
+
+
+
+			scanItAllData(result) {
+				scanLedger(result).then(res => {
+                   
+					if (res[0].rootCategoryLevelId == 7) { // 周转车
+
+						let isFals = this.List[0].turnover.some(m => m.code == result)
+						if (isFals) {
+							uni.showToast({
+								title: '周转车已存在',
+								icon: 'none'
+							})
+							return false
+						}
+						this.List[0].turnover.push(res[0])
+						this.$forceUpdate()
+
+					}
+
+				})
+			},
+