ysy hace 2 años
padre
commit
0d12ced1bc

+ 297 - 6
pages/pda/picking/bill/index.vue

@@ -1,22 +1,313 @@
 <template>
-	<view>
-		
+	<view class="content-box">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料单" background-color="#F7F9FA" color="#000"
+			@clickLeft="back"></uni-nav-bar>
+
+
+		<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>
+
+
+
+						<view class="item">
+							<view class="lable rx-cc">领料仓库</view>
+							<view class="content ">
+
+							</view>
+						</view>
+
+					</view>
+				</view>
+
+
+				<u-list-item v-if="dataList.length === 0">
+					<u-empty iconSize='150' style='margin-top: 20vh;' textSize='32' text='暂无工单'>
+					</u-empty>
+				</u-list-item>
+
+			</u-list>
+		</view>
+
+
+		<view class="bottom-wrapper">
+			<view class="btn_box" @click="save">一键报工</view>
+
+		</view>
+
+
 	</view>
 </template>
 
 <script>
+	import {
+		tableHeader
+	} from '../../common.js'
+	import {
+		workorderPage
+	} from '@/api/pda/workOrder.js'
+	let [isEnd] = [false]
 	export default {
+		components: {
+
+		},
 		data() {
 			return {
-				
+				page: 1,
+				size: 5,
+				dataList: [],
+
+
+
 			}
 		},
+		onShow() {
+			this.getList()
+		},
 		methods: {
-			
+			async getList() {
+				let params = {
+					pageNum: this.page,
+					size: this.size,
+					status: [4, 5, 6, 7],
+					...this.searchFrom
+				}
+
+				isEnd = false
+				const res = await workorderPage(params)
+				console.log(res)
+
+				if (params.page === 1) {
+					this.dataList = []
+				}
+
+				this.dataList.push(...res.list)
+				isEnd = this.dataList.length >= res.count
+
+			},
+
+
+
+
+			scrolltolower() {
+				if (isEnd) return
+				this.page++
+				this.getList()
+			},
+
+
+
+			handleDetail(item) {
+				let url = '/pages/pda/workOrder/extrusionMolding/index'
+				url += `?id=${item.id}&title=${item.taskName}`
+				console.log(url)
+				uni.navigateTo({
+					url
+				})
+
+			},
+
+			tableH(type) {
+				return tableHeader(type)
+			},
+
+			save() {},
+
+
 		}
 	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.content-box {
+		height: 100vh;
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+
+	}
+
+
+
+	.list_box {
+		flex: 1;
+		overflow: hidden;
+		padding: 16rpx 0;
+
+		.u-list {
+			height: 100% !important;
+		}
+	}
+
+
+	.bottom-wrapper {
+		.btn_box {
+			width: 750rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			background: $theme-color;
+			text-align: center;
+			font-size: 36rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: #fff;
+		}
+	}
+
+
+
+	.card_box {
+		margin-top: 10rpx;
+
+
+
+		.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;
+		  background:  $theme-color;
+		  font-size: 28rpx;
+		  color: #fff;
+		  line-height: 64rpx;
+		  padding-left: 40rpx;
+		}
+
+		.content_table {
+			margin-top: 10rpx;
+			width: 702rpx;
+			border: 2rpx solid $border-color;
+
+			.item {
+				display: flex;
+				border-bottom: 2rpx solid $border-color;
+
+
+				.lable {
+					width: 132rpx;
+					text-align: center;
+					background-color: #F7F9FA;
+					font-size: 26rpx;
+					border-right: 2rpx solid $border-color;
+					flex-shrink: 0;
+				}
+
+				.ww80 {
+					width: 80rpx;
+				}
+
+				.content {
+					width: 518rpx;
+					min-height: 64rpx;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					font-style: normal;
+					font-weight: 400;
+					padding: 18rpx 8rpx;
+					box-sizing: border-box;
+					word-wrap: break-word;
+					flex-grow: 1 !important;
+
+				}
+
+				.content_num {
+					display: flex;
+					align-items: center;
+					padding: 0 4rpx;
+
+					/deep/ .uni-input-input {
+						width: 480rpx;
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
 
-</style>
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+	}
+</style>

+ 3 - 3
pages/pda/picking/components/pickCard.vue

@@ -6,11 +6,11 @@
 			<view class="card_box">
 				<view class="item_box rx-bc">
 					<view class="rx-sc">
-						
-						<checkbox  :checked="item.checked" />
+						<checkbox  v-if='item.pickStatus == 0' :checked="item.checked" />
+							
 						<view class="orderId">{{item.code}} </view>
 					</view>
-					<view class="status FAA">未领料</view>
+					<view class="status FAA" :class="[item.pickStatus == 0 ? 'FAA': '' ]"> {{ item.pickStatus == 0 ? '未领料' : '已领料' }}</view>
 				</view>
 
 				<view class="item_box rx-bc">

+ 7 - 1
pages/pda/picking/details.vue

@@ -5,11 +5,17 @@
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
+				
+				
+				<view class="title_box rx-sc">
+					<view class="round">{{index + 1}}</view>
+					<view class="code">工单编号:{{item.code}}</view>
+				</view>
 
 				<view v-for="(item,index) in List" :key="index" class="card_box">
 					<view class="title_box rx-bc">
 						<view class="left rx-sc">
-							<view class="round">{{index + 1}}</view>
+							<view class="round">1</view>
 							<view class="code">工单编号:{{item.code}}</view>
 						</view>
 

+ 14 - 12
pages/pda/picking/index/index.vue

@@ -11,20 +11,19 @@
 			</view>
 
 			<view class="nav_box rx-sc" v-if='tabType == 1'>
-				<view class="nav_item " :class="{active: navType == 1}" @click="handNav(1)">未领料</view>
-				<view class="nav_item" :class="{active: navType == 2}" @click="handNav(2)">已领料</view>
+				<view class="nav_item " :class="{active: pickStatus == 0}" @click="handNav(0)">未领料</view>
+				<view class="nav_item" :class="{active: pickStatus == 1}" @click="handNav(1)">已领料</view>
 			</view>
 		</view>
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower" v-if="tabType == 1">
-
 				<pickCard :list="dataList"> </pickCard>
 			</u-list>
 
 		</view>
 
-		<view class="bottom-wrapper rx-bc">
+		<view class="bottom-wrapper rx-bc" v-if='pickStatus == 0'>
 			<view>
 				<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
 				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
@@ -53,18 +52,18 @@
 		data() {
 			return {
 				tabType: 1,
-				navType: 1,
+				pickStatus: 1,
 
 				page: 1,
 				size: 5,
-				
-dataList: [],
+
+				dataList: [],
 				seletedAll: false, //全选状态
 
 			}
 		},
 
-	//选择的列表长度
+		//选择的列表长度
 		computed: {
 			checkListLen() {
 				let _fitArr = this.dataList.filter(f => f.checked)
@@ -72,7 +71,7 @@ dataList: [],
 			}
 
 		},
-		
+
 		onShow() {
 			this.getList()
 		},
@@ -84,7 +83,7 @@ dataList: [],
 				let params = {
 					pageNum: this.page,
 					size: this.size,
-					status: [4, 5, 6, 7],
+					pickStatus: this.pickStatus,
 
 				}
 
@@ -116,8 +115,11 @@ dataList: [],
 			},
 
 			handNav(type) {
-				if (type != this.navType) {
-					this.navType = type
+				if (type != this.pickStatus) {
+					this.pickStatus = type
+					
+					this.page = 1
+					this.getList()
 				}
 			},