352 lines
8.6 KiB
Vue
352 lines
8.6 KiB
Vue
<template>
|
|
<view class="page-container">
|
|
<!-- 入库管理功能入口 -->
|
|
<view class="menu-section">
|
|
<view class="menu-card" @click="navigateTo('/pages/warehouse/inbound/bindTray')">
|
|
<view class="card-left">
|
|
<view class="card-icon blue">
|
|
<uni-icons type="scan" 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/inbound/cancelBindTray')">
|
|
<view class="card-left">
|
|
<view class="card-icon orange">
|
|
<uni-icons type="scan" 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/inbound/emptyTray')">
|
|
<view class="card-left">
|
|
<view class="card-icon green">
|
|
<uni-icons type="plus" 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/inbound/supply')">
|
|
<view class="card-left">
|
|
<view class="card-icon green">
|
|
<uni-icons type="plus" 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">{{ item.typeName }}</text>
|
|
<text class="task-no">{{ item.instockinId }}</text>
|
|
</view>
|
|
<view class="task-body">
|
|
<view class="task-info-item">
|
|
<text class="info-label">单据编号</text>
|
|
<text class="info-value">{{ item.stockinId }}</text>
|
|
</view>
|
|
<view class="task-info-item">
|
|
<text class="info-label">单据状态</text>
|
|
<!-- <text class="info-value">{{ item.status }}</text> -->
|
|
<text class="info-value">{{ stockStatusMap[item.status] || '未知状态' }}</text>
|
|
</view>
|
|
<!-- <view class="task-header">
|
|
<text class="task-type">{{ item.typeName }}</text>
|
|
<text class="task-no">{{ item.taskNo }}</text>
|
|
</view>
|
|
<view class="task-body">
|
|
<view class="task-info-item">
|
|
<text class="info-label">物料编码</text>
|
|
<text class="info-value">{{ item.productId }}</text>
|
|
</view>
|
|
<view class="task-info-item">
|
|
<text class="info-label">物料名称</text>
|
|
<text class="info-value">{{ item.productName }}</text>
|
|
</view>
|
|
<view class="task-info-item">
|
|
<text class="info-label">数量</text>
|
|
<text class="info-value">{{ item.quantity - item.assignNum }}</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 { getInboundTaskList, getInboundStockList } from '@/api/warehouse/inbound'
|
|
import UniIcons from "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
|
|
|
|
export default {
|
|
components: {UniIcons},
|
|
dicts: ['in_stockin_status'],
|
|
data() {
|
|
return {
|
|
taskList: [],
|
|
stockStatusMap: {
|
|
1: '创建',
|
|
2: '已审核',
|
|
3: '执行中',
|
|
4: '已完成',
|
|
5: '已作废'
|
|
},
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.loadTasks()
|
|
},
|
|
onShow() {
|
|
this.loadTasks()
|
|
},
|
|
methods: {
|
|
navigateTo(url) {
|
|
this.$tab.navigateTo(url)
|
|
},
|
|
loadTasks() {
|
|
// getInboundTaskList().then(res => {
|
|
getInboundStockList().then(res => {
|
|
this.taskList = res.rows || []
|
|
}).catch(() => {
|
|
this.taskList = []
|
|
})
|
|
},
|
|
refreshTasks() {
|
|
this.loadTasks()
|
|
this.$modal.showToast('刷新成功')
|
|
},
|
|
handleTask(item) {
|
|
if (item.type === 'bindTray') {
|
|
this.$tab.navigateTo('/pages/warehouse/inbound/bindTray?taskNo=' + item.taskNo)
|
|
} else if (item.type === 'supply') {
|
|
this.$tab.navigateTo('/pages/warehouse/inbound/supply?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.blue {
|
|
background: linear-gradient(135deg, #1890ff, #40a9ff);
|
|
}
|
|
|
|
.card-icon.green {
|
|
background: linear-gradient(135deg, #52c41a, #73d13d);
|
|
}
|
|
|
|
.card-icon.orange {
|
|
background: linear-gradient(135deg, #f8b12e, #f5eb69);
|
|
}
|
|
|
|
.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;
|
|
color: #1890ff;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
</style>
|