diff --git a/src/api/boxManage/boxManage.js b/src/api/boxManage/boxManage.js index 8429ab3..6dd0a7f 100644 --- a/src/api/boxManage/boxManage.js +++ b/src/api/boxManage/boxManage.js @@ -18,4 +18,7 @@ export const validateAndScanCaseRoll = data => createAPI('/boxForNotification/va export const saveCaseRollList = data => createAPI('/boxForNotification/saveCaseRollList','post',data) // 查询出库通知单主记录(关联明细) -export const searchOutboundNotificationWithDetail = data => createAPI('/boxForNotification/searchOutboundNotificationWithDetail','post',data) \ No newline at end of file +export const searchOutboundNotificationWithDetail = data => createAPI('/boxForNotification/searchOutboundNotificationWithDetail','post',data) + +// 更新出库通知单状态 +export const updateOrderStatus = data => createAPI('/boxForNotification/updateOrderStatus','post',data) \ No newline at end of file diff --git a/src/views/modules/boxManage/saleBoxManage.vue b/src/views/modules/boxManage/saleBoxManage.vue index 28a2888..d37bff2 100644 --- a/src/views/modules/boxManage/saleBoxManage.vue +++ b/src/views/modules/boxManage/saleBoxManage.vue @@ -41,15 +41,6 @@ @row-click="changeData" v-loading="dataListLoading" style="margin-top: 0px; width: 100%;"> - - - - - - - - - + + + @@ -340,7 +340,8 @@ import { deleteSoReceiveCasesData, validateAndScanCaseRoll, saveCaseRollList, - searchOutboundNotificationWithDetail + searchOutboundNotificationWithDetail, + updateOrderStatus } from '../../../api/boxManage/boxManage' @@ -1065,6 +1066,34 @@ export default { } }).catch(() => {}) }, + + // 处理完成操作 + async handleComplete(row){ + this.$confirm('是否包装完成?', '提示', { + confirmButtonText: '是', + cancelButtonText: '否', + type: 'warning' + }).then(async () => { + try { + const {data} = await updateOrderStatus({ + site: row.site, + buNo: row.buNo, + orderNo: row.orderNo + }) + if(data && data.code === 0){ + this.$message.success('操作成功,单据状态已更新为"待出库"') + // 刷新列表 + this.getMainData() + } else { + this.$message.error(data.msg || '操作失败') + } + } catch (error) { + this.$message.error(error.msg || '操作失败,请重试') + } + }).catch(() => { + // 用户点击了"否",不做任何操作 + }) + }, }, created() { //查询报表的类型