Files
FT577-WMS/pda/pages/warehouse/outbound/index.vue
2026-09-08 22:20:47 +08:00

371 lines
9.2 KiB
Vue

<template>
<view class="page-container">
<!-- 出库管理功能入口 -->
<view class="menu-section">
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/confirm')">
<view class="card-left">
<view class="card-icon orange">
<uni-icons type="checkmarkempty" size="24" color="#fff"></uni-icons>
</view>
<view class="card-info">
<text class="card-title">出库确认</text>
<text class="card-desc">扫描出库物料条码进行出库确认</text>
</view>
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/trayConfirm')">
<view class="card-left">
<view class="card-icon green">
<uni-icons type="checkmarkempty" size="24" color="#fff"></uni-icons>
</view>
<view class="card-info">
<text class="card-title">出库确认</text>
<text class="card-desc">扫描出库托盘条码进行出库确认</text>
</view>
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/container')">
<view class="card-left">
<view class="card-icon blue">
<uni-icons type="info" size="24" color="#fff"></uni-icons>
</view>
<view class="card-info">
<text class="card-title">容器出库</text>
<text class="card-desc">选择立库区域和托盘类型</text>
</view>
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/exception')">
<view class="card-left">
<view class="card-icon red">
<uni-icons type="info" size="24" color="#fff"></uni-icons>
</view>
<view class="card-info">
<text class="card-title">出库异常确认</text>
<text class="card-desc">处理出库过程中的异常情况</text>
</view>
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
</view>
<!-- 待处理任务 -->
<view class="task-section">
<view class="section-header">
<text class="section-title">待处理任务</text>
<text class="section-more" @click="refreshTasks">刷新</text>
</view>
<view v-if="taskList.length === 0" class="empty-state">
<text class="empty-text">暂无待处理任务</text>
</view>
<view v-else>
<view class="task-card" v-for="(item, index) in taskList" :key="index"
@click="handleTask(item)">
<view class="task-header">
<text class="task-type" :class="item.typeClass">{{ item.typeName }}</text>
<!-- <text class="task-no">{{ item.taskNo }}</text> -->
<text class="task-no">{{ item.jobId }}</text>
</view>
<view class="task-body">
<view class="task-info-item">
<text class="info-label">托盘条码</text>
<text class="info-value">{{ item.trayCode }}</text>
</view>
<!-- <view class="task-info-item">
<text class="info-label">物料编码</text>
<text class="info-value">{{ item.materialCode }}</text>
</view>
<view class="task-info-item">
<text class="info-label">物料名称</text>
<text class="info-value">{{ item.materialName }}</text>
</view>
<view class="task-info-item">
<text class="info-label">出库数量</text>
<text class="info-value">{{ item.quantity }}</text>
</view>
<view class="task-info-item">
<text class="info-label">出库口</text>
<text class="info-value">{{ item.portName }}</text>
</view> -->
<!-- <view class="task-info-item">
<view class="task-info-item">
<text class="info-label">版辊编号</text>
<text class="info-value">{{ item.rollerNumber }}</text>
</view>
<view class="task-info-item">
<text class="info-label">颜色</text>
<text class="info-value">{{ item.color }}</text>
</view>
<view class="task-info-item">
<text class="info-label">色序</text>
<text class="info-value">{{ item.colorSequence }}</text>
</view>
<view class="task-info-item">
<text class="info-label">规格</text>
<text class="info-value">{{ item.spec }}</text>
</view> -->
</view>
<view class="task-footer">
<text class="task-time">{{ item.createTime }}</text>
<view class="task-status" :class="item.statusClass">{{ item.statusName }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getOutboundTaskList } from '@/api/warehouse/outbound'
export default {
data() {
return {
taskList: []
}
},
onLoad() {
this.loadTasks()
},
onShow() {
this.loadTasks()
},
methods: {
navigateTo(url) {
this.$tab.navigateTo(url)
},
loadTasks() {
getOutboundTaskList().then(res => {
console.log('接口返回的完整数据:', res)
// this.taskList = res.data || []
this.taskList = res.rows || []
}).catch(() => {
this.taskList = []
})
},
refreshTasks() {
this.loadTasks()
this.$modal.showToast('刷新成功')
},
handleTask(item) {
if (item.type === 'confirm') {
this.$tab.navigateTo('/pages/warehouse/outbound/confirm?taskNo=' + item.taskNo)
} else if (item.type === 'exception') {
this.$tab.navigateTo('/pages/warehouse/outbound/exception?taskNo=' + item.taskNo)
}
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #f5f7fa;
min-height: 100%;
}
.page-container {
padding: 24rpx;
}
.menu-section {
margin-bottom: 32rpx;
}
.menu-card {
background: #fff;
border-radius: 16rpx;
padding: 32rpx 28rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.card-left {
display: flex;
align-items: center;
flex: 1;
}
.card-icon {
width: 72rpx;
height: 72rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
}
.card-icon.orange {
background: linear-gradient(135deg, #fa8c16, #ffa940);
}
.card-icon.blue {
background: linear-gradient(135deg, #3462fa, #3462fa);
}
.card-icon.green {
background: linear-gradient(135deg, #78d01a, #78d01a);
}
.card-icon.red {
background: linear-gradient(135deg, #f5222d, #ff4d4f);
}
.card-info {
display: flex;
flex-direction: column;
}
.card-title {
font-size: 30rpx;
font-weight: 500;
color: #333;
margin-bottom: 8rpx;
}
.card-desc {
font-size: 24rpx;
color: #999;
}
.task-section {
margin-top: 16rpx;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 500;
color: #333;
}
.section-more {
font-size: 26rpx;
color: #1890ff;
}
.empty-state {
background: #fff;
border-radius: 16rpx;
padding: 80rpx 0;
display: flex;
align-items: center;
justify-content: center;
}
.empty-text {
font-size: 28rpx;
color: #ccc;
}
.task-card {
background: #fff;
border-radius: 16rpx;
padding: 28rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.task-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
padding-bottom: 16rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.task-type {
font-size: 28rpx;
font-weight: 500;
}
.task-type.confirm {
color: #fa8c16;
}
.task-type.exception {
color: #f5222d;
}
.task-no {
font-size: 24rpx;
color: #999;
}
.task-body {
margin-bottom: 16rpx;
}
.task-info-item {
display: flex;
justify-content: space-between;
padding: 10rpx 0;
}
.info-label {
font-size: 26rpx;
color: #999;
}
.info-value {
font-size: 26rpx;
color: #333;
}
.task-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 16rpx;
border-top: 1rpx solid #f0f0f0;
}
.task-time {
font-size: 22rpx;
color: #ccc;
}
.task-status {
font-size: 22rpx;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.task-status.pending {
color: #fa8c16;
background: #fff7e6;
}
.task-status.processing {
color: #1890ff;
background: #e6f7ff;
}
.task-status.completed {
color: #52c41a;
background: #f6ffed;
}
.task-status.exception {
color: #f5222d;
background: #fff1f0;
}
</style>