From f512b30f112a4f5c60c6d4cb6f94ee032480adc3 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期日, 21 十二月 2025 16:22:19 +0800
Subject: [PATCH] PDA相关功能开发

---
 pages/order/orderComb.vue     |    4 
 pages/order/trayReturn.vue    |  215 +++++++++++++++++++++++
 pages/home/home.vue           |   56 +++--
 pages.json                    |   14 +
 pages/order/orderSelect.vue   |    2 
 pages/order/callEmptyTray.vue |  213 +++++++++++++++++++++++
 6 files changed, 480 insertions(+), 24 deletions(-)

diff --git a/pages.json b/pages.json
index ca2ab5c..e1dcde7 100644
--- a/pages.json
+++ b/pages.json
@@ -283,6 +283,20 @@
 			}
 		},
 		{
+			"path" : "pages/order/callEmptyTray",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/order/trayReturn",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path" : "pages/order/orderPickConfirm",
 			"style" : 
 			{
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 86503a6..5c570a8 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -41,19 +41,33 @@
 				store: '',
 				elements: [],
 				elements2: [
-					{
-						title: '缁勬墭鍏ュ簱',
-						name: 'pakin',
-						color: 'cyan',
-						cuIcon: 'pullup',
-						url: '/pakin/pakin'
-					},		
+					// {
+					// 	title: '缁勬墭鍏ュ簱',
+					// 	name: 'pakin',
+					// 	color: 'cyan',
+					// 	cuIcon: 'pullup',
+					// 	url: '/pakin/pakin'
+					// },		
 					{
 					title: '璁㈠崟缁勬墭',
 					name: 'orderComb',
 					color: 'olive',
 					cuIcon: 'pulldown',
 					url: '/order/orderComb'
+					},
+					{
+						title: '鍛煎彨绌烘墭',
+						name: 'callEmptyTray',
+						color: 'orange',
+						cuIcon: 'pullup',
+						url: '/order/callEmptyTray'
+					},
+					{
+						title: '鎵樼洏鍥炲簱',
+						name: 'trayReturn',
+						color: 'yellow',
+						cuIcon: 'pullup',
+						url: '/order/trayReturn'
 					},
 					// {
 					// 	title: '骞冲簱缁勬墭',
@@ -62,20 +76,20 @@
 					// 	cuIcon: 'pullup',
 					// 	url: '/pakin/putOn'
 					// },
-					{
-						title: '骞冲簱涓婃灦',
-						name: 'WarehouseIn',
-						color: 'purple',
-						cuIcon: 'text',
-						url: '/pakin/WarehouseIn'
-					},
-					{
-						title: '骞冲簱涓嬫灦',
-						name: 'orderPutOn',
-						color: 'yellow',
-						cuIcon: 'pullup',
-						url: '/warehouse/orderList'
-					},
+					// {
+					// 	title: '骞冲簱涓婃灦',
+					// 	name: 'WarehouseIn',
+					// 	color: 'purple',
+					// 	cuIcon: 'text',
+					// 	url: '/pakin/WarehouseIn'
+					// },
+					// {
+					// 	title: '骞冲簱涓嬫灦',
+					// 	name: 'orderPutOn',
+					// 	color: 'yellow',
+					// 	cuIcon: 'pullup',
+					// 	url: '/warehouse/orderList'
+					// },
 					// ,
 					// {
 					// 	title: '骞舵澘鍏ュ簱',
diff --git a/pages/order/callEmptyTray.vue b/pages/order/callEmptyTray.vue
new file mode 100644
index 0000000..8740178
--- /dev/null
+++ b/pages/order/callEmptyTray.vue
@@ -0,0 +1,213 @@
+	<template>
+		<view class="container">
+			<uni-nav-bar left-icon="left" title="鍛煎彨绌烘枡妗嗗嚭搴�" @clickLeft="back" :fixed="true" :border="false" />
+
+			<!-- 杈撳叆鍖� -->
+			<view class="code">
+				<!-- 鐩爣绔欑偣 -->
+				<view class="item full-item">
+					<view class="code-decs">鐩爣绔欑偣:</view>
+					<input type="text" placeholder="鎵爜 / 杈撳叆" v-model="staNo" class="full-input" />
+				</view>
+
+				<!-- 鎵樼洏绫诲瀷 -->
+				<view class="item full-item">
+					<view class="code-decs">鎵樼洏绫诲瀷:</view>
+					<radio-group @change="onLocTypeChange" class="full-radio">
+						<label class="radio">
+							<radio value="1" :checked="locType === '1'" />绐�
+						</label>
+						<label class="radio">
+							<radio value="2" :checked="locType === '2'" />瀹�
+						</label>
+					</radio-group>
+				</view>
+
+				<!-- 鏁伴噺 -->
+				<view class="item full-item">
+					<view class="code-decs">鏁伴噺:</view>
+					<view class="count-box full-count">
+						<button class="count-btn" @click="decreaseCount">-</button>
+						<input type="number" v-model.number="count" min="1" class="count-input" />
+						<button class="count-btn" @click="increaseCount">+</button>
+					</view>
+				</view>
+			</view>
+
+			<!-- 搴曢儴鎸夐挳 -->
+			<view class="buttom">
+				<button size="mini" @click="reset">閲嶇疆</button>
+				<button size="mini" type="primary" @click="submitCall">鎻愪氦</button>
+			</view>
+		</view>
+	</template>
+	<script>
+		export default {
+			data() {
+				return {
+					baseUrl: '',
+					token: '',
+					staNo: '',
+					locType: '1', // 榛樿绐�
+					count: 1
+				}
+			},
+			onShow() {
+				this.baseUrl = uni.getStorageSync('baseUrl')
+				this.token = uni.getStorageSync('token')
+			},
+			methods: {
+				back() {
+					uni.navigateBack()
+				},
+				onLocTypeChange(e) {
+					this.locType = e.detail.value
+				},
+				increaseCount() {
+					this.count++
+				},
+				decreaseCount() {
+					if (this.count > 1) this.count--
+				},
+				reset() {
+					this.staNo = ''
+					this.locType = '1'
+					this.count = 1
+				},
+				submitCall() {
+					if (!this.staNo) {
+						uni.showToast({
+							title: '璇疯緭鍏ョ洰鏍囩珯鐐�',
+							icon: 'none'
+						})
+						return
+					}
+					uni.request({
+						url: this.baseUrl + '/mobile/callEmptyBinOutBound',
+						method: 'POST',
+						header: {
+							token: this.token,
+							'Content-Type': 'application/json'
+						},
+						data: {
+							staNo: this.staNo,
+							locType: this.locType,
+							count: this.count
+						},
+						success: res => {
+							res = res.data
+							if (res.code === 200) {
+								uni.showToast({
+									title: '鍛煎彨鎴愬姛',
+									icon: 'success'
+								})
+								this.reset()
+							} else {
+								uni.showToast({
+									title: res.msg || '鍛煎彨澶辫触',
+									icon: 'none'
+								})
+							}
+						}
+					})
+				}
+			}
+		}
+	</script>
+	<style>
+		@import url('../../static/css/wms.css/wms.css');
+
+		.container {
+			height: 100vh;
+			display: flex;
+			flex-direction: column;
+			/* justify-content: space-between; */
+		}
+
+		/* 搴曢儴鎸夐挳 */
+		.buttom {
+			width: 100%;
+			display: flex;
+			justify-content: space-around;
+			padding: 20rpx 0;
+		}
+
+		/* 杈撳叆琛� */
+		.full-item {
+			height: 100rpx;
+			display: flex;
+			align-items: center;
+			padding: 0 20rpx;
+		}
+
+		/* 宸︿晶鏂囧瓧鍥哄畾瀹藉害 */
+		.code-decs {
+			width: 200rpx;
+			/* 鍙牴鎹疄闄呰皟鑺� */
+			font-size: 36rpx;
+			color: #303133;
+		}
+
+		/* 鍙充晶鎺т欢鍗犲墿浣欑┖闂� */
+		.full-input,
+		.full-radio,
+		.full-count {
+			flex: 1;
+		}
+
+		/* 杈撳叆妗� */
+		.full-input {
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 36rpx;
+			padding: 0 20rpx;
+			border-radius: 12rpx;
+			border: 1px solid #dcdcdc;
+		}
+
+		/* 鍗曢�夋寜閽� */
+		.full-radio {
+			display: flex;
+			justify-content: flex-start;
+		}
+
+		.radio {
+			padding: 20rpx 40rpx;
+			border: 1px solid #dcdcdc;
+			border-radius: 16rpx;
+			margin-right: 20rpx;
+			font-size: 36rpx;
+			display: flex;
+			align-items: center;
+		}
+
+
+		/* 鏁伴噺 */
+		.count-box {
+			display: flex;
+			align-items: center;
+			border-radius: 12rpx;
+			overflow: hidden;
+			border: 1px solid #dcdcdc;
+		}
+
+		.count-btn {
+			width: 100rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 40rpx;
+			background-color: #f5f5f5;
+			text-align: center;
+			border: none;
+		}
+
+		.count-input {
+			width: 120rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 36rpx;
+			text-align: center;
+			border: none;
+			outline: none;
+		}
+	</style>
\ No newline at end of file
diff --git a/pages/order/orderComb.vue b/pages/order/orderComb.vue
index df9e280..e2b6b77 100644
--- a/pages/order/orderComb.vue
+++ b/pages/order/orderComb.vue
@@ -218,7 +218,7 @@
 			getOrderDet() {
 				let that = this
 				uni.request({
-					url: that.baseUrl + '/order/list/orderNo',
+					url: that.baseUrl + '/order/pakin/order/list/orderNo',
 					data: {orderNo: that.orderNo} ,
 					method: 'GET',
 					success(res) {
@@ -237,7 +237,7 @@
 			getOrderNoList() {
 				let that = this
 				uni.request({
-					url: this.baseUrl + '/order/comb/list/all',
+					url: this.baseUrl + '/order/pakin/order/nav/list/auth',
 					header: {
 						'token': uni.getStorageSync('token')
 					},
diff --git a/pages/order/orderSelect.vue b/pages/order/orderSelect.vue
index 6fa2fbe..e899048 100644
--- a/pages/order/orderSelect.vue
+++ b/pages/order/orderSelect.vue
@@ -144,7 +144,7 @@
 			getOrderNoList() {
 				let that = this
 				uni.request({
-					url: this.baseUrl + '/order/comb/list/all',
+					url: this.baseUrl + '/order/pakin/order/nav/list/auth',
 					header: {
 						'token': uni.getStorageSync('token')
 					},
diff --git a/pages/order/trayReturn.vue b/pages/order/trayReturn.vue
new file mode 100644
index 0000000..b747733
--- /dev/null
+++ b/pages/order/trayReturn.vue
@@ -0,0 +1,215 @@
+<template>
+  <view>
+    <uni-nav-bar
+      left-icon="left"
+      title="鎵樼洏鍥炲簱"
+      @clickLeft="back"
+      :fixed="true"
+      :border="false"
+    />
+
+    <!-- 杈撳叆鍖� -->
+    <view class="code">
+      <!-- 璧峰绔欑偣 -->
+      <view class="item">
+        <view class="code-decs">璧峰绔欑偣:</view>
+        <input
+          type="text"
+          placeholder="鎵爜 / 杈撳叆"
+          v-model="site"
+          :focus="siteFocus"
+          @confirm="siteConfirm"
+        />
+      </view>
+
+      <!-- 鎵樼洏鏉$爜 -->
+      <view class="item">
+        <view class="code-decs">鎵樼洏鏉$爜:</view>
+        <input
+          type="text"
+          placeholder="鎵爜 / 杈撳叆"
+          v-model="barcode"
+          :focus="barcodeFocus"
+        />
+      </view>
+
+      <!-- 鎵樼洏鐘舵�� -->
+      <view class="item">
+        <view class="code-decs">鎵樼洏鐘舵��:</view>
+        <radio-group @change="onEmptyFlagChange">
+          <label class="radio">
+            <radio value="1" :checked="emptyFlag === '1'" /> 鏈夎揣
+          </label>
+          <label class="radio">
+            <radio value="2" :checked="emptyFlag === '2'" /> 绌烘墭
+          </label>
+        </radio-group>
+      </view>
+    </view>
+
+    <!-- 搴曢儴鎸夐挳 -->
+    <view class="buttom">
+      <button size="mini" @click="reset">閲嶇疆</button>
+      <button size="mini" type="primary" @click="confirmCall">纭</button>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      baseUrl: '',
+      token: '',
+
+      site: '',
+      barcode: '',
+      emptyFlag: '1', // 榛樿鏈夎揣
+
+      siteFocus: true,     // 榛樿鑱氱劍 site
+      barcodeFocus: false
+    }
+  },
+
+  onShow() {
+    this.baseUrl = uni.getStorageSync('baseUrl')
+    this.token = uni.getStorageSync('token')
+  },
+
+  methods: {
+    back() {
+      uni.navigateBack()
+    },
+
+    // 鎵畬 site 鑷姩璺冲埌 barcode
+    siteConfirm() {
+      if (!this.site) return
+
+      this.siteFocus = false
+      this.$nextTick(() => {
+        this.barcodeFocus = true
+      })
+    },
+
+    onEmptyFlagChange(e) {
+      this.emptyFlag = e.detail.value
+    },
+
+    confirmCall() {
+      if (!this.site) {
+        uni.showToast({ title: '璇疯緭鍏ヨ捣濮嬬珯鐐�', icon: 'none' })
+        return
+      }
+      if (!this.barcode) {
+        uni.showToast({ title: '璇锋壂鎻忔墭鐩樻潯鐮�', icon: 'none' })
+        return
+      }
+
+      uni.request({
+        url: this.baseUrl + '/mobile/callEmptyBinInBound',
+        method: 'POST',
+        header: {
+          token: this.token,
+          'Content-Type': 'application/json'
+        },
+        data: {
+          site: this.site,
+          barcode: this.barcode,
+          emptyFlag: this.emptyFlag
+        },
+        success: res => {
+          res = res.data
+          if (res.code === 200) {
+            uni.showToast({ title: '鍥炲簱鍛煎彨鎴愬姛', icon: 'success' })
+            this.reset()
+          } else {
+            uni.showToast({ title: res.msg || '鍥炲簱澶辫触', icon: 'none' })
+          }
+        }
+      })
+    },
+
+    reset() {
+      this.site = ''
+      this.barcode = ''
+      this.emptyFlag = '1'
+
+      // 閲嶇疆鐒︾偣
+      this.barcodeFocus = false
+      this.$nextTick(() => {
+        this.siteFocus = true
+      })
+    }
+  }
+}
+</script>
+
+<style>
+@import url('../../static/css/wms.css/wms.css');
+
+/* 杈撳叆鍖烘暣浣� */
+.code {
+  width: 100%;
+  background-color: #fff;
+  padding-top: 0;        /* 瑙e喅鈥滅洰鏍囩珯鐐逛笂鏂瑰ぇ绌虹櫧鈥� */
+}
+
+/* 姣忎竴琛� */
+.item {
+  display: flex;
+  align-items: center;
+  height: 120rpx;        /* 琛岄珮鎷夊紑 */
+  padding: 0 24rpx;
+  border-bottom: 1px solid #ebeef5;
+}
+
+/* 宸︿晶鏂囧瓧 */
+.code-decs {
+  width: 220rpx;         /* 宸﹀彸涓ユ牸瀵归綈鍏抽敭 */
+  font-size: 38rpx;
+  font-weight: 500;
+  color: #303133;
+}
+
+/* 杈撳叆妗嗙粺涓� */
+.item input {
+  flex: 1;
+  height: 80rpx;
+  line-height: 80rpx;
+  font-size: 38rpx;
+  padding: 0 20rpx;
+  border: 1px solid #dcdfe6;
+  border-radius: 10rpx;
+  box-sizing: border-box;
+}
+
+/* 鍗曢�夋鍖哄煙 */
+radio-group {
+  display: flex;
+  align-items: center;
+}
+
+/* 鍗曢�夐」 */
+.radio {
+  margin-right: 40rpx;
+  font-size: 36rpx;
+  display: flex;
+  align-items: center;
+}
+
+/* radio 鏈綋鏀惧ぇ涓�鐐癸紙PDA 濂界偣锛� */
+.radio radio {
+  transform: scale(1.2);
+  margin-right: 10rpx;
+}
+
+/* 搴曢儴鎸夐挳 */
+.buttom {
+  position: fixed;
+  bottom: 20rpx;
+  width: 100%;
+  display: flex;
+  justify-content: space-around;
+}
+
+</style>

--
Gitblit v1.9.1