pda入库绑定选择,手动出库确认选择,盘点任务完成账务处理优化

This commit is contained in:
lsymicc
2026-09-15 00:00:55 +08:00
parent 0bd8d92bc0
commit 39632ef960
29 changed files with 1174 additions and 333 deletions

View File

@@ -58,13 +58,14 @@
<!-- 操作按钮 -->
<view class="btn-section" >
<button class="btn btn-orange" v-if="outboundList" @click="stockoutComplete">托盘确认出库</button>
<button class="btn btn-green" v-if="outboundList" @click="stockoutCompleteAll">一键确认出库</button>
<button class="btn btn-default" @click="resetForm">重置</button>
</view>
</view>
</template>
<script>
import { getOutboundDetail, getTrayCodeDetail, confirmOutbound, stockoutTrayCodeComplete } from '@/api/warehouse/outbound'
import { getOutboundDetail, getTrayCodeDetail, confirmOutbound, stockoutTrayCodeComplete, stockoutTrayCodeCompleteAll } from '@/api/warehouse/outbound'
export default {
data() {
@@ -124,7 +125,7 @@
}
}).catch(function() {
that.outboundList = []
// that.$modal.msg('未找到该托盘信息,可能是未分配单据或已出库完成')
that.$modal.msg('无托盘明细信息,可能是出库单据未分配或已确认出库完成')
})
},
@@ -201,6 +202,44 @@
})
},
stockoutCompleteAll() {
if (!this.barcode) {
this.$modal.msg('请输入托盘号')
return
}
// var data = {
// // taskNo: this.taskNo,
// barcode: this.barcode,
// }
// console.log(this.barcode)
// var that = this
// stockoutTrayCodeCompleteAll(this.barcode).then(() => {
// that.$modal.msgSuccess(this.barcode + '一键出库确认成功')
// that.resetForm()
// }).catch(() => {
// // 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
// // console.log('出库确认失败')
// })
this.$modal.confirm('一键出库操作会自动将该托盘符合条件的版辊确认出库并移除版辊库存,确认执行吗').then(() => {
stockoutTrayCodeCompleteAll(this.barcode).then(() => {
that.$modal.msgSuccess(this.barcode + '一键出库确认成功')
that.resetForm()
}).catch(() => {
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
// console.log('出库确认失败')
})
}).then(() => {
this.$modal.msgSuccess(this.barcode + '一键出库确认成功');
this.resetForm();
}).catch(() => {
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
// console.log('出库确认失败或用户取消')
});
},
resetItemQty(item) {
item.outQuantity = 0; // 或者重置为后端返回的默认数量
},
@@ -402,6 +441,11 @@
background: #fa8c16;
color: #fff;
}
.btn-green {
background: #0cb306;
color: #fff;
}
.btn-default {
background: #fff;