From 52d26b95ce1c005ca1d13e0a17418c3e52db19a8 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期日, 21 十二月 2025 18:04:23 +0800
Subject: [PATCH] 刀具库PDA功能开发完善
---
/dev/null | 215 -------------------
pages/home/home.vue | 59 +++-
pages/pakin/callEmptyTray.vue | 168 +++++++++++++++
pages.json | 11
pages/pakin/toolHolderReturn.vue | 138 ++++++++++++
pages/mat/matQuery.vue | 2
pages/pakin/pakin.vue | 13
7 files changed, 364 insertions(+), 242 deletions(-)
diff --git a/pages.json b/pages.json
index e1dcde7..438c41e 100644
--- a/pages.json
+++ b/pages.json
@@ -283,14 +283,21 @@
}
},
{
- "path" : "pages/order/callEmptyTray",
+ "path" : "pages/pakin/callEmptyTray",
"style" :
{
"navigationStyle": "custom"
}
},
{
- "path" : "pages/order/trayReturn",
+ "path" : "pages/pakin/toolHolderReturn",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path" : "pages/pakin/inboundStart",
"style" :
{
"navigationStyle": "custom"
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 5c570a8..f4bae88 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -41,34 +41,55 @@
store: '',
elements: [],
elements2: [
- // {
- // title: '缁勬墭鍏ュ簱',
- // name: 'pakin',
- // color: 'cyan',
- // cuIcon: 'pullup',
- // url: '/pakin/pakin'
- // },
{
- title: '璁㈠崟缁勬墭',
- name: 'orderComb',
- color: 'olive',
- cuIcon: 'pulldown',
- url: '/order/orderComb'
+ title: '缁勬墭缁戝畾',
+ name: 'pakin',
+ color: 'cyan',
+ cuIcon: 'pullup',
+ url: '/pakin/pakin'
},
{
- title: '鍛煎彨绌烘墭',
- name: 'callEmptyTray',
+ title: '鍏ュ簱鍚姩',
+ name: 'inboundStart',
color: 'orange',
cuIcon: 'pullup',
- url: '/order/callEmptyTray'
+ url: '/pakin/inboundStart'
},
{
- title: '鎵樼洏鍥炲簱',
- name: 'trayReturn',
+ title: '绌虹鍑哄簱',
+ name: 'callEmptyTray',
color: 'yellow',
cuIcon: 'pullup',
- url: '/order/trayReturn'
- },
+ url: '/pakin/callEmptyTray'
+ },
+ {
+ title: '鍒�鏋惰繑鍥�',
+ name: 'toolHolderReturn',
+ color: 'purple',
+ cuIcon: 'pullup',
+ url: '/pakin/toolHolderReturn'
+ },
+ // {
+ // 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: '骞冲簱缁勬墭',
// name: 'putOn',
diff --git a/pages/mat/matQuery.vue b/pages/mat/matQuery.vue
index b1148c0..e223870 100644
--- a/pages/mat/matQuery.vue
+++ b/pages/mat/matQuery.vue
@@ -155,7 +155,7 @@
return;
}
uni.request({
- url: that.baseUrl + '/mat/list/pda/page/auth',
+ url: that.baseUrl + '/mat/list/pda/auth',
data: {
curr:that.curr,
limit: 20,
diff --git a/pages/order/callEmptyTray.vue b/pages/order/callEmptyTray.vue
deleted file mode 100644
index 8740178..0000000
--- a/pages/order/callEmptyTray.vue
+++ /dev/null
@@ -1,213 +0,0 @@
- <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/trayReturn.vue b/pages/order/trayReturn.vue
deleted file mode 100644
index b747733..0000000
--- a/pages/order/trayReturn.vue
+++ /dev/null
@@ -1,215 +0,0 @@
-<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>
diff --git a/pages/pakin/callEmptyTray.vue b/pages/pakin/callEmptyTray.vue
new file mode 100644
index 0000000..a6e15bf
--- /dev/null
+++ b/pages/pakin/callEmptyTray.vue
@@ -0,0 +1,168 @@
+<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>
+ <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: '',
+ count: 1
+ }
+ },
+
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl')
+ this.token = uni.getStorageSync('token')
+ },
+
+ methods: {
+ back() {
+ uni.navigateBack()
+ },
+
+ increaseCount() {
+ this.count++
+ },
+
+ decreaseCount() {
+ if (this.count > 1) this.count--
+ },
+
+ reset() {
+ this.count = 1
+ },
+
+ submitCall() {
+ if (!this.count || this.count <= 0) {
+ uni.showToast({
+ title: '鏁伴噺蹇呴』澶т簬 0',
+ icon: 'none'
+ })
+ return
+ }
+
+ uni.request({
+ url: this.baseUrl + '/mobile/emptyBoxOutbound/auth',
+ method: 'GET',
+ header: {
+ token: this.token
+ },
+ data: {
+ 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;
+}
+
+/* 搴曢儴鎸夐挳 */
+.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;
+}
+
+/* 鏁伴噺 */
+.count-box {
+ flex: 1;
+ 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>
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index 4fc7979..9e7823f 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -449,12 +449,15 @@
success(result) {
var res = result.data
if (res.code === 200) {
+ uni.showToast({
+ title: '缁勬墭鎴愬姛',
+ icon: 'success',
+ duration: 1500
+ })
+ // const innerAudioContext = uni.createInnerAudioContext();
+ // innerAudioContext.src = '/static/music/pakinOk.mp3';
+ // innerAudioContext.play()
that.resst();
- that.messageText = "缁勬墭鎴愬姛"
- that.messageToggle('success')
- const innerAudioContext = uni.createInnerAudioContext();
- innerAudioContext.src = '/static/music/pakinOk.mp3';
- innerAudioContext.play()
that.dataList = []
uni.setStorageSync('pakinDataList', that.dataList);
} else if (res.code == 403) {
diff --git a/pages/pakin/toolHolderReturn.vue b/pages/pakin/toolHolderReturn.vue
new file mode 100644
index 0000000..cf8c8db
--- /dev/null
+++ b/pages/pakin/toolHolderReturn.vue
@@ -0,0 +1,138 @@
+<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="djNo" :focus="djNoFocus" @confirm="confirmCall" />
+ </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: '',
+ djNo: '',
+ djNoFocus: true, // 榛樿鑱氱劍
+ }
+ },
+
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl')
+ this.token = uni.getStorageSync('token')
+ },
+
+ methods: {
+ back() {
+ uni.navigateBack()
+ },
+
+ // 鎻愪氦鍒�鏋跺彿
+ confirmCall() {
+ if (!this.djNo) {
+ uni.showToast({
+ title: '璇疯緭鍏ュ垁鏋跺彿',
+ icon: 'none'
+ })
+ return
+ }
+
+ uni.request({
+ url: this.baseUrl + '/mobile/djReturn/auth',
+ method: 'GET',
+ header: {
+ token: this.token
+ },
+ data: {
+ djNo: this.djNo
+ },
+ 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.djNo = ''
+ this.djNoFocus = false
+ this.$nextTick(() => {
+ this.djNoFocus = true
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+ @import url('../../static/css/wms.css/wms.css');
+
+ /* 杈撳叆鍖烘暣浣� */
+ .code {
+ width: 100%;
+ background-color: #fff;
+ padding-top: 0;
+ }
+
+ /* 姣忎竴琛� */
+ .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;
+ }
+
+ /* 搴曢儴鎸夐挳 */
+ .buttom {
+ position: fixed;
+ bottom: 20rpx;
+ width: 100%;
+ display: flex;
+ justify-content: space-around;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.1