要改列印的功能
This commit is contained in:
@@ -57,7 +57,6 @@
|
||||
{{ item.u_name }}
|
||||
</template>
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
||||
<a @click="$root.currentView='step-two';$root.selected_act=item.num" class="btn btn-outline-secondary btn-sm">明細</a>
|
||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||
</template>
|
||||
@@ -625,9 +624,56 @@
|
||||
|
||||
Vue.component('step-two', {
|
||||
template: `
|
||||
<div class="container-fluid">QOO</div>
|
||||
`,
|
||||
props: ['oneData'],
|
||||
<div class="container-fluid">
|
||||
<v-data-table
|
||||
v-model="detail_table.selected"
|
||||
:items="detail_table.list"
|
||||
:search-props="search"
|
||||
item-key="order_no"
|
||||
:options.sync="options"
|
||||
:headers="detail_table.header"
|
||||
:footer-props="detail_table.footer"
|
||||
:server-items-length="detail_table.count"
|
||||
:loading="detail_table.loading"
|
||||
:single-select="detail_table.singleSelect"
|
||||
show-select
|
||||
hide-default-footer
|
||||
:page.sync="detail_table.page"
|
||||
:items-per-page.sync="detail_table.pageSize"
|
||||
class="elevation-1">
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
||||
<a @click="$root.currentView='step-three';$root.selected_order=item.order_no" class="btn btn-outline-secondary btn-sm">明細</a>
|
||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap>
|
||||
<v-col cols="12" md="9">
|
||||
<v-pagination
|
||||
v-model="detail_table.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ detail_table.count }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field
|
||||
v-model="detail_table.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="detail_table.page = parseInt($event, 10)"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>`,
|
||||
|
||||
props: ['twoData'],
|
||||
activated() {
|
||||
console.log("yes ,go go");
|
||||
this.getDetail();
|
||||
@@ -655,6 +701,20 @@
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: [5, 10, 20, 30],
|
||||
},
|
||||
},
|
||||
search: {
|
||||
keyin1: '',
|
||||
order_no: '',
|
||||
subject: '',
|
||||
u_name: '',
|
||||
up_time1: '',
|
||||
up_time2: '',
|
||||
actItemTxt: '',
|
||||
introducerTxt: '',
|
||||
activity_num: '',
|
||||
country: '',
|
||||
country2: '',
|
||||
hasPrice: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -671,12 +731,15 @@
|
||||
getDetail() {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
page: clearpage ? '1' : page, pageSize: itemsPerPage,
|
||||
activity_num: $root.selected_act
|
||||
//sortBy: sortBy == undefined ? "order_no" : sortBy[0],
|
||||
//sortDesc: sortDesc == undefined ? "" : sortDesc[0],
|
||||
//page: clearpage ? '1' : page, pageSize: itemsPerPage,
|
||||
page:'1',pageSize:10,
|
||||
|
||||
};
|
||||
this.search = { activity_num: this.$root.selected_act }
|
||||
this.detail_table.loading = true
|
||||
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||
sessionStorage.setItem('orderpage','1');// clearpage ? '1' : page
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||
.then(response => {
|
||||
@@ -686,18 +749,108 @@
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Vue.component('step-three', {
|
||||
template: `<div>放報名資料</div>`,
|
||||
props:['signData']
|
||||
});
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(),
|
||||
data() {
|
||||
return {
|
||||
currentView: 'step-one',
|
||||
selected_act:'',
|
||||
selected_act: '',
|
||||
selected_order:'',
|
||||
};
|
||||
},activated() {
|
||||
console.log("yes ,go go");
|
||||
this.getDetail();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
sign_table: {
|
||||
loading: true,
|
||||
list: [],
|
||||
selected: [],
|
||||
singleSelect: false,
|
||||
count: 0,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
header: [
|
||||
{ text: '單號', value: 'order_no' },
|
||||
{ text: '姓名', value: 'u_name' },
|
||||
{ text: '報名日期', value: 'up_time' },
|
||||
{ text: '單據狀態', value: 'keyin1_txt', align: 'start' },
|
||||
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
|
||||
],
|
||||
footer: {
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: [5, 10, 20, 30],
|
||||
},
|
||||
},
|
||||
search: {
|
||||
keyin1: '',
|
||||
order_no: '',
|
||||
subject: '',
|
||||
u_name: '',
|
||||
up_time1: '',
|
||||
up_time2: '',
|
||||
actItemTxt: '',
|
||||
introducerTxt: '',
|
||||
activity_num: '',
|
||||
country: '',
|
||||
country2: '',
|
||||
hasPrice: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getDetail()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
//sortBy: sortBy == undefined ? "order_no" : sortBy[0],
|
||||
//sortDesc: sortDesc == undefined ? "" : sortDesc[0],
|
||||
//page: clearpage ? '1' : page, pageSize: itemsPerPage,
|
||||
page: '1', pageSize: 10,
|
||||
|
||||
};
|
||||
this.search = { activity_num: this.$root.selected_act }
|
||||
this.detail_table.loading = true
|
||||
sessionStorage.setItem('orderpage', '1');// clearpage ? '1' : page
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||
.then(response => {
|
||||
this.detail_table.list = response.data.list
|
||||
this.detail_table.count = response.data.count;
|
||||
this.detail_table.loading = false
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user