现场调试修改 入库 出库 放货重新分配货位
This commit is contained in:
@@ -13,15 +13,15 @@
|
||||
<view class="task-list" v-if="tasks.length > 0">
|
||||
<view class="task-item" v-for="(task, index) in tasks" :key="index" @click="handleTaskClick(task)">
|
||||
<view class="task-info">
|
||||
<text class="task-title">{{ $t('task.list.trayCode') }}:{{ task.trayCode }}</text>
|
||||
<text class="task-type">{{ $t('task.list.cargoSpace') }}:{{ task.cargoSpaceName }}</text>
|
||||
<text class="task-status">{{ $t('task.list.warehouse') }}:{{ task.warehouseName }}</text>
|
||||
<text class="task-status">{{ $t('task.list.createTime') }}:{{ task.createTime }}</text>
|
||||
<text class="task-status status-tag">{{ $t('task.list.status') }}:{{ task.status === '1' ? $t('task.list.pending') : task.status === '3' ? $t('task.list.executing') : task.status }}</text>
|
||||
<text class="task-title">托盘条码:{{ task.trayCode }}</text>
|
||||
<text class="task-type">货位:{{ task.cargoSpaceName }}</text>
|
||||
<text class="task-status">仓库:{{ task.warehouseName }}</text>
|
||||
<text class="task-status">创建时间:{{ task.createTime }}</text>
|
||||
<text class="task-status status-tag">状态:{{ task.status === '1' ? '待执行' : task.status === '3' ? '正执行' : task.status }}</text>
|
||||
<view class="task-actions">
|
||||
<button v-if="task.inOrOut < 20" class="action-button in-button" @click.stop="handleInStock(task)">{{ $t('task.list.inbound') }}</button>
|
||||
<button v-if="task.inOrOut >= 20 && task.inOrOut != 25 && task.inOrOut != 26" class="action-button out-button" @click.stop="handleOutStock(task)">{{ $t('task.list.outbound') }}</button>
|
||||
<button v-if="task.inOrOut == 25 || task.inOrOut == 26" class="action-button out-button" @click.stop="handleCheck(task)">{{ $t('task.list.stocktaking') }}</button>
|
||||
<button v-if="task.inOrOut < 20" class="action-button in-button" @click.stop="handleInStock(task)">入库</button>
|
||||
<button v-if="task.inOrOut >= 20 && task.inOrOut != 25 && task.inOrOut != 26" class="action-button out-button" @click.stop="handleOutStock(task)">出库</button>
|
||||
<button v-if="task.inOrOut == 25 || task.inOrOut == 26" class="action-button out-button" @click.stop="handleCheck(task)">盘点</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,21 +29,21 @@
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" v-else>
|
||||
<text>{{ $t('task.list.noTasks') }}</text>
|
||||
<text>暂无任务</text>
|
||||
</view>
|
||||
|
||||
<!-- 物料详情弹出层 -->
|
||||
<uni-popup ref="materialPopup" type="center">
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">{{ $t('task.list.materialDetails') }}</text>
|
||||
<text class="popup-title">物料详情</text>
|
||||
<text class="close-btn" @click="closePopup">×</text>
|
||||
</view>
|
||||
<view class="material-list">
|
||||
<view class="material-item" v-for="(material, index) in materialDetails" :key="index">
|
||||
<text class="material-code">{{ $t('task.list.materialCode') }}:{{ material.productId }}</text>
|
||||
<text class="material-name">{{ $t('task.list.materialName') }}:{{ material.extraField.materialDesc }}</text>
|
||||
<text class="material-quantity">{{ $t('task.list.quantity') }}:{{ currentTask.inOrOut < 20 ? material.inQuantity : material.outQuantity }}</text>
|
||||
<text class="material-code">物料编码:{{ material.productId }}</text>
|
||||
<text class="material-name">物料名称:{{ material.extraField.materialDesc }}</text>
|
||||
<text class="material-quantity">数量:{{ currentTask.inOrOut < 20 ? material.inQuantity : material.outQuantity }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -60,10 +60,10 @@ export default {
|
||||
return {
|
||||
selectedType: '',
|
||||
taskTypes: [
|
||||
{ value: '', text: this.$t('task.list.all') },
|
||||
{ value: '1', text: this.$t('task.list.inbound') },
|
||||
{ value: '2', text: this.$t('task.list.outbound') },
|
||||
{ value: '4', text: this.$t('task.list.stocktaking') }
|
||||
{ value: '', text: '全部' },
|
||||
{ value: '1', text: '入库' },
|
||||
{ value: '2', text: '出库' },
|
||||
{ value: '4', text: '盘点' }
|
||||
],
|
||||
tasks: [],
|
||||
materialDetails: [],
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
} else {
|
||||
this.tasks = []
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.getTaskListFailed'),
|
||||
title: '获取任务列表失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
console.error('获取任务列表出错:', error)
|
||||
this.tasks = []
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.getTaskListFailed'),
|
||||
title: '获取任务列表失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -106,20 +106,20 @@ export default {
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.inboundSuccess'),
|
||||
title: '入库成功',
|
||||
icon: 'success'
|
||||
})
|
||||
this.fetchTasks()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: response.msg || this.$t('task.list.inboundFailed'),
|
||||
title: response.msg || '入库失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('入库操作失败:', error)
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.inboundFailed'),
|
||||
title: '入库失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -145,14 +145,14 @@ export default {
|
||||
this.$refs.materialPopup.open()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.getMaterialDetailsFailed'),
|
||||
title: '获取物料详情失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取物料详情失败:', error)
|
||||
uni.showToast({
|
||||
title: this.$t('task.list.getMaterialDetailsFailed'),
|
||||
title: '获取物料详情失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user