ysy před 2 roky
rodič
revize
135bfef212

+ 1 - 0
App.vue

@@ -2,6 +2,7 @@
 import { isMemo } from '@/utils/passwordMemo.js'
 import ScanCode from '@/mixins/ScanCode.js'
 import Vue from 'vue'
+
 export default {
   mixins: [ScanCode],
   onLaunch: function () {

+ 6 - 0
main.js

@@ -57,6 +57,12 @@ const app = new Vue({
 app.$mount();
 // #endif
 
+
+
+
+
+
+
 // #ifdef VUE3
 import { createSSRApp } from "vue";
 export function createApp() {

+ 2 - 2
package.json

@@ -14,7 +14,7 @@
     "echarts": "^5.4.2",
     "lodash": "^4.17.21",
     "mpvue-echarts": "^0.3.2",
-    "mqtt": "^4.3.7"
-    
+    "mqtt": "^4.3.7",
+    "vconsole": "^3.15.1"
   }
 }

+ 8 - 2
pages/pda/common.js

@@ -11,6 +11,12 @@ export const tableHeader = selectEquiType => {
 					label: '规格',
 					prop: 'specification'
 				},
+
+				{
+					label: '牌号',
+					prop: 'brandNum'
+				},
+
 				{
 					label: '包装库存',
 					prop: '',
@@ -58,7 +64,7 @@ export const tableHeader = selectEquiType => {
 						return row.extInfo.startCyTimes || 0
 					}
 				},
-				
+
 				{
 					label: '最大冲压次数',
 					prop: '',
@@ -120,7 +126,7 @@ export const tableHeader = selectEquiType => {
             }`
 					}
 				},
-				
+
 			]
 		case 10:
 			return []

+ 2 - 1
pages/pda/feeding/components/feedCard.vue

@@ -40,7 +40,8 @@
 				<view class="item_box rx-bc">
 					<view class="item_one perce50 rx-sc">
 						<view class="lable">生产数量:</view>
-						<view>{{item.formingWeight}}</view>
+						<view>{{item.formingNum}}</view>
+						<view>{{item.unit}}</view>
 					</view>
 					<view class="item_one perce50 rx-sc">
 						<view>状态:</view>

+ 49 - 9
pages/pda/feeding/components/instanceBom.vue

@@ -9,32 +9,66 @@
 				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 			</view>
 			<view class="content_table">
-	
+
 
 				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
 					<view class="lable rx-cc">{{ itm.label }}</view>
 					<view class="content">{{ mate[itm.prop] }}</view>
 				</view>
-				
-				<view class="item"  >
+
+				<view class="item" v-if='mate.isConsumable == 1'>
 					<view class="lable rx-cc">包装库存</view>
 					<view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
 				</view>
 
 
+				<view class="item" v-if='mate.isConsumable == 0'>
+					<view class="lable rx-cc">刻码</view>
+					<view class="content">{{mate.extInfo.engrave}}</view>
+				</view>
+
+
+				<view class="item" v-if='mate.isConsumable == 0'>
+					<view class="lable rx-cc">物料代号</view>
+					<view class="content">{{mate.extInfo.materielCode}}</view>
+				</view>
+
+
+				<view class="item" v-if='mate.isConsumable == 0'>
+					<view class="lable rx-cc">客户代号</view>
+					<view class="content">{{mate.extInfo.clientCode}}</view>
+				</view>
+
+
+
+
+
+
+
+
+
+				<view class="item" v-if='mate.isConsumable == 0'>
+					<view class="lable rx-cc">位置</view>
+					<view class="content content_num ww400">
+						<input class="uni-input" v-model='mate.extInfo.position'></input>
+					</view>
+				</view>
+
+
+
+
+
 				<view class="item">
 					<view class="lable rx-cc">数量</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="mate.feedQuantity"
-							type="digit"></input>
+						<input class="uni-input" v-model="mate.feedQuantity" type="digit"></input>
 						<view class="unit">/{{mate.unit}}</view>
-					
 					</view>
 				</view>
-				
 
 
-			
+
+
 
 			</view>
 		</view>
@@ -150,7 +184,7 @@
 		}
 
 		.content_table {
-			width: 652rpx;
+			width: 722rpx;
 			border: 2rpx solid $border-color;
 
 			.item {
@@ -205,6 +239,12 @@
 					}
 				}
 
+				.ww400 {
+					/deep/ .uni-input-input {
+						width: 400rpx;
+					}
+				}
+
 				.pd4 {
 					padding: 4rpx 8rpx;
 				}

+ 0 - 1
pages/pda/jobBooking/components/jobBom.vue

@@ -97,7 +97,6 @@
 								@click="handleView(item.warehouseName)">查看</view>
 						</view>
 					</view>
-s
 				</view>
 
 

+ 172 - 22
pages/pda/jobBooking/components/oneJobBom.vue

@@ -2,15 +2,15 @@
 	<view>
 		<view class="title_box rx-bc">
 			<view class="name">报工信息: ({{list.length || 0}})个</view>
-        
+
 		</view>
 
 
 		<view class="material " v-for="(it, idx) in list" :key="idx">
-      
 
-			<view class="content_table" >
-             
+
+			<view class="content_table">
+
 				<view class="item rx-sc">
 					<view class="rx">
 						<view class="lable lable190 rx-cc ">
@@ -65,7 +65,7 @@
 				<view class="item rx-sc">
 					<view class="rx ww50 ">
 						<view class="lable lable150 rx-cc ">刻码</view>
-						<view class="content content_num content_H">
+						<view class="content content_num ">
 							<input class="uni-input" v-model="it.extInfo.engrave"></input>
 
 						</view>
@@ -73,9 +73,8 @@
 
 					<view class="rx ww50">
 						<view class="lable lable150 rx-cc ">位置</view>
-						<view class="content ">
-							<zxz-uni-data-select :localdata="positionList" v-model="it.position" dataValue='id'
-								format='{name}' dataKey="code" filterable :clear='false'></zxz-uni-data-select>
+						<view class="content content_num">
+							<input class="uni-input" v-model="it.extInfo.position"></input>
 						</view>
 					</view>
 
@@ -83,7 +82,6 @@
 
 
 
-
 			</view>
 
 
@@ -98,34 +96,75 @@
 				<view class="table">
 
 					<view class="tr row rx-sc">
-						<view class="item ww25">32.67</view>
+						<view class="item ww25">{{it.extInfo.weight}}</view>
 						<view class="item ww25 content_num">
-							<input class="uni-input" v-model="it.formedNum"></input>
+							<input class="uni-input" v-model="it.extInfo.reportWeight"></input>
 						</view>
-						<view class="item ww25">
-							<zxz-uni-data-select :localdata="inspectionList" v-model="it.inspection" dataValue='id'
-								format='{name}' dataKey="code" filterable :clear='false'></zxz-uni-data-select>
+						<view class="item ww25" @click="openNumerate(it, idx)">
+							<view class="numerate">点击计算</view>
 						</view>
 						<view class="item ww25">
-							<zxz-uni-data-select :localdata="stepsList" v-model="it.disposeOf" dataValue='id'
-								format='{taskTypeName}' dataKey="code" filterable :clear='false'></zxz-uni-data-select>
+                           {{it.extInfo.deal }}
 						</view>
 
 					</view>
 
+				</view>
 
+			</view>
 
 
 
+		</view>
 
-				</view>
 
 
+		<u-popup :show="show" mode='center' v-if='show' :closeOnClickOverlay='false'>
+			<view class="popup_box">
+				
+			 <view class="content_table2">
+			 	<view class="head row rx-sc">
+			 		<view class="item ww25">物料重量Kg</view>
+			 		<view class="item ww25">坯体密度</view>
+			 		<view class="item ww30">产品密度系数</view>
+			 		<view class="item ww20">标准</view>
+			 	</view>
+			 
+			 	<view class="table">
+			 
+			 		<view class="tr row rx-sc" v-for="(item, index) in rowIt" :key='index'>
+			 			<view class="item ww25 rx-bc">
+						 <view>{{item.deal}}</view>
+						 <view>{{item.weight}}</view>
+						</view>
+			 			<view class="item ww25 content_num">
+			 			  	<input class="uni-input" v-model="item.billet" type="digit" @input="changeInp(item, index)"></input>
+			 			</view>
+			 			<view class="item ww30 content_num" >
+			 			  	<input class="uni-input" v-model="item.density" type="digit"  @input="changeInp(item, index)"></input>
+			 			</view>
+			 			<view class="item ww20">
+			                 {{item.result}}
+			 			</view>
+			 
+			 		</view>
+				
+			 
+			 	</view>
+				
+					<view class="reportWeight">报工重量: {{reportWeight}}</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>
 
 
-
-		</view>
+		</u-popup>
 
 
 
@@ -142,12 +181,12 @@
 				type: Object,
 				default: () => {}
 			},
-			
+
 			list: {
 				type: Array,
 				default: () => []
 			}
-		
+
 
 
 
@@ -185,7 +224,11 @@
 						id: '2',
 						name: '不合格'
 					},
-				]
+				],
+
+				show: false,
+				rowIt: [],
+				reportWeight: 0,
 
 
 
@@ -208,6 +251,76 @@
 				})
 			},
 
+			openNumerate(row, idx) {
+				if(!row.extInfo.reportWeight) {
+					 uni.showToast({
+					 	icon:'none',
+						title: '请先输入报工重量'
+					 })
+					return false
+				}
+				this.reportWeight = row.extInfo.reportWeight
+				this.rowIt = [
+					{
+						 weight: row.extInfo.weight,
+						 billet: 0.45,
+						 density: 0.7,
+						 result: (Number(row.extInfo.weight) / 0.45 * 0.7).toFixed(2),
+						 deal: 'PIP',
+						 idx
+					},
+					
+					{
+						 weight: row.extInfo.weight,
+						 billet: 0.46,
+						 density: 1.1,
+						 result: (Number(row.extInfo.weight) / 0.6* 1.1).toFixed(2) ,
+						 deal: '粗车',
+						  idx
+					},
+					
+					{
+						 weight: row.extInfo.weight,
+						 billet: 0.47,
+						 density: 1.6,
+						 result: (Number(row.extInfo.weight) / 0.47 * 1.6).toFixed(2),
+						 deal: '高温',
+						  idx
+					}
+				]
+				this.show = true
+			},
+			
+			changeInp(item,index) {
+				this.rowIt[index]['result'] =  (Number(item.weight) / item.billet * item.density).toFixed(2)
+		
+			},
+
+			cancel() {
+				this.show = false
+				this.rowIt = []
+				this.reportWeight  = 0
+			},
+
+			save() {
+	
+				let _idx = this.rowIt[0].idx
+				let _deal = null
+				if(this.reportWeight >= this.rowIt[0].result && this.reportWeight < this.rowIt[1].result) {
+					_deal = this.rowIt[0].deal
+				} else if(this.reportWeight >= this.rowIt[1].result && this.reportWeight < this.rowIt[2].result) {
+					_deal = this.rowIt[1].deal
+				} else if(this.reportWeight >= this.rowIt[2].result ) {
+					_deal = this.rowIt[2].deal
+				}
+				
+				if(_deal) {
+					this.list[_idx].extInfo.deal = _deal
+					
+				}
+				this.cancel()
+			},
+
 
 
 		}
@@ -380,6 +493,12 @@
 			.ww25 {
 				width: 25%;
 			}
+			
+			.ww30 {
+				width: 30%;
+			
+			}
+			
 		}
 
 		.head {
@@ -415,10 +534,16 @@
 
 			}
 
+
 			&:last-child {
 				border-bottom: 2rpx solid #E3E5E5;
 
 			}
+
+			.numerate {
+				font-size: 22rpx;
+				color: $theme-color;
+			}
 		}
 	}
 
@@ -449,4 +574,29 @@
 		color: #fff;
 		margin-right: 18rpx;
 	}
+
+
+	.popup_box {
+		width: 94vw;
+		padding: 16rpx  12rpx;
+		box-sizing: border-box;
+
+	}
+
+
+
+	.operate_box {
+		margin-top: 32rpx;
+		padding: 10rpx 100rpx;
+
+		/deep/ .u-button {
+			width: 160rpx;
+		}
+	}
+	.reportWeight{
+		font-size: 24rpx;
+		font-style: normal;
+		font-weight: 400;
+		margin-top: 12rpx;
+	}
 </style>

+ 1 - 1
pages/pda/picking/bill/index.vue

@@ -29,7 +29,7 @@
 							</u-empty>
 						</view>
 
-						<instanceBom :list='it.arr'></instanceBom>
+						<instanceBom :list='it.arr' :isDetails='true'></instanceBom>
 
 
 					</view>

+ 1 - 1
pages/pda/picking/components/instanceBom.vue

@@ -33,7 +33,7 @@
 
 
 				<view class="item">
-					<view class="lable rx-cc">数量</view>
+					<view class="lable rx-cc">领料数量</view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="mate.demandQuantity"
 							@blur='mate.demandQuantity > mate.availableCountBase ?  mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'

+ 4 - 3
pages/pda/picking/components/pickCard.vue

@@ -40,7 +40,8 @@
 				<view class="item_box rx-bc">
 					<view class="item_one perce50 rx-sc">
 						<view class="lable">生产数量:</view>
-						<view>{{item.formingWeight}}</view>
+						<view>{{item.formingNum}}</view>
+						<view>{{ item.unit }}</view>
 					</view>
 					<view class="item_one perce50 rx-sc">
 						<view>状态:</view>
@@ -93,8 +94,8 @@
 			},
 			
 			openDetails(pickStatus, id) {
-				if(pickStatus == 1) {
-					 let url =  `/pages/pda/picking/bill/index?id=${id}`
+				if(pickStatus == 1 || pickStatus == 2) {
+					 let url =  `/pages/pda/picking/bill/index?id=${id}&status=${pickStatus}`
 					uni.navigateTo({
 						url
 					})

+ 48 - 2
pages/pda/picking/details.vue

@@ -85,6 +85,8 @@
 						</boatBom>
 
 
+						<view class='flex_btn' v-if='isPick' @click="openDetails">已有领料单</view>
+
 
 					</view>
 
@@ -112,7 +114,8 @@
 	} from '@/api/pda/workOrder.js'
 
 	import {
-		batchSave
+		batchSave,
+		pickDetails
 	} from '@/api/pda/picking.js'
 
 	export default {
@@ -129,6 +132,7 @@
 				classificationList: [], //分类数据
 
 				taskId: null,
+				isPick: false,
 
 
 
@@ -143,6 +147,11 @@
 
 
 			this.getList()
+			
+			if(this.idsList.length == 1) {
+				this.getPick()
+			}
+			
 
 		},
 		onShow() {
@@ -157,7 +166,7 @@
 
 
 						selectList.forEach(f => {
-							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8 ) { // 投料
+							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) { // 投料
 								f.automatic = 1
 								instanceList2 = instanceList2.concat(f)
 							} else if (f.rootCategoryLevelId == 5) { // 模具
@@ -300,6 +309,8 @@
 				this.$forceUpdate()
 
 			},
+			
+
 
 
 			addPicking(id, item) {
@@ -311,6 +322,23 @@
 					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
+					}
+					
+				}) 
+			},
+			
+			openDetails() {
+				let url =  `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
+				uni.navigateTo({
+					url
+				})
+			},
 
 		},
 
@@ -484,4 +512,22 @@
 			color: #fff;
 		}
 	}
