ysy 2 yıl önce
ebeveyn
işleme
3b86eb4b20

+ 32 - 27
pages/pda/feeding/details.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="content-box">
-			<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
-				color="#000" @clickLeft="back"></uni-nav-bar>
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
+			color="#000" @clickLeft="back"></uni-nav-bar>
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
-				
+
 
 				<view v-for="(item,index) in List" :key="index" class="card_box">
 					<view class="title_box rx-bc">
@@ -17,7 +17,7 @@
 						<view class="right_box rx-ec">
 
 							<u-button type="success" size="small" class="u-reset-button"
-								@click="addPicking(item.id, item.instanceList)" text="添加物料"></u-button>
+								@click="addPicking(item.workOrderId, item.instanceList)" text="添加物料"></u-button>
 
 						</view>
 
@@ -53,7 +53,7 @@
 									<view class="content content_num">
 										<input class="uni-input" v-model="mate.demandQuantity" type="digit"></input>
 										<view class="unit">{{mate.unit}}</view>
-									
+
 									</view>
 								</view>
 
@@ -96,8 +96,10 @@
 	import {
 		workorderList
 	} from '@/api/pda/workOrder.js'
-	
-	import { batchSave } from '@/api/pda/picking.js'
+
+	import {
+		batchSave
+	} from '@/api/pda/picking.js'
 
 	export default {
 		components: {
@@ -110,20 +112,20 @@
 				List: [],
 
 				classificationList: [], //分类数据
-				
+
 				taskId: null
 
 
 			}
 		},
 		onLoad(options) {
-				this.title = options.taskName ? options.taskName + '-投料' : '投料'
+			this.title = options.taskName ? options.taskName + '-投料' : '投料'
 			let queryArray = decodeURIComponent(options.arr);
 			this.idsList = JSON.parse(queryArray);
-		
+
 			this.taskId = options.taskId
-	
-           
+
+
 
 			this.getList()
 
@@ -134,7 +136,7 @@
 			uni.$on("setSelectList", (selectList, id) => {
 				console.log(selectList)
 				this.List.forEach(m => {
-					if (m.id == id) {
+					if (m.workOrderId == id) {
 						this.$set(m, 'instanceList', selectList)
 					}
 				})
@@ -151,29 +153,32 @@
 
 			save() {
 				let _arr = []
-				 _arr = this.List.map(m => {
-					 m.workOrderId = m.id
-					 delete m.id
-					 return {
-						 ...m
-					 }
-				 })
-				
+				_arr = this.List.map(m => {
+					m.workOrderId = m.id
+					delete m.id
+					return {
+						...m
+					}
+				})
+
 				batchSave(_arr).then(res => {
-					
+
 					uni.navigateTo({
 						url: `/pages/pda/picking/index/index?pickStatus=1`,
 					});
-					
+
 				})
 			},
 
 			getList() {
 				workorderList(this.idsList).then(res => {
-					this.List = res
-					if(this.taskId) {
-						this.List[0].taskId  = this.taskId
-					}
+					this.List = res.map(m => {
+						m.workOrderId = m.id
+						delete m.id
+						return {
+							...m
+						}
+					})
 				})
 			},
 

+ 22 - 88
pages/pda/picking/bill/index.vue

@@ -6,62 +6,27 @@
 
 		<view class="list_box">
 
-			<u-list @scrolltolower="scrolltolower" key="dataList" :preLoadScreen="page * 10">
-
-				<view class="card_box cx-sc">
-					<view class="title_box rx-sc">
-						<view class="round">1</view>
-						<view class="code">领料单号:62464462</view>
-					</view>
-					<view class="word_order ">工单编号:62464462</view>
-
-					<view class="content_table" v-for="(item, idx) in dataList">
-						<view class="item">
-							<view class="lable rx-cc">编码</view>
-							<view class="content">
-								{{item.assetCode}}
-							</view>
-						</view>
-
-						<view class="item">
-							<view class="lable rx-cc">名称</view>
-							<view class="content">{{item.assetName}}</view>
-						</view>
-
-
-						<view class="item" v-for="(itm, index) in tableH(4)" :key="index">
-							<view class="lable rx-cc">{{ itm.label }}</view>
-							<view class="content">{{ item[itm.prop] }}</view>
-
-						</view>
-
-
-						<view class="item">
-							<view class="lable rx-cc">数量</view>
-							<view class="content content_num">
-								<input class="uni-input" v-model="item.demandQuantity"
-									@blur='item.demandQuantity > item.number ?  item.demandQuantity = item.number : item.needNum'
-									type="digit"></input>
-								<view class="unit">/{{item.unit}}</view>
-
-							</view>
-						</view>
-
-
+			<u-list @scrolltolower="scrolltolower" key="dataList" >
 
+				<view class="card_box cx-sc" v-for="(item, idx) in dataList">
+					
+					<view class="content_table" >
 						<view class="item">
-							<view class="lable rx-cc">领料仓库</view>
-							<view class="content ">
-
+							<view class="lable rx-cc" style="color:#157A2C ;">领料单号</view>
+							<view class="content" style="color:#157A2C;">
+								{{ item.code }}
 							</view>
 						</view>
-
 					</view>
+				
+					<view class="word_order ">工单编号:62464462</view>
+
+	
 				</view>
 
 
-				<u-list-item v-if="dataList.length === 0">
-					<u-empty iconSize='150' style='margin-top: 20vh;' textSize='32' text='暂无工单'>
+				<u-list-item v-if="dataList.length === 0" style='margin-top: 20vh;'>
+					<u-empty iconSize='150'  textSize='32' text='暂无数据'>
 					</u-empty>
 				</u-list-item>
 
@@ -88,15 +53,14 @@
 	import {
 		pickDetails
 	} from '@/api/pda/picking.js'
-	let [isEnd] = [false]
+
 	export default {
 		components: {
 
 		},
 		data() {
 			return {
-				page: 1,
-				size: 5,
+		
 				ids: [],
 				dataList: [],
 
@@ -115,16 +79,11 @@
 			async getList() {
 		
 
-				isEnd = false
+		
 				const res = await pickDetails(this.ids)
-				console.log(res)
-
-				if (params.page === 1) {
-					this.dataList = []
-				}
-
-				this.dataList.push(...res.list)
-				isEnd = this.dataList.length >= res.count
+			
+               
+			   this.dataList = res
 
 			},
 
@@ -132,9 +91,7 @@
 
 
 			scrolltolower() {
-				if (isEnd) return
-				this.page++
-				this.getList()
+			
 			},
 
 
@@ -194,39 +151,16 @@
 
 
 
-		.title_box {
-			width: 702rpx;
-
-			.round {
-				width: 32rpx;
-				height: 32rpx;
-				line-height: 32rpx;
-				border-radius: 50%;
-				background: $theme-color;
-				color: #fff;
-				text-align: center;
-				font-size: 20rpx;
-			}
-
-			.code {
-				margin-left: 16rpx;
-				font-family: PingFang SC;
-				font-size: 28rpx;
-				font-style: normal;
-				font-weight: 400;
-				color: $theme-color;
-			}
-		}
-
 
 		.word_order {
 			height: 64rpx;
-			width: 750rpx;
+				width: 706rpx;
 			background: $theme-color;
 			font-size: 28rpx;
 			color: #fff;
 			line-height: 64rpx;
 			padding-left: 40rpx;
+			box-sizing: border-box;
 		}
 
 		.content_table {

+ 13 - 12
pages/pda/picking/details.vue

@@ -17,7 +17,7 @@
 						<view class="right_box rx-ec">
 
 							<u-button type="success" size="small" class="u-reset-button"
-								@click="addPicking(item.id, item.instanceList)" text="添加物料"></u-button>
+								@click="addPicking(item.workOrderId, item.instanceList)" text="添加物料"></u-button>
 
 						</view>
 
@@ -130,9 +130,8 @@
 			uni.$off("setSelectList");
 
 			uni.$on("setSelectList", (selectList, id) => {
-				console.log(selectList)
 				this.List.forEach(m => {
-					if (m.id == id) {
+					if (m.workOrderId == id) {
 						this.$set(m, 'instanceList', selectList)
 					}
 				})
@@ -153,16 +152,13 @@
 					 if(m.bomDetailDTOS.length > 0) {
 						 m.bomDetailDTOS = m.bomDetailDTOS.filter(f => f.checked)
 					 }
-				
-					 m.workOrderId = m.id
-					 delete m.id
 					 return {
-						 ...m
+						  ...m	
 					 }
+					
 				 })
 				
 				batchSave(_arr).then(res => {
-					
 					uni.navigateTo({
 						url: `/pages/pda/picking/index/index?pickStatus=1`,
 					});
@@ -172,10 +168,15 @@
 
 			getList() {
 				workorderList(this.idsList).then(res => {
-					this.List = res
-					if(this.taskId) {
-						this.List[0].taskId  = this.taskId
-					}
+					
+					this.List = res.map(m => {
+						 m.workOrderId = m.id
+						 delete m.id
+						 return {
+						 	 ...m					
+						 }
+					})
+					
 				})
 			},