master
parent
59a0d1c07e
commit
57d5c3b8c5
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal :width="60" :title="name+'订单列表'" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)"
|
||||
>
|
||||
<Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel">导出</Button>
|
||||
<xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300">
|
||||
<template v-slot:btns>
|
||||
<div></div>
|
||||
</template>
|
||||
</xy-table>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {show} from "@/api/activity"
|
||||
import {
|
||||
download
|
||||
} from '@/utils/downloadRequest'
|
||||
export default {
|
||||
props:{
|
||||
id:Number,
|
||||
name:String,
|
||||
isShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
table:[
|
||||
{
|
||||
prop: "name",
|
||||
label: "姓名",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "wechat_nickname",
|
||||
label: "微信昵称",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
label: "头像",
|
||||
width: 80,
|
||||
prop:"members.avatar",
|
||||
customFn: (row) => {
|
||||
return ( < div style = {
|
||||
{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}
|
||||
} > <el-avatar src = {
|
||||
row.members?.avatar
|
||||
} > </el-avatar></div > )
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
prop: "phone",
|
||||
label: "联系电话",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "address",
|
||||
label: "区域",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "budget_date",
|
||||
label: "预产期",
|
||||
// width: 120
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getOrder(){
|
||||
await show({
|
||||
id:this.id
|
||||
}).then(res=>{
|
||||
for(var k of res.apply){
|
||||
k.wechat_nickname = k.members?k.members.wechat_nickname:""
|
||||
}
|
||||
this.list = res.apply
|
||||
})
|
||||
|
||||
},
|
||||
downloadExel(){
|
||||
// this.$Print('#print')
|
||||
this.$Export.excel({
|
||||
title: this.name,
|
||||
columns: this.table,
|
||||
data: this.list
|
||||
});
|
||||
// download(
|
||||
// '/api/admin/active/show',
|
||||
// 'get', {
|
||||
// id:this.id
|
||||
// },
|
||||
// this.name+'.xlsx')
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
isShow(newVal){
|
||||
if(newVal){
|
||||
this.getOrder()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Loading…
Reference in new issue