pang.jiabao
2025-12-21 52d26b95ce1c005ca1d13e0a17418c3e52db19a8
刀具库PDA功能开发完善
2个文件已添加
4个文件已修改
2个文件已删除
819 ■■■■■ 已修改文件
pages.json 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mat/matQuery.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/callEmptyTray.vue 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/trayReturn.vue 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/callEmptyTray.vue 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/pakin.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/toolHolderReturn.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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"
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',
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,
pages/order/callEmptyTray.vue
File was deleted
pages/order/trayReturn.vue
File was deleted
pages/pakin/callEmptyTray.vue
New file
@@ -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>
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) {
pages/pakin/toolHolderReturn.vue
New file
@@ -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>