updated dynamic switch pages on dummny table data

This commit is contained in:
Jack Goh
2018-06-19 17:10:34 +08:00
parent 7398ce73d6
commit 77f861472a
+21 -14
View File
@@ -241,7 +241,7 @@
<el-table :data="bookingTable">
<el-table-column label="No." width="106">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Update</el-button>
<el-button type="text" slot-scope="scope" @click="(event) => { BookingStatus(event, scope.row.booking_no) }"> {{scope.row.booking_no}}</el-button>
<el-button type="text" slot-scope="scope" @click="(event) => { BookingStatus(scope.row.status, scope.row.booking_no) }"> {{scope.row.booking_no}}</el-button>
</el-table-column>
<el-table-column label="Date" prop="date" width="120" sortable/>
<!-- <el-table-column label="Term" :filters="[{text: 'X1', value: 'X1'}, {text: 'X2', value: 'X2'}]" :filter-method="filterHandler">
@@ -355,43 +355,47 @@
formLabelWidth: '0px',
bookingTable: [{
date: '12/1/2018',
booking_no: '001',
booking_no: '12',
rate: '1.23',
amount: 'RM 1000',
transfer_amount: 'RMB 10000',
status: '(1/6)',
status_desc: 'Waiting for payment',
timeout: '56:00:00'
timeout: '56:00:00',
status: 2
},
{
date: '12/1/2018',
booking_no: '002',
booking_no: '13',
rate: '1.23',
amount: 'RM 1000',
transfer_amount: 'RMB 10000',
status: '(2/6)',
status_desc: 'Waiting verification',
timeout: '56:00:00'
timeout: '56:00:00',
status: 3
},
{
date: '12/1/2018',
booking_no: '003',
booking_no: '14',
rate: '1.23',
amount: 'RM 1000',
transfer_amount: 'RMB 10000',
status: '(3/6)',
status_desc: 'Processing transfer',
timeout: '56:00:00'
timeout: '56:00:00',
status: 4
},
{
date: '12/1/2018',
booking_no: '004',
booking_no: '15',
rate: '1.23',
amount: 'RM 1000',
transfer_amount: 'RMB 10000',
status: '(4/6)',
status_desc: 'Transfer Complete, please upload your PO',
timeout: '56:00:00'
timeout: '56:00:00',
status: 5
},
{
date: '12/1/2018',
@@ -401,7 +405,8 @@
transfer_amount: 'RMB 10000',
status: '(5/6)',
status_desc: 'Processing invoice',
timeout: '56:00:00'
timeout: '56:00:00',
status: 6
},
{
date: '12/1/2018',
@@ -411,7 +416,8 @@
transfer_amount: 'RMB 10000',
status: '(6/6)',
status_desc: 'Order Completed',
timeout: '56:00:00'
timeout: '56:00:00',
status: 6
}
],
bookingConfirmTable: {
@@ -423,6 +429,7 @@
rate: 'undefined',
bankin_amount: 'undefined',
china_beneficiary: 'undefined',
status: 2
}
}
},
@@ -521,10 +528,10 @@
return
})
},
BookingStatus(index, row) {
BookingStatus(status, row) {
console.log(status)
// TODO : Get booking status from server
this.status = 2
this.status = status
switch (this.status) {
case 1: