ysy %!s(int64=2) %!d(string=hai) anos
pai
achega
a0dee0da25

+ 2 - 2
pages/center/about/about.vue

@@ -7,8 +7,8 @@
       @clickLeft="back"
     >
       <!-- <view class="title">关于株洲硬质合金集团型材分公司</view> -->
-	   <view class="title">关于湖南碳谷新材料有限公司</view>
-	    <!-- <view class="title">关于株洲索尔切削刀具有限公司</view> -->
+	   <!-- <view class="title">关于湖南碳谷新材料有限公司</view> -->
+	    <view class="title">关于株洲索尔切削刀具有限公司</view>
 
     </uni-nav-bar>
 

+ 2 - 2
pages/login/login.vue

@@ -10,8 +10,8 @@
     <view class="login-title">
       <label>智慧工厂信息化系统</label>
       <!-- <text>株洲硬质合金集团型材分公司</text> -->
-	  <text>湖南碳谷新材料有限公司</text>
-	   <!-- <text >株洲索尔切削刀具有限公司</text> -->
+	  <!-- <text>湖南碳谷新材料有限公司</text> -->
+	   <text >株洲索尔切削刀具有限公司</text>
 	  
     </view>
     <view>

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

@@ -50,7 +50,7 @@
 					<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 class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" @input="blurNum"
 								type="digit"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
@@ -276,8 +276,19 @@
 			},
 
 			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))  
+					this.$set(this.item.workReportInfo, 'formedWeight', weight)
+					this.$forceUpdate()
+				} else {
+					uni.showToast({
+						title: '没有单重,维护主数据净重',
+					})
+				}
 			},
 		}
 	}

+ 1 - 0
pages/pda/sample/components/inspectionBom.vue

@@ -128,6 +128,7 @@
 					if(Number(L.quantity) > 0 && Number(L.quantity) != NaN && L.id != -1) {
 							this.count = Number(this.count) + Number(L.quantity)
 							this.inspectionList[this.inspectionList.length - 1]['quantity'] = 	this.count
+					
 							this.normalQuality['quantity'] = this.count
 					}
 				

+ 24 - 6
pages/pda/sample/index/index.vue

@@ -6,6 +6,7 @@
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
 				<view class="card_box" v-for="(item,index) in List" :key="index">
+
 					<workOrderBom :item='item' v-if='item' @handleScan='handleWordScan'></workOrderBom>
 
 					<sampleBom :item='item.quality' v-if='item.quality' :isDetails='false'></sampleBom>
@@ -28,7 +29,7 @@
 		workorderList,
 
 	} from '@/api/pda/workOrder.js'
-	
+
 
 	import workOrderBom from '../../feeding/components/workOrderBom.vue'
 	import sampleBom from '../components/sampleBom.vue'
@@ -46,7 +47,9 @@
 				id: null,
 				taskId: null,
 				List: [],
-				count: 0
+				count: 0,
+
+				isLastJob: true
 			}
 		},
 
