updated axios booking supplier form

This commit is contained in:
Jack Goh
2018-06-26 18:09:11 +08:00
parent 21338401c4
commit f108d7ee51
@@ -336,30 +336,27 @@
this.$refs[formName].validate((valid) => {
if (valid) {
let newConfirmation = {
amount: this.booking.amount,
term: this.term
}
let newSupplierBooking = this.supplierBookingForm
// axios.post('api/booking/calculation', newConfirmation)
// .then((response) => {
// this.loading = false
// console.log(response)
// this.bookingConfirmTable.date = response.data.date
// this.bookingConfirmTable.marking = response.data.marking
// this.bookingConfirmTable.payment_method = response.data.payment_method
// this.bookingConfirmTable.amount = response.data.amount
// this.bookingConfirmTable.service_charge = response.data.service_charge
// this.bookingConfirmTable.rate = response.data.rate
// this.bookingConfirmTable.bankin_amount = response.data.bankin_amount
// this.bookingConfirmTable.account_name = this.bookingForm.account_name
// this.dialogFormVisible = false
// this.dialogFormVisible1 = true
// })
// .catch((error) => {
// this.loading = false
// console.log(error)
// })
axios.post('/api/supplier-booking', newSupplierBooking)
.then((response) => {
this.loading = false
console.log(response)
// this.bookingConfirmTable.date = response.data.date
// this.bookingConfirmTable.marking = response.data.marking
// this.bookingConfirmTable.payment_method = response.data.payment_method
// this.bookingConfirmTable.amount = response.data.amount
// this.bookingConfirmTable.service_charge = response.data.service_charge
// this.bookingConfirmTable.rate = response.data.rate
// this.bookingConfirmTable.bankin_amount = response.data.bankin_amount
// this.bookingConfirmTable.account_name = this.bookingForm.account_name
// this.dialogFormVisible = false
// this.dialogFormVisible1 = true
})
.catch((error) => {
this.loading = false
console.log(error)
})
}
else{