ysy 2 년 전
부모
커밋
480238d90b

+ 0 - 1
pages/pda/feeding/components/instanceBom.vue

@@ -174,7 +174,6 @@
 			border: 2rpx solid #c8c9cc;
 			border-radius: 4rpx;
 
-
 		}
 
 		.check_active {

+ 14 - 4
pages/pda/feeding/components/modelBom.vue

@@ -10,11 +10,13 @@
 		</view>
 
 
-		<view class="material ">
-
+		<view class="material  rx-ss"  v-for="(item,index) in list" :key='index'>
 
+		<view class="left rx-ss" @click="getDelete(index)" v-if='workOrderId'>
+				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+			</view>
 
-			<view class="content_table" v-for="(item,index) in list" :key='index'>
+			<view class="content_table" >
 				<view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">
 					<view class="item " v-if="Array.isArray(tab.prop)">
 						<view class="lable lable300 rx-sc"> {{ item[tab.prop[0]]  }}</view>
@@ -84,6 +86,11 @@
 				return tableHeader(type)
 			},
 
+
+			getDelete(idx) {
+				this.list.splice(idx, 1)
+			},
+			
 			handleScan(id) {
 				this.$emit('scanIt', id)
 			},
@@ -151,10 +158,13 @@
 	.material {
 		margin-top: 10rpx;
 
+	.left {
+			width: 40rpx;
+		}
 
 
 		.content_table {
-			width: 100%;
+						width: 722rpx;
 			border: 2rpx solid $border-color;
 
 			.item {

+ 52 - 26
pages/pda/jobBooking/components/jobBom.vue

@@ -50,8 +50,8 @@
 					<view class="rx ww55 ">
 						<view class="lable lable150 rx-cc ">合格品数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" @input="blurNum"
-								type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" :disabled="isDetails"
+								@input="blurNum" type="digit"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -59,7 +59,7 @@
 					<view class="rx ww45">
 						<view class="lable rx-cc ww80">重量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.formedWeight" type="digit"  :disabled="isDetails"></input>
 							<view class="unit">{{item.weightUnit}}</view>
 						</view>
 					</view>
@@ -68,18 +68,14 @@
 
 
 
-
-
-
-
-
 				<view class="item rx-sc" v-for="(not,notIndex) in notFormedList" :key='notIndex'>
 
 					<view class="rx ww55 ">
 
 						<view class="lable lable150 rx-cc ">不合格数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum"></input>
+							<input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum"  :disabled="isDetails"
+								@input="notForme"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -87,33 +83,34 @@
 					<view class="rx ww45">
 						<view class="lable rx-cc ww80">重量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="not.notFormedWeight" type="digit"></input>
+							<input class="uni-input" v-model="not.notFormedWeight" type="digit"  :disabled="isDetails"></input>
 							<view class="unit">{{item.weightUnit}}</view>
 
 							<view class="penalize" v-if='!isDetails'
 								:style="{ background: not.warehouseId ? '#FFA07A' : ''}" @click="penalize">处置</view>
 							<view class="penalize" v-if='isDetails'
 								:style="{ background: not.warehouseId ? '#FFA07A' : ''}"
-								@click="handleView(item.warehouseName)">查看</view>
+								@click="handleView(isDetails ? not.warehouseName : item.warehouseName)">查看</view>
 						</view>
 					</view>
 				</view>
 
 
 
-
-
-
-
-
-
 			</view>
 
 			<view class='content_table' v-for="(item,index) in palletList" :key='index'>
-				<view class="item" @click="handleType">
+				<view class="item" @click="handleType"  v-if="!isDetails">
 					<view class="lable rx-cc">舟皿类型</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="item.categoryLevelName"></input>
+						<input class="uni-input" v-model="item.categoryLevelName"  ></input>
+					</view>
+				</view>
+				
+				<view class="item" @click="handleType"  v-if="isDetails">
+					<view class="lable rx-cc">舟皿类型</view>
+					<view class="content ">
+						 {{item.name}}
 					</view>
 				</view>
 
@@ -123,8 +120,10 @@
 					<view class="lable rx-cc">舟皿名称</view>
 					<view class="content ">
 						<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
-							format='{name}-{code}' dataKey="code" filterable :clear='false'
+							format='{name}-{code}' dataKey="code" filterable :clear='false'   v-if="!isDetails"
 							@change='inputChange'></zxz-uni-data-select>
+							
+							<view  v-if="isDetails">{{item.code }} </view>
 					</view>
 				</view>
 
@@ -138,7 +137,7 @@
 				<view class="item">
 					<view class="lable rx-cc">舟皿数量</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="item.quantity" type='digit'></input>
+						<input class="uni-input" v-model="item.quantity" type='digit'  :disabled="isDetails"></input>
 					</view>
 				</view>
 
@@ -191,7 +190,7 @@
 				immediate: true,
 				deep: true,
 				handler(newVal) {
-					console.log(newVal)
+
 					this.notFormedList = newVal
 
 				}
@@ -213,6 +212,18 @@
 
 			this.getTreeList()
 
+			if (this.isDetails) {
+				this.notFormedList = this.notFormedList.map(m => {
+               
+				  return {
+					  notFormedNum:Number(m.quantity),
+					  notFormedWeight: m.weight,
+					  ...m
+				  }
+
+				})
+			}
+
 		},
 		methods: {
 
@@ -276,12 +287,13 @@
 			},
 
 			blurNum() {
-				
+
 				let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
 				this.$emit('modeNum', total)
-				if(this.item.singleWeight) {
-					let weight =  Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this.item.weightMultiple)
-					weight  =  parseFloat(weight.toFixed(2))  
+				if (this.item.singleWeight) {
+					let weight = Number(this.item.workReportInfo.formedNum) * Number(this.item.singleWeight) * Number(this
+						.item.weightMultiple)
+					weight = parseFloat(weight.toFixed(2))
 					this.$set(this.item.workReportInfo, 'formedWeight', weight)
 					this.$forceUpdate()
 				} else {
@@ -290,6 +302,20 @@
 					})
 				}
 			},
