From 9b127abdd8f42eede027314420b966be00fe893d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=B4=E7=82=B3=E6=9E=97?= <15237758276@163.com> Date: Mon, 17 Jun 2024 16:10:20 +0800 Subject: [PATCH] no message --- src/api/task.js | 10 ++++- src/views/business-data/pick/index.vue | 19 ++++++++-- .../business-data/pickDetail/pickTask.vue | 38 ++++++++++++++++++- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/src/api/task.js b/src/api/task.js index e443d36..0003a7e 100644 --- a/src/api/task.js +++ b/src/api/task.js @@ -20,6 +20,14 @@ export function del(ids) { data: ids }) } +// 拣货确认 +export function jhQr(ids) { + return request({ + url: 'api/task/jhQr', + method: 'post', + data: ids + }) +} export function edit(data) { return request({ @@ -36,4 +44,4 @@ export function queryPickTask(id) { }) } -export default { add, edit, del ,getTaskInfo,queryPickTask} +export default { add, edit, del ,getTaskInfo,queryPickTask,jhQr} diff --git a/src/views/business-data/pick/index.vue b/src/views/business-data/pick/index.vue index 951cb6b..ccc2a92 100644 --- a/src/views/business-data/pick/index.vue +++ b/src/views/business-data/pick/index.vue @@ -25,11 +25,17 @@ - 未设置字典,请手动设置 Select + + + - + - + + + 拣货确认 + + @@ -97,6 +108,7 @@ import udOperation from '@crud/UD.operation' import pagination from '@crud/Pagination' import DateRangePicker from "@/components/DateRangePicker/index.vue"; import {getItemsList} from "@/api/item"; +import crudPickDetail from "@/api/pickDetail"; const defaultForm = { id: null, itemId: null, itemKeyId: null, billCode: null, taskType: null, asnDetailId: null, moveDetailId: null, waveDetailId: null, pickDetailId: null, srcStockId: null, dstStockId: null, srcPointId: null, dstPointId: null, srcStockCode: null, dstStockCode: null, srcPointCode: null, dstPointCode: null, invStatus: null, taskStatus: null, beSkip: null, beBack: null, planQty: null, moveQty: null, putCode: null, invId: null, deptId: null, createBy: null, updateBy: null, createTime: null, updateTime: null } export default { @@ -148,6 +160,30 @@ export default { indexMethod(index) { return index * 1+1; }, + // 拣货确认 + JhQr(datas) { + this.$confirm(`选中的${datas.length}条数据是否拣货确认?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + + const ids = []; + for (let i = 0; i < datas.length; i++) { + ids.push(datas[i].id) + } + crudTask.jhQr(ids).then(res => { + this.crud.notify('拣货成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) + this.crud.toQuery() + }).catch(() => { + + }) + + }).catch(() => { + this.$refs.table.clearSelection() + this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS); + }); + }, //物料数据 itemDataGet() { getItemsList().then(res => {