pang.jiabao
2025-12-21 4eacf08d80778c9a5a16580955161d22f8ae9455
入库启动功能
1个文件已添加
115 ■■■■■ 已修改文件
pages/pakin/inboundStart.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/inboundStart.vue
New file
@@ -0,0 +1,115 @@
<template>
  <view>
    <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>
        <radio-group v-model="type" class="full-radio">
          <radio class="radio" value="1">满箱入库</radio>
          <radio class="radio" value="2">空箱入库</radio>
        </radio-group>
      </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: '',
      type: '1' // 默认选中满箱入库,字符串类型
    }
  },
  onShow() {
    this.baseUrl = uni.getStorageSync('baseUrl')
    this.token = uni.getStorageSync('token')
  },
  methods: {
    back() {
      uni.navigateBack()
    },
    reset() {
      this.type = '1'
    },
    submitCall() {
      uni.request({
        url: this.baseUrl + '/inboundStart/auth',
        method: 'GET',
        header: { token: this.token },
        data: { type: this.type },
        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');
.code {
  width: 100%;
  background-color: #fff;
  padding-top: 0;
}
.item {
  display: flex;
  flex-direction: column; /* 左右文字占一行 */
  justify-content: center;
  height: 140rpx; /* 上下间距宽 */
  padding: 0 24rpx;
  border-bottom: 1px solid #ebeef5;
}
.code-decs {
  font-size: 38rpx;
  font-weight: 500;
  color: #303133;
  margin-bottom: 20rpx;
}
.full-radio {
  display: flex;
  justify-content: flex-start;
}
.radio {
  margin-right: 40rpx;
  font-size: 36rpx;
  display: flex;
  align-items: center;
}
.buttom {
  position: fixed;
  bottom: 20rpx;
  width: 100%;
  display: flex;
  justify-content: space-around;
}
</style>