Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app

huang_an 1 год назад
Родитель
Сommit
217557036d

+ 27 - 9
pages/pda/components/bottomOperate.vue

@@ -64,6 +64,11 @@
 								dataKey="name" filterable format='{name}'></zxz-uni-data-select>
 						</u-form-item>
 
+						<u-form-item label="委外数量:" borderBottom prop="formedNumLast" v-if="clientEnvironmentId == 2">
+							<input class="uni-input content_num" 
+								v-model="outsourceForm.formedNumLast" type='number'></input>
+						</u-form-item>
+
 
 						<u-form-item label="委外到:" borderBottom prop="taskIds">
 							<zxz-uni-data-select :localdata="newStepsList" v-model="outsourceForm.taskIds"
@@ -72,19 +77,20 @@
 						</u-form-item>
 
 
-						<u-form-item label="仓库直发:" borderBottom prop="isStraight">
-							<u-checkbox-group v-model="outsourceForm.isStraight" size="14px">
+						<u-form-item label="直接入库:" borderBottom prop="isInWarehouse">
+							<u-checkbox-group v-model="isInWarehouse" size="14px" v-if="clientEnvironmentId != 2 ">
 								<u-checkbox labelSize="14px" iconSize="10px" activeColor="#157A2C" name="true" label="是"></u-checkbox>
 							</u-checkbox-group>
+							<view v-else>是</view>
 						</u-form-item>
                
-						<u-form-item label="发货仓库:" borderBottom prop="" v-if="outsourceForm.isStraight && outsourceForm.isStraight.length == 1">
+			<!-- 			<u-form-item label="发货仓库:" borderBottom prop="" v-if="isInWarehouse && isInWarehouse.length == 1">
 							<zxz-uni-data-select :localdata="warehouseList" v-model="outsourceForm.warehouseId"
 								dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
-						</u-form-item>
+						</u-form-item> -->
 
 
-						<u-form-item label="工艺路线:" borderBottom prop="produceRoutingId" v-if=" outsourceForm.isStraight && outsourceForm.isStraight.length == 0">
+						<u-form-item label="工艺路线:" borderBottom prop="produceRoutingId" v-if="clientEnvironmentId != 2 &&isInWarehouse && isInWarehouse.length == 0">
 							<zxz-uni-data-select :localdata="produceList" v-model="outsourceForm.produceRoutingId"
 								dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
 						</u-form-item>
@@ -128,7 +134,7 @@
 			</template>
 		</SearchPopup>
 		
-		<outsourceList  ref="outsourceListRef"></outsourceList>
+		<outsourceList  ref="outsourceListRef" @close="outCancel()"></outsourceList>
 
 	</view>
 </template>
@@ -149,7 +155,9 @@
 	
 	import outsourceList from './outsourceList.vue'
 		
-
+	import {
+		EventBus
+	} from '@/utils/eventBus.js'
 
 
 	export default {
@@ -348,6 +356,8 @@
 
 				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
 					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
+					
+					isInWarehouse: []
 
 
 
@@ -383,7 +393,7 @@
 
 					this.outsourceForm = {
 						...res,
-				    isStraight: []
+				    
 
 					}
 					this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
@@ -453,6 +463,7 @@
 			},
 			outCancel() {
 				this.outsourceShow = false
+				EventBus.$off('outEvent');
 			},
 
 			getNewSteps() {
@@ -537,7 +548,12 @@
 					})
 					return false
 				}
-				
+				if(this.clientEnvironmentId == 2) {
+					this.outsourceForm.isInWarehouse = 1
+				} else {
+				 this.isInWarehouse.length > 0 ? this.outsourceForm.isInWarehouse = 1 :   this.outsourceForm.isInWarehouse = 0
+				}
+			
 				let param = {
 					...this.outsourceForm,
 					taskId: this.newTaskObj.currentTaskId,
@@ -545,6 +561,8 @@
 					isRelease: isRelease
 				}
 				
+				console.log(param)
+				
 				this.$refs.outsourceListRef.open(param)
         
 

+ 45 - 16
pages/pda/components/outsourceList.vue

@@ -6,17 +6,32 @@
 			<view class="card_box">
 
 				<view class="item_box rx-bc">
-					<view class="item_one  perce50 rx-sc">
+					<view class="item_one   rx-sc">
 						<view class="lable">委外名称:</view>
-						<view>{{ outObj.name }}</view>
+						<view style="color: #157A2C">{{ outObj.name }}</view>
 					</view>
 
+
+
+				</view>
+
+				<view class="item_box rx-bc">
+					
 					<view class="item_one  perce50 rx-sc">
 						<view class="lable">委外类型:</view>
-						<view>{{ outObj.type == 4 ? '带料委外' : '无料委外' }}</view>
+						<view style="color: #157A2C">{{ outObj.type == 4 ? '带料委外' : '无料委外' }}</view>
+					</view>
+					
+					<view class="item_one  perce50 rx-sc">
+						<view class="lable">直接入库:</view>
+						<view style="color: #157A2C">{{ outObj.isStraight == 1 ? '是' : '否' }}</view>
 					</view>
 
 				</view>
+				
+				
+
+
 
 			</view>
 
@@ -33,7 +48,7 @@
 				<u-list @scrolltolower="scrolltolower" class="z_list">
 
 					<view v-if="actTab == '物品清单'">
-						<view class="rx-bc">
+						<view class="rx-bc" v-if="outObj.isStraight != 1 && clientEnvironmentId != 2">
 							<view style="margin-left: 24rpx">
 								<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选
 								</checkbox>
@@ -48,13 +63,13 @@
 
 
 						<checkbox-group v-for="(item, index) in pickOutInList" :key="index"
-							@change="e => selectVal(e, item, index)">
-							<label class="listBox rx-bs">
+							@change="e => selectVal(e, item, index)" v-if="clientEnvironmentId != 2">
+							<label class="listBox rx-bs" >
 
 								<view class="listBox-sel">
 									<checkbox
 										v-if=' (item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1))'
-										:value="item.code" color="#fff" :disabled="item.disabled"
+										:value="item.code" color="#fff" :disabled="outObj.isStraight == 1"
 										:checked="item.checked" />
 								</view>
 
@@ -148,10 +163,18 @@
 											<text>{{ itm.label }}</text>{{ item[itm.prop] }}
 										</view>
 
-										<view class="items" v-if="item.isDemandQuantity">
-											<text>数量</text>{{ item.demandQuantity  }}
+										<view class="items" v-if="item.isDemandQuantity && clientEnvironmentId != 2">
+											<text>数量</text>{{ item.count * ( checkListLen || 1 )    }}
+										</view>
+										<view class="items content_num" v-if="!item.isDemandQuantity && clientEnvironmentId != 2">
+											<text>数量</text> <input style="8rpx !important"
+												v-model="item.demandQuantity"></input>
+										</view>
+										
+										<view class="items" v-if="item.isDemandQuantity && clientEnvironmentId == 2">
+											<text>数量</text>{{ item.count * ( outObj.formedNumLast || 1 )    }}
 										</view>
-										<view class="items content_num" v-if="!item.isDemandQuantity">
+										<view class="items content_num" v-if="!item.isDemandQuantity && clientEnvironmentId == 2">
 											<text>数量</text> <input style="8rpx !important"
 												v-model="item.demandQuantity"></input>
 										</view>
@@ -306,6 +329,7 @@
 		methods: {
 			open(obj) {
 				this.outObj = obj
+				this.actTab = '物品清单',
 
 				this.outsourceMaterialFn()
 				this.show = true
@@ -343,7 +367,7 @@
 			},
 
 			close() {
-				EventBus.$off('outEvent');
+
 				this.show = false
 			},
 
@@ -421,15 +445,20 @@
 					...this.outObj,
 					isRelease: 0,
 					bomMaterialList: this.bomMaterialList,
-					pickOutInList: this.pickOutInList.filter(f => f.checked == true) ,
+					pickOutInList: this.pickOutInList.filter(f => f.checked == true),
 					materialList: this.materialList,
 					standardOutputList: this.standardOutputList,
 				}
-          
+
 				applyoutsourceSave(param).then(res => {
-				 this.$emit('close', true)
-				   this.close()
-				 
+					uni.showToast({
+						title: "提交成功",
+						icon: "none"
+					})
+					this.$emit('close', true)
+					this.checkListLen = 0
+					this.close()
+
 				})
 			},
 		}

+ 85 - 6
pages/pda/sample/inspection/index.vue

@@ -21,6 +21,8 @@
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="scanIt(item.workOrderId)">扫一扫</u-button>
 
+						<u-button size="small" class="u-reset-button" type="success"
+							@click="handZZCQuality">周转车质检</u-button>
 						<u-button size="small" class="u-reset-button" type="success" @click="handQuality">质检</u-button>
 					</view>
 
@@ -35,9 +37,45 @@
 			</u-list>
 		</view>
 
+
+		<SearchPopup mode="center" v-if="qualityShow">
+			<template v-slot:list>
+				<view class="popup_list">
+
+					<u-form labelPosition="left" :model="qualityForm" labelWidth="180" labelAlign="left" class="">
+						<u-form-item label="质检取样数:" borderBottom prop="num">
+							<input class="uni-input" v-model="qualityForm.num" placeholder="请输入质检取样数"></input>
+						</u-form-item>
+
+					</u-form>
+				</view>
+			</template>
+
+			<template v-slot:operate>
+				<view class="operate_box rx-bc">
+					<u-button size="small" class="u-reset-button" @click="cancel">
+						取消
+					</u-button>
+
+
+					<u-button type="success" size="small" class="u-reset-button" @click="qualityOk">
+						确定
+					</u-button>
+
+				</view>
+			</template>
+
+		</SearchPopup>
+
+
+
+
+
 		<view class="bottom-wrapper">
 			<view class="btn_box" @click="save">确认</view>
 		</view>
+
+
 	</view>
 </template>
 
@@ -58,6 +96,9 @@
 
 	import turnoverBom from "../../sample/components/turnoverBom.vue";
 
+	import SearchPopup from '../../components/searchPopup.vue'
+
+
 	export default {
 		components: {
 			workOrderBom,
@@ -65,6 +106,7 @@
 			deviceBom,
 			diagramLast,
 			turnoverBom,
+			SearchPopup
 		},
 		data() {
 			return {
@@ -73,6 +115,11 @@
 				taskId: null,
 
 				List: [],
+				qualityShow: false,
+				
+				qualityForm: {
+					num: null,
+				}
 
 			};
 		},
@@ -192,8 +239,8 @@
 					}
 				});
 			},
-			handQuality() {
-				console.log(this.List[0]);
+			handZZCQuality() {
+
 				if (this.List[0].turnover.length == 0) {
 					uni.showToast({
 						icon: "none",
@@ -246,12 +293,36 @@
 
 			},
 
-			save() {
-
-
-
+			handQuality() {
+				this.qualityShow = true
+			},
 
+			cancel() {
+				this.qualityShow = false
+			},
+			
+			qualityOk() {
+				if(!this.qualityForm.num && this.qualityForm.num < 1) {
+					uni.showToast({
+						icon: "none",
+						title: "请先输入质检取样数",
+					});
+					return false
+				}
+				let param = {
+					taskId: this.taskId,
+					workOrderId: this.id,
+					quantity: this.qualityForm.num
+				}
+				
+				qualityQy(param).then(res => {
+					this.$set(this.List[0], 'semiProductList', res)
+					this.qualityShow = false
+					this.$forceUpdate()
+				})
+			},
 
+			save() {
 				batchSave(this.List).then((res) => {
 					uni.navigateBack();
 				});
@@ -312,4 +383,12 @@
 			width: 160rpx;
 		}
 	}
+
+
+	.popup_list {
+		width: 78vw;
+		min-height: 120rpx;
+		padding: 0 32rpx;
+
+	}
 </style>