+
+			notForme() {
+				if (this.item.singleWeight) {
+					let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
+						.item.weightMultiple)
+					weight = parseFloat(weight.toFixed(2))
+					this.$set(this.notFormedList[0], 'notFormedWeight', weight)
+					this.$forceUpdate()
+				} else {
+					uni.showToast({
+						title: '没有单重,维护主数据净重',
+					})
+				}
+			},
 		}
 	}
 </script>

+ 10 - 1
pages/pda/jobBooking/index/index.vue

@@ -475,7 +475,9 @@
 
 
 			save() {
-				console.log(this.objData)
+			     uni.showLoading({
+			     	title: '加载中'
+			     });
 				if (!this.objData.workReportInfo['formedNum'] && this.objData.workReportInfo['formedNum'] != 0) {
 					uni.showToast({
 						title: '请输入合格品数量',
@@ -541,7 +543,14 @@
 
 
 				jobSave(this.objData).then(res => {
+					uni.hideLoading();
 					uni.navigateBack()
+					
+				}).finally(() => {
+					
+					setTimeout(function () {
+						uni.hideLoading();
+					}, 3000);
 				})
 
 

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

@@ -20,7 +20,8 @@
 					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
 					</modelBom>
 
-					<jobBom :item='objData' :palletList='objData.palletList' :notFormed='objData.notFormedList'
+           
+					<jobBom :item='objData' v-if="objData.notFormedList" :palletList='objData.palletList' :notFormed='objData.notFormedList'
 						:isDetails='true'></jobBom>
 					
 					<oneJobBom  v-if='objData.instanceList &&  objData.instanceList.length != 0' :list='objData.instanceList' :item='objData' :isDetails='true'> </oneJobBom>