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

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

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

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

Loading…
Cancel
Save