修改保存和新增

dev
lilu 2 years ago
parent e08e090cd4
commit 4f9e093cf9

@ -255,28 +255,6 @@ export function GetCtn(parameter) {
}) })
} }
/**
* 更新订舱
*/
export function BookingOrderUpdate(parameter) {
return axios({
url: '/BookingOrder/Update',
method: 'post',
data: parameter
})
}
/**
* 新增订舱
*/
export function BookingOrderAdd(parameter) {
return axios({
url: '/BookingOrder/Add',
method: 'post',
data: parameter
})
}
/** /**
* 增加订舱模板 * 增加订舱模板
*/ */
@ -533,3 +511,33 @@ export function BookingOrderDownload(parameter) {
responseType: 'arraybuffer' responseType: 'arraybuffer'
}) })
} }
/**
* 更新订舱
*/
export function BookingOrderUpdate(parameter) {
return axios({
url: '/BookingOrder/Update',
method: 'post',
data: parameter
})
}
/**
* 新增订舱
*/
export function BookingOrderAdd(parameter) {
return axios({
url: '/BookingOrder/Add',
method: 'post',
data: parameter
})
}
export function BookingOrderAddOrUpdate(parameter) {
return axios({
url: '/BookingOrder/AddOrUpdate',
method: 'post',
data: parameter
})
}

@ -100,7 +100,7 @@ import basicItem from './components/basicItem'
import ediMore from './components/ediMore' import ediMore from './components/ediMore'
import sedOrder from './components/sedOrder' import sedOrder from './components/sedOrder'
import { BookingOrderGet, BookingOrderUpdate, BookingOrderAdd } from '@/api/modular/main/BookingLedger' import { BookingOrderGet, BookingOrderUpdate, BookingOrderAdd, BookingOrderAddOrUpdate } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'BookingDetail', name: 'BookingDetail',
@ -414,7 +414,7 @@ export default {
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
console.log(JSON.stringify(_data)) console.log(JSON.stringify(_data))
BookingOrderUpdate(_data) BookingOrderAddOrUpdate(_data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.isCopy = false this.isCopy = false
@ -439,7 +439,7 @@ export default {
} }
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
BookingOrderAdd(_data) BookingOrderAddOrUpdate(_data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.isAdd = false this.isAdd = false

Loading…
Cancel
Save