数量出库
This commit is contained in:
parent
be2da4fca6
commit
76ca7b7de3
|
|
@ -13,7 +13,12 @@
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
|
||||||
<scroll-view scroll-y class="scroll-container">
|
<scroll-view scroll-y class="scroll-container">
|
||||||
<view v-for="(item, index) in detailsList" :key="index" class="table-list-item">
|
<view
|
||||||
|
v-for="(item, index) in detailsList"
|
||||||
|
:key="index"
|
||||||
|
class="table-list-item"
|
||||||
|
@tap="onCodingItem(item)"
|
||||||
|
>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||||
|
|
@ -112,6 +117,25 @@ const getOutboundDetailsData = async () => {
|
||||||
console.log('详情数据', res)
|
console.log('详情数据', res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 点击跳转出库页面
|
||||||
|
const onCodingItem = (item) => {
|
||||||
|
const { status, manageType } = item
|
||||||
|
|
||||||
|
if (status == 2) {
|
||||||
|
uni.showToast({ title: '该物资已完成出库!', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let codingUrl = ''
|
||||||
|
if (manageType === 0) {
|
||||||
|
codingUrl = '/pages/picking/outbound/code-outbound' // 编码出库
|
||||||
|
}
|
||||||
|
if (manageType === 1) {
|
||||||
|
codingUrl = '/pages/picking/outbound/num-outbound' // 数量出库
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({ url: codingUrl })
|
||||||
|
}
|
||||||
|
|
||||||
// 页面加载完毕
|
// 页面加载完毕
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getOutboundDetailsData()
|
getOutboundDetailsData()
|
||||||
|
|
|
||||||
|
|
@ -1,134 +1,72 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 数量出库 -->
|
<!-- 数量出库 -->
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="complete-btn">
|
<view class="table-list-item">
|
||||||
<view class="btn" @click="changeTab(1)">
|
<div class="line"></div>
|
||||||
<span>已完成</span>
|
<uni-row :gutter="24">
|
||||||
<div v-if="active == 1" class="bt-line"></div>
|
<uni-col :span="6">领料单位:</uni-col>
|
||||||
</view>
|
<uni-col :span="18"
|
||||||
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
|
><div class="cont">{{ item.createTime }}</div></uni-col
|
||||||
<span>未完成</span>
|
>
|
||||||
<div v-if="active == 2" class="bt-line"></div>
|
</uni-row>
|
||||||
</view>
|
<uni-row :gutter="24">
|
||||||
</view>
|
<uni-col :span="6">领料工程:</uni-col>
|
||||||
<uni-row :gutter="24" class="search-form">
|
<uni-col :span="18"
|
||||||
<uni-col :span="12">
|
><div class="cont">{{ item.code }}</div></uni-col
|
||||||
<view>
|
>
|
||||||
<uni-datetime-picker
|
</uni-row>
|
||||||
v-model="dateArray"
|
<uni-row :gutter="24">
|
||||||
type="daterange"
|
<uni-col :span="6">物资类型:</uni-col>
|
||||||
@maskClick="maskClick"
|
<uni-col :span="18"
|
||||||
@change="onChangeDate"
|
><div class="cont">{{ item.purchaseMaTypeName }}</div></uni-col
|
||||||
placeholder="选择日期范围"
|
>
|
||||||
/>
|
</uni-row>
|
||||||
</view>
|
<uni-row :gutter="24">
|
||||||
</uni-col>
|
<uni-col :span="6">规格型号:</uni-col>
|
||||||
<uni-col :span="8">
|
<uni-col :span="18"
|
||||||
<view>
|
><div class="cont">{{ item.purchaseMaNumber }}</div></uni-col
|
||||||
<uni-easyinput placeholder="请输入内容" v-model="queryParams.keyWord" />
|
>
|
||||||
</view>
|
</uni-row>
|
||||||
</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="4">
|
<uni-col :span="6">单位:</uni-col>
|
||||||
<view class="search" @click="getTableList()">搜索</view>
|
<uni-col :span="18"><div class="cont"></div></uni-col>
|
||||||
</uni-col>
|
</uni-row>
|
||||||
</uni-row>
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">库存数量:</uni-col>
|
||||||
|
<uni-col :span="18">
|
||||||
|
<div class="cont">{{ item.leasePerson }}</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">预领数量:</uni-col>
|
||||||
|
<uni-col :span="18">
|
||||||
|
<div class="cont">{{ item.alNum }}</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">已领数量:</uni-col>
|
||||||
|
<uni-col :span="18">
|
||||||
|
<div class="cont">{{ item.alNum }}</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">出库数量:</uni-col>
|
||||||
|
<uni-col :span="18">
|
||||||
|
<div class="cont" style="width: 200rpx">
|
||||||
|
<uni-number-box :min="0" :max="100"></uni-number-box>
|
||||||
|
</div>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
|
||||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
<view class="outbound-btn"> 出库 </view>
|
||||||
<view
|
</view>
|
||||||
class="table-list-item"
|
|
||||||
v-for="(item, index) in tableList"
|
|
||||||
:key="index"
|
|
||||||
@click="handleItem(item)"
|
|
||||||
>
|
|
||||||
<div class="line"></div>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">申请时间:</uni-col>
|
|
||||||
<uni-col :span="18"
|
|
||||||
><div class="cont">{{ item.createTime }}</div></uni-col
|
|
||||||
>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">领料单号:</uni-col>
|
|
||||||
<uni-col :span="18"
|
|
||||||
><div class="cont">{{ item.code }}</div></uni-col
|
|
||||||
>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">领料物资:</uni-col>
|
|
||||||
<uni-col :span="18"
|
|
||||||
><div class="cont">{{ item.purchaseMaTypeName }}</div></uni-col
|
|
||||||
>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">领料单位:</uni-col>
|
|
||||||
<uni-col :span="18"
|
|
||||||
><div class="cont">{{ item.purchaseMaNumber }}</div></uni-col
|
|
||||||
>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">领料工程:</uni-col>
|
|
||||||
<uni-col :span="18"><div class="cont"></div></uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">领料人:</uni-col>
|
|
||||||
<uni-col :span="18">
|
|
||||||
<div class="cont">{{ item.leasePerson }}</div>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">预领数量:</uni-col>
|
|
||||||
<uni-col :span="18">
|
|
||||||
<div class="cont">{{ item.alNum }}</div>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">已领数量:</uni-col>
|
|
||||||
<uni-col :span="18">
|
|
||||||
<div class="cont">{{ item.alNum }}</div>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">待领数量:</uni-col>
|
|
||||||
<uni-col :span="18">
|
|
||||||
<div class="cont">{{ item.alNum }}</div>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row :gutter="24">
|
|
||||||
<uni-col :span="6">状态:</uni-col>
|
|
||||||
<uni-col :span="18">
|
|
||||||
<div class="cont">未完成</div>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
</view>
|
|
||||||
<view class="loading-text"> {{ finish ? '没有更多数据了~' : '正在加载...' }} </view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { getPickingOutboundListAPI } from '@/services/picking/outbound.js'
|
import { getPickingOutboundListAPI } from '@/services/picking/outbound.js'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
const active = ref(1)
|
|
||||||
const tableList = ref([])
|
|
||||||
const statusList = ref(['3', '13', '4', '14', '19'])
|
|
||||||
const finish = ref(false) // 判断数据是否加载完毕
|
|
||||||
// 查询参数
|
|
||||||
const queryParams = ref({
|
|
||||||
startTime: '', // 开始时间
|
|
||||||
endTime: '', // 结束时间
|
|
||||||
keyWord: '',
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 3,
|
|
||||||
})
|
|
||||||
const dateArray = ref([]) //日期范围
|
|
||||||
|
|
||||||
// 日期 change 事件
|
|
||||||
const onChangeDate = (val) => {
|
|
||||||
const [val_1, val_2] = val
|
|
||||||
queryParams.value.startTime = val_1
|
|
||||||
queryParams.value.endTime = val_2
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
const getTableList = async () => {
|
const getTableList = async () => {
|
||||||
|
|
@ -145,33 +83,6 @@ const getTableList = async () => {
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getTableList()
|
getTableList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 滚动触底事件
|
|
||||||
const onScrollTolower = () => {
|
|
||||||
if (!finish.value) {
|
|
||||||
queryParams.value.pageNum++
|
|
||||||
}
|
|
||||||
getTableList()
|
|
||||||
}
|
|
||||||
|
|
||||||
// tap 栏切换
|
|
||||||
const changeTab = (index) => {
|
|
||||||
active.value = index
|
|
||||||
if (index == 1) {
|
|
||||||
statusList.value = ['3', '13', '4', '14', '19']
|
|
||||||
getTableList()
|
|
||||||
} else if (index == 2) {
|
|
||||||
statusList.value = ['2', '12']
|
|
||||||
getTableList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 点击跳转
|
|
||||||
const handleItem = (item) => {
|
|
||||||
console.log('🚀 ~ handleItem ~ item:', item)
|
|
||||||
// uni.navigateTo({ url: '/pages/new-purchase/accept/acceptDetails' })
|
|
||||||
}
|
|
||||||
|
|
||||||
const maskClick = () => {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -217,7 +128,7 @@ const maskClick = () => {}
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
min-height: 300rpx;
|
// min-height: 300rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -244,4 +155,15 @@ const maskClick = () => {}
|
||||||
color: #666;
|
color: #666;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.outbound-btn {
|
||||||
|
width: 70%;
|
||||||
|
margin: 15rpx auto;
|
||||||
|
height: 68rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #19be6b;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue