From fa8d173430c05c67c1618763093046ccc4c56261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Mon, 24 Apr 2023 14:53:20 +0800 Subject: [PATCH] 4/24 --- src/api/modular/main/SendCar.js | 24 ++++++++++++++++++++ src/views/main/SendCar/index.vue | 39 +++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/src/api/modular/main/SendCar.js b/src/api/modular/main/SendCar.js index ba347bc..23f7b69 100644 --- a/src/api/modular/main/SendCar.js +++ b/src/api/modular/main/SendCar.js @@ -72,6 +72,18 @@ export function BookingTruckCancel(parameter) { params: parameter }) } +/** + * 批量撤销派车 + * + * @author Myshipping + */ +export function BookingTruckCancelBatch(parameter) { + return axios({ + url: '/BookingTruck/CancelBatch', + method: 'post', + data: parameter + }) +} /** * 提交派车 * @@ -84,6 +96,18 @@ export function BookingTruckSubmit(parameter) { data: parameter }) } +/** + * 批量提交派车 + * + * @author Myshipping + */ +export function BookingTruckSubmitBatch(parameter) { + return axios({ + url: '/BookingTruck/SubmitBatch', + method: 'post', + data: parameter + }) +} /** * 删除派车 * diff --git a/src/views/main/SendCar/index.vue b/src/views/main/SendCar/index.vue index caacc6c..98c71ff 100644 --- a/src/views/main/SendCar/index.vue +++ b/src/views/main/SendCar/index.vue @@ -105,8 +105,9 @@ + { + ApiArr.push(item.id) + }) + BookingTruckCancelBatch(ApiArr).then(res => { + if (res.data.succ) { + this.$message.success('撤销成功') + } else { + this.$message.error(`撤销失败,${res.data.msg}`) + } + }) + }, + FnSubmit() { + let ApiArr = [] + let select = this.$refs.XTable.getCheckboxRecords() + select.forEach(item => { + ApiArr.push(item.id) + }) + BookingTruckSubmitBatch(ApiArr).then(res => { + if (res.data.succ) { + this.$message.success('提交成功') + } else { + this.$message.error(`提交失败,${res.data.msg}`) + } + }) + }, TabsAdd() { this.$router.push({ name: 'SendCarAdd',