diff --git a/dev_wms_client/src/api/taskOperation.js b/dev_wms_client/src/api/taskOperation.js
index 68a3610..e93ac84 100644
--- a/dev_wms_client/src/api/taskOperation.js
+++ b/dev_wms_client/src/api/taskOperation.js
@@ -16,4 +16,13 @@ export const updateWmsTask = (params) => {
method: 'post',
data: params
})
+}
+
+// 更新出库单任务
+export const updateOutsTask = (params) => {
+ return request({
+ url: '/taskOperation/updateOutsTask',
+ method: 'post',
+ data: params
+ })
}
\ No newline at end of file
diff --git a/dev_wms_client/src/layout/OutsMonitor.vue b/dev_wms_client/src/layout/OutsMonitor.vue
index 1479b99..c4ce3b5 100644
--- a/dev_wms_client/src/layout/OutsMonitor.vue
+++ b/dev_wms_client/src/layout/OutsMonitor.vue
@@ -65,8 +65,10 @@
- 编辑
+ 取消
+ 完成
@@ -95,6 +97,7 @@ import {labelPosition} from '@/constant/form.js'
import {outTypeOptions} from '@/constant/options.js'
import {addAllOptionOfOptions} from '@/utils/generator.js'
import {loading} from '@/utils/loading'
+import {updateOutsTask} from "@/api/taskOperation";
/**
* 常量定义
@@ -191,6 +194,54 @@ const timeFormat = (row, column, cellValue, index) => {
const outsTypeFormat = (row, column, cellValue, index) => {
return outTaskTypeFormatter(cellValue)
}
+// 取消出库单
+const cancelOuts = (row) => {
+ const request = {
+ taskId: row.taskId,
+ updateType: 1,
+ userName: USER_NAME,
+ standId: STAND_ID
+ }
+ loading.open('取消中...')
+ updateOutsTask(request).then(res => {
+ const response = res.data
+ if (response.code === 0) {
+ ElMessage.success(response.message)
+ } else {
+ ElMessage.error(response.message)
+ }
+ }).catch(err => {
+ console.log(err)
+ ElMessage.error('取消发生异常。')
+ }).finally(() => {
+ loading.close()
+ search()
+ })
+}
+// 完成出库单
+const finishOuts = (row) => {
+ const request = {
+ taskId: row.taskId,
+ updateType: 2,
+ userName: USER_NAME,
+ standId: STAND_ID
+ }
+ loading.open('完成中...')
+ updateOutsTask(request).then(res => {
+ const response = res.data
+ if (response.code === 0) {
+ ElMessage.success(response.message)
+ } else {
+ ElMessage.error(response.message)
+ }
+ }).catch(err => {
+ console.log(err)
+ ElMessage.error('完成发生异常。')
+ }).finally(() => {
+ loading.close()
+ search()
+ })
+}