+
+
+	.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;
+	}
 </style>

+ 3 - 3
pages/pda/picking/index/index.vue

@@ -12,10 +12,10 @@
 
 			<view class="nav_box rx-sc">
 				<view class="nav_item " :class="{active: pickStatus == 0}" @click="handNav(0)">
-					未领料({{navObj.unclaimedQuantity}})</view>
+					工单({{navObj.unclaimedQuantity || 0}})</view>
 				<view class="nav_item" :class="{active: pickStatus == 1}" @click="handNav(1)">
-					领料({{navObj.claimedQuantity}})</view>
-				<view class="nav_item" :class="{active: pickStatus == 2}" @click="handNav(2)">出库(0)</view>
+					领料({{navObj.claimedQuantity || 0}})</view>
+				<view class="nav_item" :class="{active: pickStatus == 2}" @click="handNav(2)">出库({{ navObj.outInQuantity || 0 }})</view>
 
 				<view class="menu_box" @click="handleSearch">
 					<image class="menu_icon" src="~@/static/pda/menu.svg"></image>

+ 5 - 4
pages/pda/sample/components/diagramLast.vue

@@ -16,10 +16,11 @@
 
 
 				<view class="item ">
-						<view class="lable  rx-cc">合格数量</view>
-						<view class="content">
-							<view>{{ item.formedNum }}</view>
-						</view>
+					<view class="lable  rx-cc">合格数量</view>
+					<view class="content rx-sc">
+						<view>{{ item.formedNum }}</view>
+							<view class="unit">{{ item.unit }}</view>
+					</view>
 
 				</view>
 

