fix edit supplier booking

fix done supplier booking report button loading
This commit is contained in:
Jack Goh
2018-06-29 15:48:26 +08:00
parent 9d0aadb5c3
commit 7aba4e2b05
3 changed files with 14 additions and 12 deletions
@@ -299,12 +299,10 @@
axios
.get('/api/admin/booking/' + this.$route.params.id)
.then((response) => {
loading.close()
.then((response) => {
this.booking_details = response.data
}).catch((error) => {
console.log(error)
loading.close()
this.$router.push({
name: 'notfound'
})
@@ -221,7 +221,7 @@
<el-card class="box-card">
<el-row :gutter="12">
<el-col :span="22" style="text-align:center">
<el-button :loading="loading_btn" @click="editReport" type="primary">Edit</el-button>
<el-button :loading="loading_btn" @click="$router.go(-1)" type="primary">Edit</el-button>
<el-button :loading="loading_btn" @click="completeReport" type="success">Done</el-button>
</el-col>
</el-row>
@@ -289,6 +289,7 @@
axios
.post('/api/booking/' + this.$route.params.id + '/confirm-supplier')
.then((response) => {
this.loading_btn = false
this.$message({
showClose: true,
message: 'Success, please comeback after getting china bankslip',
@@ -300,6 +301,7 @@
})
//this.booking_details = response.data
}).catch((error) => {
this.loading_btn = false
console.log(error)
this.$message({
showClose: true,
@@ -309,7 +311,7 @@
})
})
this.loading_btn = false
this.$router.push({
name: 'booking.admin.cnslip',