|
|
|
@ -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'
|
|
|
|
|
}
|
|
|
|
|