+ 13 - 7
pages/pda/sample/inspection/index.vue

@@ -19,14 +19,16 @@
 							@click="scanIt(item.workOrderId)">扫一扫</u-button>
 					</view>
 
-					<diagramLast :item='item.lastObj' v-if='item'></diagramLast>
 
+	
+					<diagramLast :item='item.lastObj' v-if='item'></diagramLast>
 
-					<inspectionBom :inspectionList='inspectionList' :normalQuality='item.normalQuality'></inspectionBom>
 
+					<inspectionBom v-if='inspectionList.length' :inspectionList='inspectionList' :normalQuality='item.normalQuality'></inspectionBom>
 
 
 
+                      
 
 				</view>
 			</u-list>
@@ -123,6 +125,7 @@
 					taskId: this.taskId,
 
 				}).then(res => {
+			
 					this.List = res.map(m => {
 						m.workOrderId = m.id
 						m.instanceList = [] // 物料
@@ -133,11 +136,10 @@
 						m.normalQuality.quantity = 0
 						m.normalQuality.inspectionId = this.inspectionId
 						m.normalQuality.inspectionName = this.inspectionName
-
 						m.lastObj = {
-								formedNum: res.formedNumLast,
-								taskNameLast: res.taskNameLast
-							
+							formedNum: m.formedNumLast,
+							taskNameLast: m.taskNameLast,
+							unit: m.unit
 						}
 						m.feedType = 3
 
@@ -156,7 +158,11 @@
 
 
 			getLastTree() {
-				getLastTreeByPid(this.$route.query.inspectionId).then(res => {
+				
+				
+				
+				getLastTreeByPid(this.inspectionId).then(res => {
+					console.log(res)
 					this.inspectionList = res
 
 					this.inspectionList.push({

+ 13 - 12
pages/pda/sample/inspection/job.vue

@@ -17,8 +17,8 @@
 
 					<u-form labelPosition="left" labelWidth="180" labelAlign="left" style="margin-top: 40rpx;">
 
-						<u-form-item label="合格数量:" class="required-form" borderBottom prop="formingNum">
-							<input class="uni-input" v-model="formingNum" type='digit'></input>
+						<u-form-item label="合格数量:" class="required-form" borderBottom prop="formedNum">
+							<input class="uni-input" v-model="formedNum" type='digit'></input>
 						</u-form-item>
 
 					</u-form>
@@ -68,7 +68,7 @@
 				lastObj: null,
 				feedCount: null,
 
-				formingNum: 0,
+				formedNum: 0,
 				formedNumLast: 0
 			}
 		},
@@ -102,22 +102,23 @@
 				getByIdReport(this.id, this.taskId).then(res => {
 
 					res.workReportInfo = {
-						formingNum: null,
+						formedNum: null,
 						taskId: this.taskId,
 						reportType: 3
 					}
 
 					this.formedNumLast = res.formedNumLast
-					this.formingNum = 0
+					this.formedNum = 0
 					res.normalQuality.forEach(f => {
 						this.formedNumLast = this.formedNumLast - Number(f.quantity)
-						this.formingNum  = this.formedNumLast
+						this.formedNum  = this.formedNumLast
 					})
 
 
 					this.lastObj = {
 						formedNum: res.formedNumLast,
-						taskNameLast: res.taskNameLast
+						taskNameLast: res.taskNameLast,
+						unit: res.unit
 					}
 
 					this.objData = res
@@ -125,13 +126,15 @@
 
 				})
 			},
+			
+			scrolltolower() {},
 
 			save() {
 
-				this.objData.workReportInfo.formingNum = this.formingNum
+				this.objData.workReportInfo.formedNum = this.formedNum
 				console.log(this.objData.workReportInfo)
 
-				if (Number(this.objData.workReportInfo.formingNum) < 0 || this.objData.workReportInfo.formingNum == null) {
+				if (Number(this.objData.workReportInfo.formedNum) < 0 || this.objData.workReportInfo.formedNum == null) {
 
 					uni.showToast({
 						icon: 'none',
@@ -145,9 +148,7 @@
 
 
 				jobSave(this.objData).then(res => {
-					if (res) {
-						uni.navigateBack()
-					}
+					uni.navigateBack()
 				})