szh_zidingyibiaoti
张同海 2 years ago
parent a2032197cc
commit fa8d173430

@ -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
})
}
/**
* 删除派车
*

@ -105,8 +105,9 @@
<vxe-toolbar>
<template #buttons>
<div class="nav-box">
<div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>新增派车</div>
<!-- <div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>撤销派车</div> -->
<!-- <div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>新增派车</div> -->
<div class="nav" @click="FnSubmit"><i class="iconfont icon-jiahao2fill"></i>提交派车</div>
<div class="nav" @click="FnCancel"><i class="iconfont icon-jiahao2fill"></i>撤销派车</div>
</div>
</template>
<template #tools>
@ -121,6 +122,7 @@
</template>
</vxe-toolbar>
<vxe-table
ref="XTable"
:column-config="{ resizable: true }"
@cell-dblclick="cellDBLClickEvent"
:data="loadData"
@ -132,6 +134,7 @@
empty-text="没有更多数据了!"
v-if="!TableType"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column
v-for="item in TableColumns"
@ -198,7 +201,9 @@ import {
DjyCustomerGet,
DjyUserConfigAdd,
BookingTruckDelete,
DjyCustomerQuerytDjyCustomerInfo
DjyCustomerQuerytDjyCustomerInfo,
BookingTruckSubmitBatch,
BookingTruckCancelBatch
} from '@/api/modular/main/SendCar'
import columnSetting from '@/components/tableColumnSetting'
const columns = [
@ -461,6 +466,34 @@ export default {
}
})
},
FnCancel() {
let ApiArr = []
let select = this.$refs.XTable.getCheckboxRecords()
select.forEach(item => {
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',

Loading…
Cancel
Save