ysy 1 jaar geleden
bovenliggende
commit
dfc75b25c7

+ 67 - 34
pages/pda/components/outsourceList.vue

@@ -16,20 +16,20 @@
 				</view>
 
 				<view class="item_box rx-bc">
-					
+
 					<view class="item_one  perce50 rx-sc">
 						<view class="lable">委外类型:</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.isInWarehouse == 1 ? '是' : '否' }}</view>
 					</view>
 
 				</view>
-				
-				
+
+
 
 
 
@@ -61,20 +61,21 @@
 							<view>勾选:<text style="color: #157A2C">{{ checkListLen ||  0 }}个</text> </view>
 						</view>
 
-						<u-form labelPosition="left" :model="outObj" labelWidth="180" labelAlign="left" class=""  v-if="checkListLen > 0">
-				     	 <u-form-item label="收货仓库:" borderBottom prop="warehouseId" >
+						<u-form labelPosition="left" :model="outObj" labelWidth="180" labelAlign="left" class=""
+							v-if="checkListLen > 0 && clientEnvironmentId != 2">
+							<u-form-item label="收货仓库:" borderBottom prop="warehouseId">
 								<zxz-uni-data-select :localdata="warehouseList" v-model="outObj.warehouseId"
 									dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
-						</u-form-item>  
-					</u-form>
+							</u-form-item>
+						</u-form>
 
 						<checkbox-group v-for="(item, index) in pickOutInList" :key="index"
-							@change="e => selectVal(e, item, index)" v-if="clientEnvironmentId != 2">
-							<label class="listBox rx-bs" >
+							@change="e => selectVal(e, item, index)">
+							<label class="listBox rx-bs">
 
 								<view class="listBox-sel">
 									<checkbox
-										v-if=' (item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1))'
+										v-if=' (item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1)) && clientEnvironmentId != 2'
 										:value="item.code" color="#fff" :disabled="outObj.isStraight == 1"
 										:checked="item.checked" />
 								</view>
@@ -118,14 +119,37 @@
 											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
 											<text>客户代号</text>{{item.extInfo.clientCode }}
 										</view>
-										
-										
+
+
 										<view class="items"
 											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
 											<text>重量</text>{{item.extInfo.newWeight }} {{item.extInfo.weightUnit}}
 										</view>
-										
-									
+
+
+										<view class="items"
+											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1) '>
+											<text>数量</text>{{item.feedQuantity}}
+										</view>
+
+										<view class="items"
+											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1) '>
+											<text>重量</text>{{item.weight || 0}} {{ item.weightUnit}}
+										</view>
+
+										<view class="items"
+											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1) '>
+											<text>规格</text> {{ item.specification}}
+										</view>
+
+										<view class="items"
+											v-if='([1,2,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1) '>
+											<text>型号</text> {{ item.modelType}}
+										</view>
+
+
+
+
 
 
 									</view>
@@ -180,15 +204,17 @@
 										<view class="items" v-if="item.isDemandQuantity && clientEnvironmentId != 2">
 											<text>数量</text>{{ checkListLen == 0 ? item.demandQuantity :  item.count * ( checkListLen || 1 )    }}
 										</view>
-										<view class="items content_num" v-if="!item.isDemandQuantity && clientEnvironmentId != 2">
+										<view class="items content_num"
+											v-if="!item.isDemandQuantity && clientEnvironmentId != 2">
 											<text>数量</text> <input style="8px !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 && clientEnvironmentId == 2">
+										<view class="items content_num"
+											v-if="!item.isDemandQuantity && clientEnvironmentId == 2">
 											<text>数量</text> <input style="8rpx !important"
 												v-model="item.demandQuantity"></input>
 										</view>
@@ -243,7 +269,7 @@
 											class="items" v-if="!itm.formatter">
 											<text>{{ itm.label }}</text>{{ item[itm.prop] }}
 										</view>
-										
+
 										<view class="items content_num">
 											<text>数量</text> <input style="8rpx !important"
 												v-model="item.demandQuantity"></input>
@@ -273,7 +299,7 @@
 					<u-button type="success" size="small" class="u-reset-button" @click="handOK(0)">
 						提交
 					</u-button>
-					
+
 					<u-button type="success" size="small" class="u-reset-button" @click="handOK(1)">
 						提交并发布
 					</u-button>
@@ -360,7 +386,7 @@
 				this.outObj = obj
 				this.actTab = '物品清单',
 
-				this.outsourceMaterialFn()
+					this.outsourceMaterialFn()
 				this.getWarehouseFn()
 				this.show = true
 			},
@@ -374,15 +400,15 @@
 				}
 				checkOutsourceMaterial(param).then(res => {
 					let _arr = []
-						_arr=  [...res.pickOutInList, ...res.materialList]
-						this.pickOutInList = _arr.reduce((acc, item) => {
-						    const existingItem = acc.find(existing => existing.id === item.id);
-						    if (!existingItem) {
-						        acc.push(item);
-						    }
-						    return acc;
-						}, []);
-				
+					_arr = [...res.pickOutInList, ...res.materialList]
+					this.pickOutInList = _arr.reduce((acc, item) => {
+						const existingItem = acc.find(existing => existing.id === item.id);
+						if (!existingItem) {
+							acc.push(item);
+						}
+						return acc;
+					}, []);
+
 
 					this.bomMaterialList = res.bomMaterialList.map((m) => {
 						return {
@@ -396,7 +422,7 @@
 				})
 			},
 
-			
+
 			// 仓库 
 			getWarehouseFn() {
 				getWarehouseList().then(res => {
@@ -485,18 +511,25 @@
 
 			handOK(isRelease) {
 
-				if(this.checkListLen > 0 && !this.outObj.warehouseId) {
-					 uni.showToast({
+				if (this.checkListLen > 0 && !this.outObj.warehouseId) {
+					uni.showToast({
 						title: "请选择仓库",
 						icon: "none"
 					})
 					return
 				}
+				let _pickOutInList = []
+				if (this.clientEnvironmentId = 2) {
+					_pickOutInList = this.pickOutInList
+				} else {
+					_pickOutInList = this.pickOutInList.filter(f => f.checked == true)
+				}
+
 				let param = {
 					...this.outObj,
 					isRelease: isRelease,
 					bomMaterialList: this.bomMaterialList,
-					pickOutInList: this.pickOutInList.filter(f => f.checked == true),
+					pickOutInList: _pickOutInList,
 					materialList: this.materialList,
 					standardOutputList: this.standardOutputList,
 				}

+ 173 - 65
pages/pda/feeding/components/deviceBom.vue

@@ -8,79 +8,82 @@
 				更换设备
 			</view>
 		</view>
+		<u-list @scrolltolower="scrolltolower" class="z_list2">
 
+			<view class="material rx-ss" v-for="(item, index) in list" :key='index'>
 
-		<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">
-				<view class="item">
-					<view class="lable rx-cc">工位名称</view>
-					<view class="content">
-						{{ item.workstationName || (item.extInfo && item.extInfo.workstationName) }}
-					</view>
+				<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">
+					<view class="item">
+						<view class="lable rx-cc">工位名称</view>
+						<view class="content">
+							{{ item.workstationName || (item.extInfo && item.extInfo.workstationName) }}
+						</view>
+					</view>
 
-				<view class="item">
-					<view class="lable rx-cc">设备编码</view>
-					<view class="content">
-						{{ item.code }}
+					<view class="item">
+						<view class="lable rx-cc">设备编码</view>
+						<view class="content">
+							{{ item.code }}
+						</view>
 					</view>
-				</view>
 
-				<view class="item">
-					<view class="lable rx-cc">设备名称</view>
-					<view class="content">{{ item.name }}</view>
-				</view>
+					<view class="item">
+						<view class="lable rx-cc">设备名称</view>
+						<view class="content">{{ item.name }}</view>
+					</view>
 
 
 
-				<view class="item rx-sc">
-					<view class="rx ww50">
-						<view class="lable  rx-cc">固资编码</view>
-						<view class="content">{{ item.extInfo.fixCode }} </view>
+					<view class="item rx-sc">
+						<view class="rx ww50">
+							<view class="lable  rx-cc">固资编码</view>
+							<view class="content">{{ item.extInfo.fixCode }} </view>
 
-					</view>
+						</view>
 
 
-					<view class="rx ww50">
-						<view class="lable ww80 rx-cc">编号</view>
-						<view class="content">{{ item.extInfo.codeNumber }}</view>
+						<view class="rx ww50">
+							<view class="lable ww80 rx-cc">编号</view>
+							<view class="content">{{ item.extInfo.codeNumber }}</view>
+						</view>
+
 					</view>
 
-				</view>
 
 
+					<view class="item">
+
+						<view class="lable rx-cc">炉次号</view>
+						<view class="content content_num">
+							<input class="uni-input" v-model="item.extInfo.heatNumber"></input>
+						</view>
+
+						<view v-if="clientEnvironmentId == 2" class="lable rx-cc"
+							:style="Object.prototype.hasOwnProperty.call(item.extInfo, 'turnoverList') && item.extInfo.turnoverList.length > 0 ? 'color: #E6A23C' : 'color: #157A2C'"
+							@click="handleStorage(index)">货位</view>
 
-				<view class="item">
-		
-					<view class="lable rx-cc">炉次号</view>
-					<view class="content content_num">
-						<input class="uni-input" v-model="item.extInfo.heatNumber"></input>
 					</view>
-                
-					<view v-if="clientEnvironmentId == 2" class="lable rx-cc"
-						:style="Object.prototype.hasOwnProperty.call(item.extInfo, 'turnoverList') && item.extInfo.turnoverList.length > 0 ? 'color: #E6A23C' : 'color: #157A2C'"
-						@click="handleStorage(index)">货位</view>
 
-				</view>
- 
-				<view class="item"  v-if="clientEnvironmentId == 2 && Object.prototype.hasOwnProperty.call(item, 'equipmentLabelJson') && item.equipmentLabelJson.length != 0 && item.equipmentLabelJson[0].SBFL == 1">
-					<view class="lable rx-cc">是否封炉</view>
-					<view class="content"> 
-					<u-checkbox-group v-model="item.isSBFL" size="15px" >
-						<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true" label="是"></u-checkbox>
-					</u-checkbox-group>
+					<view class="item"
+						v-if="clientEnvironmentId == 2 && Object.prototype.hasOwnProperty.call(item, 'equipmentLabelJson') && item.equipmentLabelJson.length != 0 && item.equipmentLabelJson[0].SBFL == 1">
+						<view class="lable rx-cc">是否封炉</view>
+						<view class="content">
+							<u-checkbox-group v-model="item.isSBFL" size="15px">
+								<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
+									label="是"></u-checkbox>
+							</u-checkbox-group>
+						</view>
 					</view>
-				</view>
 
 
 
+				</view>
 			</view>
-		</view>
 
+		</u-list>
 		<SearchPopup mode="center" v-if='popupShow'>
 			<template v-slot:list>
 
@@ -89,8 +92,8 @@
 					<view class="tab_item" :style="tabAct == idxx ? 'color: #E6A23C' : ''"
 						v-for="(idItem, idxx) in turnoverList" :key="idxx" @click="handTab(idxx)">
 						{{ idItem.name }}{{ idxx + 1 }}
-						<uni-icons style="margin-left: 10rpx;" custom-prefix="iconfont" @click.native="handDel(idxx)" v-if="!isDetails"
-							type="icon-shanchu" size="16" color="#fa3534"></uni-icons>
+						<uni-icons style="margin-left: 10rpx;" custom-prefix="iconfont" @click.native="handDel(idxx)"
+							v-if="!isDetails" type="icon-shanchu" size="16" color="#fa3534"></uni-icons>
 					</view>
 
 					<view class="tab_add" @click="handTabAdd()" v-if="!isDetails">新增</view>
@@ -104,16 +107,14 @@
 					<view class="search_list">
 						<u-form labelPosition="left" :model="idItem" labelWidth="160" labelAlign="left"
 							class="baseForm">
-      
+
 							<u-form-item label="周转车:" class="required-form" borderBottom prop="">
 								<zxz-uni-data-select :localdata="turnover" v-model="idItem.turnoverId" dataValue='id'
 									format='{name}-{code}' dataKey="id" filterable :clear='false'
 									@change="e => changeTurnover(e, idxx)" v-if="!isDetails"></zxz-uni-data-select>
-									<text v-else>{{ idItem.turnoverName}} </text>
+								<text v-else>{{ idItem.turnoverName}} </text>
 							</u-form-item>
-							<view class="rx-bs" style="margin-top: 6rpx;" v-if="ishuoWei">
 
-							</view>
 
 						</u-form>
 					</view>
@@ -132,7 +133,75 @@
 								<view class="tr row rx-sc" v-for="(it, idx) in idItem.positionList" :key='idx'>
 									<view class="tr row rx-sc">
 										<view class="item ww10">
-											 {{ it.code }}
+											{{ it.code }}
+										</view>
+										<view class="item ww25 "
+											:class="{'color157': it.workOrderCode === wordItem.code}">
+											{{ it.workOrderCode }}
+										</view>
+										<view class="item ww25 "
+											:class="{'color157': it.workOrderCode === wordItem.code}">
+											{{ it.categoryCode }}
+										</view>
+
+										<view class="item ww20 ">
+											<text>{{ it.quantity }} </text>
+										</view>
+
+										<view class="item ww20">
+											<input
+												:class="['uni-input', wordItem.code == it.workOrderCode && it.quantity > 0 ? 'content_num' : '']"
+												v-model="it.feedNum" type="digit"
+												:disabled="it.quantity <= 0 || wordItem.code != it.workOrderCode || isDetails"
+												@blur="Number(it.feedNum) > Number(it.quantity) ? it.feedNum = Number(it.quantity) : ''"></input>
+										</view>
+
+									</view>
+								</view>
+
+							</u-list>
+
+						</view>
+
+
+					</view>
+
+
+					<u-line color="#2979ff" style="margin: 16rpx 0;"></u-line>
+
+					<!-- 卸车 -->
+					<view class="search_list">
+						<u-form labelPosition="left" :model="idItem" labelWidth="200" labelAlign="left"
+							class="baseForm">
+
+							<u-form-item label="卸到周转车:" class="required-form" borderBottom prop="">
+								<zxz-uni-data-select :localdata="unloadTurnover" v-model="idItem.unloadTurnoverId"
+									dataValue='id' format='{name}-{code}' dataKey="id" filterable :clear='false'
+									@change="e => changeUnloadTurnover(e, idxx, idItem)"
+									v-if="!isDetails"></zxz-uni-data-select>
+								<text v-else>{{ idItem.unloadTurnoverName}} </text>
+							</u-form-item>
+
+
+						</u-form>
+					</view>
+
+
+					<view class="content_table2">
+						<view class="head row rx-sc">
+							<view class="item ww10">货位</view>
+							<view class="item ww25">工单编号</view>
+							<view class="item ww25">产品编码</view>
+							<view class="item ww20">数量</view>
+							<view class="item ww20">投料</view>
+
+						</view>
+						<view class="table">
+							<u-list @scrolltolower="scrolltolower" class="z_list">
+								<view class="tr row rx-sc" v-for="(it, idx) in idItem.unloadPositionList" :key='idx'>
+									<view class="tr row rx-sc">
+										<view class="item ww10">
+											{{ it.code }}
 										</view>
 										<view class="item ww25 "
 											:class="{'color157': it.workOrderCode === wordItem.code}">
@@ -165,11 +234,6 @@
 
 					</view>
 
-		
-		         <u-line color="#2979ff" style="margin: 16rpx 0;"></u-line>
-				   卸货功能
-				
-		
 				</view>
 
 
@@ -246,9 +310,16 @@
 					name: '周转车',
 					turnoverId: '',
 					turnoverName: '',
-					positionList: []
+					positionList: [],
+
+					unloadTurnoverId: '',
+					unloadTurnoverName: '',
+					unloadPositionList: []
 				}],
 
+				unloadTurnover: [],
+
+
 				tabAct: 0
 
 
@@ -272,7 +343,12 @@
 			handleStorage(idx) {
 				this.listIndex = idx || 0
 
-				this.turnoverList = JSON.parse(JSON.stringify(this.list[0].extInfo.turnoverList)) || this.turnoverList
+				if (Object.prototype.hasOwnProperty.call(this.list[0].extInfo, 'turnoverList')) {
+					this.unloadTurnover = this.turnover
+
+					this.turnoverList = JSON.parse(JSON.stringify(this.list[0].extInfo.turnoverList)) || this.turnoverList
+				}
+
 				this.popupShow = true
 
 
@@ -364,7 +440,35 @@
 					return
 				}
 				this.turnoverList.splice(idx, 1)
-			}
+			},
+
+
+			changeUnloadTurnover(e, idxx, idItem) {
+
+
+				let _arr = idItem.positionList
+				let unloadArr = e.extInfo.positionList || []
+
+
+				for (let obj1 of unloadArr) {
+					for (let obj2 of _arr) {
+						if (obj1.code === obj2.code && obj2.workOrderCode === this.wordItem.code && !obj1.workOrderCode &&  !obj1.quantity) {
+							obj1.workOrderCode = obj2.workOrderCode;
+							obj1.categoryCode = obj2.categoryCode;
+							obj1.quantity = obj2.quantity;
+							obj1.feedNum = obj2.feedNum;
+							break;
+						}
+					}
+				}
+
+
+
+				this.$set(this.turnoverList[idxx], 'unloadTurnoverName', e.name + '-' + e.code)
+				this.$set(this.turnoverList[idxx], 'unloadPositionList', JSON.parse(JSON.stringify(unloadArr)))
+				this.$forceUpdate()
+
+			},
 		}
 	}
 </script>
@@ -426,7 +530,7 @@
 
 
 		.content_table {
-			width: 680rpx;
+			width: 674rpx;
 			border: 2rpx solid $border-color;
 			margin-bottom: 10rpx;
 
@@ -606,7 +710,11 @@
 
 
 	.z_list {
-		max-height: 500rpx;
+		max-height: 350rpx;
+	}
+
+	.z_list2 {
+		max-height: 700rpx;
 	}
 
 	.content_num {

+ 2 - 2
pages/pda/feeding/components/workOrderBom.vue

@@ -21,12 +21,12 @@
 				</view>
 
 				<view class="item">
-					<view class="lable rx-cc">产品编码</view>
+					<view class="lable rx-cc">编码</view>
 					<view class="content">{{ item.productCode }}</view>
 				</view>
 
 				<view class="item">
-					<view class="lable rx-cc">产品名称</view>
+					<view class="lable rx-cc">名称</view>
 					<view class="content">{{ item.productName }}</view>
 				</view>
 

+ 2 - 0
pages/pda/feeding/details.vue

@@ -284,6 +284,8 @@
 			 } 
 			   
                 console.log('投料', this.List)
+				
+
 			
 				batchSave(this.List).then(res => {
 

+ 2 - 2
pages/pda/warehousing/components/workOrderBom.vue

@@ -21,12 +21,12 @@
 				</view>
 
 				<view class="item">
-					<view class="lable rx-cc">产品编码</view>
+					<view class="lable rx-cc">编码</view>
 					<view class="content">{{ item.categoryName }}</view>
 				</view>
 
 				<view class="item">
-					<view class="lable rx-cc">产品名称</view>
+					<view class="lable rx-cc">名称</view>
 					<view class="content">{{ item.categoryCode }}</view>
 				</view>
 				

+ 8 - 6
pages/pda/workOrder/extrusionMolding/index.vue

@@ -33,22 +33,24 @@
 					<text class="lable">工艺路线</text>
 					<text>{{ info.produceRoutingName }}</text>
 				</view>
+				
+				<view class="item_list rx-bc">
+					<text class="lable">批次号</text>
+					<text> {{ info.batchNo }}</text>
+				</view>
 
 				<view class="item_list rx-bc">
-					<text class="lable">产品编码</text>
+					<text class="lable">编码</text>
 					<text> {{ info.productCode }}</text>
 				</view>
 
 
-				<view class="item_list rx-bc">
-					<text class="lable">批次号</text>
-					<text> {{ info.batchNo }}</text>
-				</view>
+	
 
 
 
 				<view class="item_list rx-bc">
-					<text class="lable">产品名称</text>
+					<text class="lable">名称</text>
 					<text>{{ info.productName }}</text>
 				</view>