ysy 2 лет назад
Родитель
Сommit
2b1c83e87f

+ 3 - 3
pages/pda/feeding/details.vue

@@ -173,7 +173,7 @@
 			scrolltolower() {},
 			scrolltolower() {},
 
 
 			save() {
 			save() {
-			
+
 				this.List.forEach(f => {
 				this.List.forEach(f => {
 					f.instanceList.forEach(e => {
 					f.instanceList.forEach(e => {
 						if (Object.prototype.hasOwnProperty.call(e, 'type')) {
 						if (Object.prototype.hasOwnProperty.call(e, 'type')) {
@@ -322,7 +322,7 @@
 						_arr = this.List
 						_arr = this.List
 						_arr.forEach((e, index) => {
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
 							if (e.workOrderId == id) {
-								_arr[index].equipmentList = res
+								_arr[index].equipmentList = _arr[index].equipmentList.concat(res)
 							}
 							}
 						})
 						})
 						this.List = _arr
 						this.List = _arr
@@ -420,7 +420,7 @@
 						_arr = this.List
 						_arr = this.List
 						_arr.forEach((e, index) => {
 						_arr.forEach((e, index) => {
 							res['extInfo'].fixCode = res.fixCode
 							res['extInfo'].fixCode = res.fixCode
-							e.equipmentList = res
+							e.equipmentList = e.equipmentList.concat(res)
 						})
 						})
 						this.List = _arr
 						this.List = _arr
 						this.$forceUpdate()
 						this.$forceUpdate()

+ 46 - 124
pages/pda/jobBooking/components/oneJobBom.vue

@@ -91,11 +91,11 @@
 
 
 			<view class="content_table2">
 			<view class="content_table2">
 				<view class="head row rx-sc">
 				<view class="head row rx-sc">
-					<view class="item ww25">物料重量Kg</view>
+					<view class="item ww25">{{isFirstTask == 1 ? '物料重量' : '工序重量'}} {{it.extInfo.weightUnit}}</view>
 					<view class="item ww25">报工重量kg</view>
 					<view class="item ww25">报工重量kg</view>
-					<view class="item ww25" v-if="['CVI', 'PIP' ].includes(taskTypeName)">质检结果
+					<view class="item ww25" v-if="isFirstTask == 1">质检结果
 					</view>
 					</view>
-					<view class="item ww25" :class="[  ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">处置
+					<view class="item ww25" :class="[  isFirstTask == 1 ? 'ww25' : 'ww50' ]">处置
 					</view>
 					</view>
 
 
 				</view>
 				</view>
@@ -103,30 +103,28 @@
 				<view class="table">
 				<view class="table">
 
 
 					<view class="tr row rx-sc">
 					<view class="tr row rx-sc">
-						<view class="item ww25">{{it.extInfo.weight}}</view>
+						<view class="item ww25">{{isFirstTask == 1 ? it.extInfo.weight :   it.extInfo.newWeight }}
+						</view>
 						<view class="item ww25 content_num">
 						<view class="item ww25 content_num">
 							<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
 							<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
 							<input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
 							<input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
 						</view>
 						</view>
-						<view class="item ww25" @click="openNumerate(it, idx)"
-							v-if="['CVI', 'PIP' ].includes(taskTypeName)">
+						<view class="item ww25" @click="openNumerate(it, idx)" v-if="isFirstTask == 1">
 							<view class="numerate">点击计算</view>
 							<view class="numerate">点击计算</view>
 						</view>
 						</view>
 
 
 
 
-						<!-- 	<view class="item ww25" v-if="['CVI', 'PIP' ].includes(taskTypeName)">
-							{{it.extInfo.taskName }}
-						</view> -->
-						
-						<view class="item"  v-if='isDetails'  :class="[  ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">
+
+
+						<view class="item" v-if='isDetails' :class="[ isFirstTask == 1 ? 'ww25' : 'ww50' ]">
 							{{it.extInfo.taskName}}
 							{{it.extInfo.taskName}}
 						</view>
 						</view>
- 
-						<view class="item "  v-else :class="[  ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">
+
+						<view class="item " v-else :class="[ isFirstTask == 1 ? 'ww25' : 'ww50' ]">
 							<zxz-uni-data-select :localdata="stepsList" v-model="it.extInfo.taskId" dataValue='taskId'
 							<zxz-uni-data-select :localdata="stepsList" v-model="it.extInfo.taskId" dataValue='taskId'
 								format='{taskTypeName}' dataKey="taskId" filterable
 								format='{taskTypeName}' dataKey="taskId" filterable
 								:clear='false'></zxz-uni-data-select>
 								:clear='false'></zxz-uni-data-select>
-								
+
 						</view>
 						</view>
 
 
 
 
@@ -157,16 +155,12 @@
 
 
 				<view class="content_table2">
 				<view class="content_table2">
 					<view class="head row rx-sc">
 					<view class="head row rx-sc">
-						<view class="item ww20" :class="{'ww30' : taskTypeName == 'CVI' } ">工序名称</view>
-						<view class="item ww20" v-if="taskTypeName == 'CVI'">坯体密度</view>
-						<view class="item ww20" v-if="taskTypeName == 'CVI'">密度系数</view>
-						<view class="item ww20" v-if="taskTypeName == 'CVI'">重量</view>
+						<view class="item ww30">工序名称</view>
+						<view class="item ww20">坯体密度</view>
+						<view class="item ww20">密度系数</view>
+						<view class="item ww20">重量</view>
 
 
 
 
-						<view class="item ww20" v-if="taskTypeName == 'PIP'">坯体图体积</view>
-						<view class="item ww20" v-if="taskTypeName == 'PIP'">要求密度</view>
-						<view class="item ww15" v-if="taskTypeName == 'PIP'">系数</view>
-						<view class="item ww15" v-if="taskTypeName == 'PIP'">重量</view>
 
 
 
 
 						<view class="item ww10">操作</view>
 						<view class="item ww10">操作</view>
@@ -176,98 +170,66 @@
 					<view class="table">
 					<view class="table">
 
 
 						<view class="tr row rx-sc" v-for="(it, idx) in paramList" :key='idx'>
 						<view class="tr row rx-sc" v-for="(it, idx) in paramList" :key='idx'>
-							<view class="item  rx-bc ww20" :class="{'ww30' : taskTypeName == 'CVI' } ">
+							<view class="item  rx-bc ww30">
 								<zxz-uni-data-select :localdata="stepsList" v-model="it.taskId" dataValue='taskId'
 								<zxz-uni-data-select :localdata="stepsList" v-model="it.taskId" dataValue='taskId'
 									format='{taskTypeName}' dataKey="taskId" filterable
 									format='{taskTypeName}' dataKey="taskId" filterable
 									@change=" e => it.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
 									@change=" e => it.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
 							</view>
 							</view>
 
 
 
 
-							<view class="item ww20 content_num" v-if="taskTypeName == 'CVI'">
+							<view class="item ww20 content_num">
 								<input class="uni-input" v-model="it.billet" type="digit"
 								<input class="uni-input" v-model="it.billet" type="digit"
 									@input="changeInp(it, idx)"></input>
 									@input="changeInp(it, idx)"></input>
 							</view>
 							</view>
 
 
 
 
-							<view class="item ww20 content_num" v-if="taskTypeName == 'CVI'">
+							<view class="item ww20 content_num">
 								<input class="uni-input" v-model="it.density" type="digit"
 								<input class="uni-input" v-model="it.density" type="digit"
 									@input="changeInp(it, idx)"></input>
 									@input="changeInp(it, idx)"></input>
 							</view>
 							</view>
 
 
 
 
 
 
-							<view class="item ww20"
-								v-if="taskTypeName == 'CVI' &&  (idx == 0 || idx != paramList.length - 1)">
+							<view class="item ww20" v-if=" (idx == 0 || idx != paramList.length - 1)">
 								< {{it.CVIWeight}} </view>
 								< {{it.CVIWeight}} </view>
 
 
-									<view class="item ww20"
-										v-if="taskTypeName == 'CVI' &&  paramList.length > 1 && idx == paramList.length - 1">
+									<view class="item ww20" v-if=" paramList.length > 1 && idx == paramList.length - 1">
 										≥ {{it.CVIWeight }}
 										≥ {{it.CVIWeight }}
 									</view>
 									</view>
 
 
+							</view>
 
 
 
 
 
 
-									<!-- -------------PIP ------------- -->
-
-									<view class="item ww20 content_num" v-if="taskTypeName == 'PIP'">
-										<input class="uni-input" v-model="it.volume" type="digit"
-											@input="jsPIPWeight(it, idx)"></input>
-									</view>
-
-									<view class="item ww20 content_num" v-if="taskTypeName == 'PIP'">
-										<input class="uni-input" v-model="it.PIPDensity" type="digit"
-											@input="jsPIPWeight(it, idx)"></input>
-									</view>
-
-									<view class="item ww15 content_num" v-if="taskTypeName == 'PIP'">
-										<input class="uni-input" v-model="it.coefficient" type="digit"
-											@input="jsPIPWeight(it, idx)"></input>
-									</view>
-
-									<view class="item ww15 " v-if="taskTypeName == 'PIP'">
-										< {{it.PIPWeight}} </view>
-
-
-
-											<view class="item ww10 rx-cc" @click="getDelete(idx)">
-												<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
-													color="#fa3534"></uni-icons>
-											</view>
-
-									</view>
-
 
 
-							</view>
 
 
-							<view class="formula_box" v-if="taskTypeName == 'CVI'">计算公式: 物料重量/坯体密度*密度系数 </view>
-							<view class="formula_box" v-if="taskTypeName == 'PIP'">计算公式: 坯体图体积*要求密度*系数 </view>
 
 
-							<view class="rx-cc">
-								<u-button size="small" class="u-reset-button" style="width: 300rpx;margin: 20rpx;"
-									type="success" @click="paramSave">工序列表保存</u-button>
-							</view>
+						</view>
 
 
-							<view class="reportWeight rx-sc">
-								物料重量: {{weight}} ;
-								报工重量: {{reportWeight}}
+						<view class="formula_box">计算公式: 物料重量/坯体密度*密度系数 </view>
 
 
 
 
-							</view>
-
+						<view class="rx-cc">
+							<u-button size="small" class="u-reset-button" style="width: 300rpx;margin: 20rpx;"
+								type="success" @click="paramSave">工序列表保存</u-button>
+						</view>
 
 
+						<view class="reportWeight rx-sc">
+							物料重量: {{weight}} ;
+							报工重量: {{reportWeight}}
 
 
+						</view>
 
 
 
 
 
 
-						</view>
+					</view>
 
 
 
 
-						<view class="operate_box rx-sc">
-							<u-button size="small" class="u-reset-button" @click="cancel">取消</u-button>
-							<u-button size="small" class="u-reset-button" type="success" @click="save">确定</u-button>
-						</view>
+					<view class="operate_box rx-sc">
+						<u-button size="small" class="u-reset-button" @click="cancel">取消</u-button>
+						<u-button size="small" class="u-reset-button" type="success" @click="save">确定</u-button>
 					</view>
 					</view>
+				</view>
 
 
 
 
 		</u-popup>
 		</u-popup>
@@ -317,6 +279,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				taskTypeName: null,
 				taskTypeName: null,
+				isFirstTask: null,
 
 
 				stepsList: [],
 				stepsList: [],
 
 
@@ -340,10 +303,13 @@
 
 
 
 
 
 
+
+
 			}
 			}
 		},
 		},
 		created() {
 		created() {
 			this.taskTypeName = this.item.currentTaskDiagram.taskTypeName
 			this.taskTypeName = this.item.currentTaskDiagram.taskTypeName
+			this.isFirstTask = this.item.currentTaskDiagram.isFirstTask
 			this.getSteps()
 			this.getSteps()
 			this.getCompute()
 			this.getCompute()
 
 
@@ -354,7 +320,7 @@
 
 
 
 
 			getSteps() {
 			getSteps() {
-			
+
 				getTaskInstanceList(this.item.workOrderId).then(res => {
 				getTaskInstanceList(this.item.workOrderId).then(res => {
 					this.stepsList = res
 					this.stepsList = res
 				})
 				})
@@ -378,26 +344,12 @@
 				// volume: null,
 				// volume: null,
 				// coefficient: null
 				// coefficient: null
 
 
-				if (this.taskTypeName == 'CVI') {
+				if (this.isFirstTask == 1) {
 					this.paramList.push({
 					this.paramList.push({
 						taskId: null,
 						taskId: null,
 						taskName: null,
 						taskName: null,
 
 
 					})
 					})
-				} else if (this.taskTypeName == 'PIP') {
-
-					if (this.paramList.length < 1) {
-						this.paramList.push({
-							taskId: null,
-							taskName: null,
-						})
-					} else {
-						uni.showToast({
-							title: `PIP计算重量,只要一条数据`,
-							icon: 'none'
-						})
-					}
-
 				}
 				}
 
 
 
 
@@ -415,15 +367,11 @@
 
 
 			},
 			},
 
 
-			jsPIPWeight(item, index) {
-				console.log(item)
-				this.paramList[index].PIPWeight = Number(item.volume * item.PIPDensity * item.coefficient).toFixed(2)
-			},
 
 
 			paramSave() {
 			paramSave() {
 
 
 
 
-				if (this.taskTypeName == 'CVI' && this.paramList.length > 0) {
+				if (this.isFirstTask == 1 && this.paramList.length > 0) {
 					let bol
 					let bol
 					let _i
 					let _i
 					bol = this.paramList.every((e, i) => {
 					bol = this.paramList.every((e, i) => {
@@ -490,7 +438,7 @@
 					})
 					})
 					return false
 					return false
 				}
 				}
-				this.weight = row.extInfo.weight || '20.2'
+				this.weight = row.extInfo.weight
 				this.reportWeight = row.extInfo.reportWeight
 				this.reportWeight = row.extInfo.reportWeight
 				this.resultIdx = idx
 				this.resultIdx = idx
 
 
@@ -514,7 +462,7 @@
 			save() {
 			save() {
 
 
 
 
-				if (this.taskTypeName == 'CVI') {
+				if (this.isFirstTask == 1) {
 
 
 					this.resultObj = {}
 					this.resultObj = {}
 
 
@@ -545,32 +493,6 @@
 
 
 
 
 
 
-				} else if (this.taskTypeName == 'PIP') {
-
-					this.resultObj = {}
-
-
-					if (Number(this.reportWeight) < this.paramList[0].PIPWeight) {
-						this.resultObj = this.paramList[0]
-						this.setDataSave()
-						return false
-					} else {
-						for (let i = 1; i < this.stepsList.length; i++) {
-							if (this.paramList[0].taskId == this.stepsList[i].taskId) {
-								this.resultObj.taskId = this.stepsList[i + 1].taskId
-								this.resultObj.taskName = this.stepsList[i + 1].taskTypeName
-								break;
-							}
-						}
-
-					}
-
-
-					this.setDataSave()
-
-
-
-
 				}
 				}
 
 
 			},
 			},

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

@@ -243,23 +243,19 @@
 
 
 			scanItAllData(result) {
 			scanItAllData(result) {
 				scanLedger(result).then(res => {
 				scanLedger(result).then(res => {
-					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
-						if (this.objData.equipmentList.length == 0) {
-							this.objData.equipmentList = res
-							this.$forceUpdate()
-						} else {
-							if (this.objData.equipmentList[0].instanceId != res[0].instanceId) {
-								uni.showToast({
-									title: '设备不匹配',
-									icon: 'none'
-								})
-							} else {
-								uni.showToast({
-									title: '设备匹配成功',
-									icon: 'none'
-								})
-							}
+					if ( res[0].rootCategoryLevelId == 4) { // 设备
+						
+						let isFals = this.objData.equipmentList.some(m => m.code == result)
+						if (isFals) {
+							uni.showToast({
+								title: '设备已存在',
+								icon: 'none'
+							})
+							return false
 						}
 						}
+						this.objData.equipmentList.push(res[0])
+						this.$forceUpdate()
+						
 					}
 					}
 
 
 					if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 磨具
 					if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 磨具
@@ -278,6 +274,9 @@
 									icon: 'none'
 									icon: 'none'
 								})
 								})
 							}
 							}
+							
+							
+							
 						}
 						}
 					} else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
 					} else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
 
 

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

@@ -116,7 +116,7 @@
 					taskId: this.taskId
 					taskId: this.taskId
 				}
 				}
 				listWorkReport(param).then(res => {
 				listWorkReport(param).then(res => {
-
+					console.log(2,res)
 					this.list = res
 					this.list = res
 				})
 				})
 			},
 			},

+ 1 - 15
pages/pda/workOrder/search/index.vue

@@ -463,21 +463,7 @@
 
 
 			//跳转回添加页面
 			//跳转回添加页面
 			jumpAdd() {
 			jumpAdd() {
-				let equipmentList = []
-				if (this.isType == 'feed' || this.isType == 'job') {
-					this.memoList.forEach(f => {
-						if (f.rootCategoryLevelId == 4) {
-							equipmentList.push(f)
-						}
-					})
-				}
-				if (equipmentList.length > 1) {
-					uni.showToast({
-						title: '只能勾选一个设备',
-						icon: 'none'
-					})
-					return false
-				}
+
 				if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job') {
 				if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job') {
 					uni.$emit('setSelectList', this.memoList, this.pid)
 					uni.$emit('setSelectList', this.memoList, this.pid)
 					uni.navigateBack()
 					uni.navigateBack()