@@ -62,9 +65,18 @@
 					ids: [this.id],
 					taskId: this.taskId
 				}).then(res => {
+
+					console.log(11)
+					console.log(res)
+
 					this.List = res.map(m => {
 						m.workOrderId = m.id
-						m.quality['sampleList'] = []
+						if (m.quality) {
+							m.quality['sampleList'] = []
+						} else {
+							this.isLastJob = false
+						}
+
 						m.feedType = 2
 						delete m.id
 						return {
@@ -85,7 +97,15 @@
 
 			save() {
 
-				console.log(this.List)
+
+				if (!this.isLastJob) {
+					uni.showToast({
+						icon: 'none',
+						title: '上道工序暂未报工'
+					})
+					return false
+
+				}
 
 
 				this.count = 0;
@@ -105,8 +125,6 @@
 					return false
 				}
 
-
-
 				batchSave(this.List).then(res => {
 					uni.navigateBack()
 

+ 6 - 11
pages/pda/sample/index/jobBooking.vue

@@ -79,19 +79,17 @@
 
 
 
-
-
-
 			getList() {
 				getByIdReport(this.id, this.taskId).then(res => {
 
 					res.workReportInfo = {
-						formingNum: null,
-						formingWeight: null,
 						formedNum: null,
-						formedWeight: null,
 						taskId: this.taskId,
-						reportType: 2
+						reportType: 2,
+
+						formingNum: res.formingNum,
+						formingWeight: res.formingWeight,
+						formedWeight: res.formedWeight,
 
 					}
 					this.objData = res
@@ -127,11 +125,8 @@
 
 
 
-
 				jobSave(this.objData).then(res => {
-					if (res) {
-						uni.navigateBack()
-					}
+					uni.navigateBack()
 				})
 
 

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

@@ -20,15 +20,16 @@
 					</view>
 
 
-	
+
 					<diagramLast :item='item.lastObj' v-if='item'></diagramLast>
 
 
-					<inspectionBom v-if='inspectionList.length' :inspectionList='inspectionList' :normalQuality='item.normalQuality'></inspectionBom>
+					<inspectionBom v-if='inspectionList.length' :inspectionList='inspectionList'
+						:normalQuality='item.normalQuality'></inspectionBom>
+
 
 
 
-                      
 
 				</view>
 			</u-list>
@@ -39,6 +40,8 @@
 		</view>
 
 
+
+
 	</view>
 
 
@@ -78,6 +81,8 @@
 				List: [],
 				inspectionList: [],
 
+				isLastJob: true
+
 
 			}
 		},
@@ -125,7 +130,8 @@
 					taskId: this.taskId,
 
 				}).then(res => {
-			
+				
+
 					this.List = res.map(m => {
 						m.workOrderId = m.id
 						m.instanceList = [] // 物料
@@ -133,9 +139,15 @@
 						m.modelList = [] // 模具
 						m.aridRegionList = [] // 干燥区
 
-						m.normalQuality.quantity = 0
-						m.normalQuality.inspectionId = this.inspectionId
-						m.normalQuality.inspectionName = this.inspectionName
+						if (m.normalQuality != null) {
+							m.normalQuality.quantity = 0
+							m.normalQuality.inspectionId = this.inspectionId
+							m.normalQuality.inspectionName = this.inspectionName
+						} else {
+							this.isLastJob = false
+						}
+
+
 						m.lastObj = {
 							formedNum: m.formedNumLast,
 							taskNameLast: m.taskNameLast,
@@ -158,13 +170,14 @@
 
 
 			getLastTree() {
-				
-				
-				
+
+
+
 				getLastTreeByPid(this.inspectionId).then(res => {
-					console.log(res)
+
 					this.inspectionList = res
 
+
 					this.inspectionList.push({
 						id: -1,
 						name: '废品总数量'
@@ -219,11 +232,21 @@
 
 			save() {
 
-				if (this.List[0].normalQuality.quantity <= 0) {
+				if (!this.isLastJob) {
+					uni.showToast({
+						icon: 'none',
+						title: '上道工序暂未报工'
+					})
+					return false
+
+				}
+
+
+				if (this.List[0].normalQuality.quantity < 0) {
 
 					uni.showToast({
 						icon: 'none',
-						title: '废品数量大于0'
+						title: '废品数量于0'
 					})
 					return false
 				}

+ 8 - 6
pages/pda/sample/inspection/job.vue

@@ -15,9 +15,9 @@
 
 					<qualityStat :normalQuality='objData.normalQuality' v-if='objData'></qualityStat>
 
-					<u-form labelPosition="left" labelWidth="180" labelAlign="left" style="margin-top: 40rpx;">
+					<u-form labelPosition="left" labelWidth="160" labelAlign="center" style="margin-top: 40rpx;">
 
-						<u-form-item label="合格数量:" class="required-form" borderBottom prop="formedNum">
+						<u-form-item label="合格数量" class="required-form" borderBottom prop="formedNum">
 							<input class="uni-input" v-model="formedNum" type='digit'></input>
 						</u-form-item>
 
@@ -104,7 +104,12 @@
 					res.workReportInfo = {
 						formedNum: null,
 						taskId: this.taskId,
-						reportType: 3
+						reportType: 3,
+						
+						formingNum: res.formingNum,
+						formingWeight: res.formingWeight,
+						formedWeight: res.formedWeight,
+						
 					}
 
 					this.formedNumLast = res.formedNumLast
@@ -144,9 +149,6 @@
 					return false
 				}
 
-
-
-
 				jobSave(this.objData).then(res => {
 					uni.navigateBack()
 				})

+ 25 - 7
pages/pda/workOrder/search/index.vue

@@ -45,7 +45,7 @@
 							<view class="listBox-bottom rx">
 								<view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
 									class="items" v-if="!itm.formatter">
-									{{ itm.label }}:{{ item[itm.prop] }}
+									<text>{{ itm.label }}</text>{{ item[itm.prop] }}
 								</view>
 
 
@@ -53,24 +53,24 @@
 
 								<view class="items"
 									v-if='item.rootCategoryLevelId != 11 '>
-									可用库存:{{ item.availableCountBase }} {{item.unit}}
+									<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
 								</view>
 								
 								<view class="items"
 									v-if='item.rootCategoryLevelId == 1 '>
-									包装库存:{{ item.packingCountBase }} {{item.minUnit}}
+									<text>包装库存</text>{{ item.packingCountBase }} {{item.minUnit}}
 								</view>
 
 								<view class="items" v-if='item.rootCategoryLevelId == 11'>
 									<text
-										:style="{ color:  item.status == 0 ? '#157A2C' :'#FFA929' }">状态{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</text>
+										:style="{ color:  item.status == 0 ? '#157A2C' :'#FFA929' }">状态{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</text>
 								</view>
 
 
 
 
 								<view class="items" v-if='item.rootCategoryLevelId == 11'>
-									位置:{{ item.region }}
+									<text>位置</text>{{ item.region }}
 								</view>
 
 
@@ -559,6 +559,7 @@
 			color: #090A0A;
 			font-size: 28rpx;
 			font-style: normal;
+			font-weight: 800;
 		}
 
 		.listBox-bottom {
@@ -568,8 +569,25 @@
 			flex-wrap: wrap;
 
 			.items {
-				width: 50%;
-				margin-top: 8rpx;
+				
+				width: calc(50% - 1px);
+				border-left: 1rpx solid #E3E5E5;
+				border-right: 1rpx solid #E3E5E5;
+				border-bottom: 1rpx solid #E3E5E5;
+				box-sizing: border-box;
+				
+				text{
+					display: inline-block;
+					background: #F7F9FA;
+					padding: 8rpx 10rpx;
+					color: #157A2C;
+					
+				}
+				&:nth-child(1), &:nth-child(2) {
+					border-top: 1rpx solid #E3E5E5;
+					margin-top: 8rpx;
+				}
+			
 			}
 
 		}