ysy hace 2 años
padre
commit
537626a258

+ 16 - 0
api/pda/picking.js

@@ -12,3 +12,19 @@ export async function batchSave(params) {
   }
   return Promise.reject(data.message);
 }
+
+
+// 统计领料数量
+
+export async function pickStatistics() {
+  const data = await postJ(
+   Vue.prototype.apiUrl  + `/pda/mes/workorder/pickStatistics`, {}, true,
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}
+
+
+

+ 1 - 1
api/pda/workOrder.js

@@ -67,7 +67,7 @@ export async function  treeByPid(params) {
 // 查询库存台账首页列表
 export async function  pageeLedgerMain(params) {
   const data = await get(
-   Vue.prototype.apiUrl  + `/wms/inout/pageeLedgerMain`, params,  true,
+   Vue.prototype.apiUrl  + `/wms/outin/getRealTimeInventory`, params,  true,
   );
   if (data.code == 0) {
     return data.data;

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

@@ -6,16 +6,11 @@
 		<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">1</view>
+							<view class="round">{{index + 1}}</view>
 							<view class="code">工单编号:{{item.code}}</view>
 						</view>
 

+ 43 - 5
pages/pda/picking/index/index.vue

@@ -11,14 +11,21 @@
 			</view>
 
 			<view class="nav_box rx-sc" v-if='tabType == 1'>
-				<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 class="nav_item " :class="{active: pickStatus == 0}" @click="handNav(0)">未领料({{navObj.unclaimedQuantity}})</view>
+				<view class="nav_item" :class="{active: pickStatus == 1}" @click="handNav(1)">已领料({{navObj.claimedQuantity}})</view>
 			</view>
 		</view>
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower" v-if="tabType == 1">
-				<pickCard :list="dataList"> </pickCard>
+				<pickCard v-if='dataList.length' :list="dataList"> </pickCard>
+				
+				
+			    <view  v-else style='margin-top: 20vh;'>
+					<u-empty  iconSize='150'  textSize='32' text='暂无工单'>
+					</u-empty>
+				</view>
+				
 			</u-list>
 
 		</view>
@@ -43,6 +50,8 @@
 	import {
 		workorderPage
 	} from '@/api/pda/workOrder.js'
+	
+	import { pickStatistics } from '@/api/pda/picking.js'
 	let [isEnd] = [false]
 
 	export default {
@@ -54,11 +63,17 @@
 				tabType: 1,
 				pickStatus: 1,
 
+                navObj: {
+					unclaimedQuantity: 0,
+					claimedQuantity: 0
+				},
+
 				page: 1,
 				size: 5,
 
 				dataList: [],
 				seletedAll: false, //全选状态
+				
 
 			}
 		},
@@ -74,6 +89,7 @@
 
 		onShow() {
 			this.getList()
+			this.getpickTics()
 		},
 
 		methods: {
@@ -89,7 +105,7 @@
 
 				isEnd = false
 				const res = await workorderPage(params)
-				console.log(res)
+
 
 				if (params.page === 1) {
 					this.dataList = []
@@ -106,6 +122,12 @@
 				isEnd = this.dataList.length >= res.count
 
 			},
+			
+			getpickTics() {
+				pickStatistics().then(res => {
+					this.navObj = res
+				})
+			},
 
 
 			handTab(type) {
@@ -119,6 +141,7 @@
 					this.pickStatus = type
 					
 					this.page = 1
+					this.dataList = []
 					this.getList()
 				}
 			},
@@ -146,7 +169,22 @@
 				}
 			},
 
-			jumpAdd() {},
+			jumpAdd() {
+				let url 
+			  	url = '/pages/pda/picking/details'
+				
+				let arr = []
+				this.dataList.forEach(e => {
+					if(e.checked) {
+						arr.push(e.id)
+					}
+				})
+				let _arr = JSON.stringify(arr)
+				url += `?arr=${encodeURIComponent(_arr)}`
+				uni.navigateTo({
+					url
+				})
+			},
 
 
 			// 相机扫码

+ 4 - 2
pages/pda/workOrder/index/index.vue

@@ -26,8 +26,10 @@
 
 
 				<u-list-item v-if="dataList.length === 0">
-					<u-empty iconSize='150' style='margin-top: 20vh;' textSize='32' text='暂无工单'>
-					</u-empty>
+			          <view style='margin-top: 20vh;'>
+						  <u-empty iconSize='150'  textSize='32' text='暂无工单'>
+						  </u-empty>
+					  </view>
 				</u-list-item>
 
 			</u-list>

+ 6 - 4
pages/pda/workOrder/search/index.vue

@@ -36,8 +36,8 @@
 
 						<view class="listBox-con">
 							<view class="listBox-top rx-bc">
-								<view> {{ item.assetName }}</view>
-								<view class="code">{{ item.assetCode}}</view>
+								<view> {{ item.name }}</view>
+								<view class="code">{{ item.code}}</view>
 							</view>
 
 							<view class="listBox-bottom rx">
@@ -61,8 +61,10 @@
 
 
 			
-			<u-empty v-if='list.length == 0' style='margin-top: 20vh;' iconSize='150' textSize='32' text='暂无数据'>
-			</u-empty>
+	            <view  v-if='list.length == 0' style='margin-top: 20vh;' >
+					<u-empty iconSize='150' textSize='32' text='暂无数据'>
+					</u-empty>
+				</view>
 
 			</u-list>