任务完成处理和pda盘点界面优化
This commit is contained in:
@@ -37,11 +37,11 @@ export function confirmExcetion(data) {
|
||||
}
|
||||
|
||||
// 确认托盘盘点出库完成 - 盘点出库
|
||||
export function inventoryTrayCodeComplete(trayCode) {
|
||||
export function inventoryTrayCodeComplete(data) {
|
||||
return request({
|
||||
url: '/pda/inventoryTrayCodeComplete',
|
||||
method: 'post',
|
||||
// data: { trayCode: trayCode }
|
||||
params: { trayCode }
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -121,7 +121,7 @@
|
||||
"navigationBarTitleText": "盘点管理"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/warehouse/inventory/inventoryConfirm",
|
||||
"path": "pages/warehouse/inventory/jobList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "盘点任务列表"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
|
||||
<view class="feature-list">
|
||||
<view class="feature-card" @click="$modal.showToast('功能开发中')">
|
||||
<view class="feature-card" @click="navigateTo('/pages/warehouse/inventory/jobList')">
|
||||
<view class="feature-left">
|
||||
<uni-icons type="list" size="20" color="#1890ff"></uni-icons>
|
||||
<text class="feature-name">盘点任务列表</text>
|
||||
@@ -22,7 +22,7 @@
|
||||
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="feature-card" @click="$modal.showToast('功能开发中')">
|
||||
<!-- <view class="feature-card" @click="$modal.showToast('功能开发中')">
|
||||
<view class="feature-left">
|
||||
<uni-icons type="compose" size="20" color="#52c41a"></uni-icons>
|
||||
<text class="feature-name">盘点差异记录</text>
|
||||
@@ -36,7 +36,7 @@
|
||||
<text class="feature-name">盘点报告</text>
|
||||
</view>
|
||||
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="empty-tip">
|
||||
|
||||
@@ -153,16 +153,16 @@
|
||||
return
|
||||
}
|
||||
|
||||
// var data = {
|
||||
// // taskNo: this.taskNo,
|
||||
// barcode: this.barcode,
|
||||
// }
|
||||
var data = {
|
||||
// taskNo: this.taskNo,
|
||||
barcode: this.barcode,
|
||||
}
|
||||
|
||||
// console.log(this.barcode)
|
||||
var that = this
|
||||
inventoryTrayCodeComplete(this.barcode).then(() => {
|
||||
that.$modal.msgSuccess(this.barcode + '盘点出库确认成功')
|
||||
that.resetForm()
|
||||
|
||||
inventoryTrayCodeComplete(data).then(() => {
|
||||
this.$modal.msgSuccess(this.barcode + '盘点出库确认成功')
|
||||
this.resetForm()
|
||||
}).catch(() => {
|
||||
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||
// console.log('出库确认失败')
|
||||
|
||||
373
pda/pages/warehouse/inventory/jobList.vue
Normal file
373
pda/pages/warehouse/inventory/jobList.vue
Normal file
@@ -0,0 +1,373 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
|
||||
<!-- 待处理任务 -->
|
||||
<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 class="info-btn">
|
||||
<button class="scan-btn-text orange" @click="inventoryComplete(item)">出库确认</button>
|
||||
</view>
|
||||
</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.cargoSpaceId }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">状态</text>
|
||||
<text class="info-value">{{ inventoryStatusMap[item.status] || '未知状态' }}</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 { getInventoryOutTaskList } from '@/api/warehouse/inventory'
|
||||
import { inventoryTrayCodeComplete } from '@/api/warehouse/inventory'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskList: [],
|
||||
|
||||
inventoryStatusMap: {
|
||||
1: '待执行',
|
||||
2: '执行中',
|
||||
3: '出库完成待确认',
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadTasks()
|
||||
},
|
||||
onShow() {
|
||||
this.loadTasks()
|
||||
},
|
||||
methods: {
|
||||
navigateTo(url) {
|
||||
this.$tab.navigateTo(url)
|
||||
},
|
||||
loadTasks() {
|
||||
getInventoryOutTaskList().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/inventory/confirm?taskNo=' + item.taskNo)
|
||||
} else if (item.type === 'exception') {
|
||||
this.$tab.navigateTo('/pages/warehouse/inventory/exception?taskNo=' + item.taskNo)
|
||||
}
|
||||
},
|
||||
|
||||
//托盘物料盘点完成确认回流
|
||||
inventoryComplete(item) {
|
||||
|
||||
var data = {
|
||||
// taskNo: this.taskNo,
|
||||
barcode: item.trayCode,
|
||||
}
|
||||
|
||||
console.log(item.trayCode)
|
||||
console.log(data)
|
||||
|
||||
inventoryTrayCodeComplete(data).then(res => {
|
||||
this.$modal.msgSuccess(data.barcode + '盘点出库确认成功')
|
||||
this.refreshTasks()
|
||||
}).catch(() => {
|
||||
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||
// console.log('出库确认失败')
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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;
|
||||
}
|
||||
|
||||
.scan-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 20rpx;
|
||||
border: 1rpx solid #fa8c16;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text.orange {
|
||||
background: #fa8c16;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user