szh_zidingyibiaoti
张同海 2 years ago
parent a2447b1a99
commit 773cf2793e

@ -89,13 +89,19 @@ export function BookingTruckSubmit(parameter) {
*
* @author Myshipping
*/
export function apibookingtruck(parameter) {
// export function apibookingtruck(parameter) {
// return axios({
// url: `/api/bookingtruck/${parameter}`,
// method: 'DELETE'
// })
// }
export function BookingTruckDelete(parameter) {
return axios({
url: `/api/bookingtruck/${parameter}`,
method: 'DELETE'
url: `/BookingTruck/Delete`,
method: 'get',
params: parameter
})
}
/**
* 获取订舱打印模板列表带有当前用户打印历史排序
*

@ -544,7 +544,7 @@ import {
BookingTruckSubmit,
BookingTruckCancel,
BookingTruckGetTruckListByBooking,
apibookingtruck,
BookingTruckDelete,
BookingTruckPullInBookingOrderConta,
TaskManageTruckGetInfoByTaskId,
TaskManageTruckSave,
@ -559,6 +559,7 @@ import { merge, values } from 'xe-utils'
export default {
data() {
return {
AddType: false,
templateType: [],
PrintType: '1',
spinning: false,
@ -782,7 +783,7 @@ export default {
})
},
FnDelete() {
apibookingtruck(this.WebData.id).then(res => {
BookingTruckDelete({ id: this.WebData.id }).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.init()
@ -792,10 +793,13 @@ export default {
})
},
FnAdd() {
this.$refs.xTable1.setRadioRow({})
this.AddType = true
this.type = 'Add'
this.init()
},
radioChangeEvent({ row }) {
this.type = 'Edit'
this.SData(row.id)
},
cellClickEvent({ row }) {
@ -923,8 +927,26 @@ export default {
BookingTruckGetTruckListByBooking({ bookingId: this.BookingId }).then(res => {
this.Bookingdata = res.data
if (res.data.length) {
this.$refs.xTable1.setRadioRow(res.data[0])
this.SData(res.data[0].id)
let Record = this.$refs.xTable1.getRadioRecord()
console.log(this.AddType)
if (Record && Record.id) {
res.data.forEach(item => {
console.log(item)
if (item.id == Record.id) {
this.$refs.xTable1.setRadioRow(item)
this.SData(item.id)
}
})
} else {
if (this.AddType) {
this.AddType = false
this.$refs.xTable1.setRadioRow(res.data[res.data.length - 1])
this.SData(res.data[res.data.length - 1].id)
} else {
this.$refs.xTable1.setRadioRow(res.data[0])
this.SData(res.data[0].id)
}
}
} else {
this.type = 'Add'
}

@ -197,7 +197,7 @@ import {
BookingTruckCancel,
DjyCustomerGet,
DjyUserConfigAdd,
apibookingtruck,
BookingTruckDelete,
DjyCustomerQuerytDjyCustomerInfo
} from '@/api/modular/main/SendCar'
import columnSetting from '@/components/tableColumnSetting'
@ -535,7 +535,7 @@ export default {
},
DjyCustomerDelete(record) {
console.log(record)
apibookingtruck(record.id).then(res => {
BookingTruckDelete({ id: record.id }).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.FnGetData()

Loading…
Cancel
Save