parent
275d4552ec
commit
8c7a9272e3
@ -1,166 +1,170 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen' @on-visible-change="$emit('update:isShow',$event)"
|
<Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen'
|
||||||
>
|
@on-visible-change="$emit('update:isShow',$event)">
|
||||||
<div class="ivu-modal-header ivu-modal-header-wrap">
|
<div class="ivu-modal-header ivu-modal-header-wrap">
|
||||||
<div v-solt:header>
|
<template v-solt:header>
|
||||||
{{name+'订单列表'}}
|
{{name+'订单列表'}}
|
||||||
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i :class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
|
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i
|
||||||
</div>
|
:class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
|
||||||
</div>
|
</template>
|
||||||
|
</div>
|
||||||
<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">
|
<Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel">导出</Button>
|
||||||
<template v-slot:btns>
|
<xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300">
|
||||||
<div></div>
|
<template v-slot:btns>
|
||||||
</template>
|
<div></div>
|
||||||
</xy-table>
|
</template>
|
||||||
</Modal>
|
</xy-table>
|
||||||
</div>
|
</Modal>
|
||||||
</template>
|
</div>
|
||||||
|
</template>
|
||||||
<script>
|
|
||||||
import {show} from "@/api/activity"
|
<script>
|
||||||
|
import {
|
||||||
|
show
|
||||||
|
} from "@/api/activity"
|
||||||
import {
|
import {
|
||||||
download
|
download
|
||||||
} from '@/utils/downloadRequest'
|
} from '@/utils/downloadRequest'
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props: {
|
||||||
id:Number,
|
id: Number,
|
||||||
name:String,
|
name: String,
|
||||||
isShow:{
|
isShow: {
|
||||||
type:Boolean,
|
type: Boolean,
|
||||||
default:false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isFullScreen:false,
|
isFullScreen: false,
|
||||||
list:[],
|
list: [],
|
||||||
table:[
|
table: [{
|
||||||
{
|
prop: "name",
|
||||||
prop: "name",
|
label: "姓名",
|
||||||
label: "姓名",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "wechat_nickname",
|
||||||
prop: "wechat_nickname",
|
label: "微信昵称",
|
||||||
label: "微信昵称",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
label: "头像",
|
||||||
label: "头像",
|
width: 80,
|
||||||
width: 80,
|
prop: "members.avatar",
|
||||||
prop:"members.avatar",
|
customFn: (row) => {
|
||||||
customFn: (row) => {
|
return ( <div style = {
|
||||||
return ( < div style = {
|
{
|
||||||
{
|
display: 'flex',
|
||||||
display: 'flex',
|
alignItems: 'center',
|
||||||
alignItems: 'center',
|
justifyContent: 'center'
|
||||||
justifyContent: 'center'
|
}
|
||||||
}
|
} > <el-avatar src = {
|
||||||
} > <el-avatar src = {
|
row.members?.avatar
|
||||||
row.members?.avatar
|
} > </el-avatar></div> )
|
||||||
} > </el-avatar></div > )
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
|
{
|
||||||
{
|
prop: "phone",
|
||||||
prop: "phone",
|
label: "联系电话",
|
||||||
label: "联系电话",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "area",
|
||||||
prop: "area",
|
label: "区域",
|
||||||
label: "区域",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "address",
|
||||||
prop: "address",
|
label: "地址",
|
||||||
label: "地址",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "budget_date",
|
||||||
prop: "budget_date",
|
label: "预产期",
|
||||||
label: "预产期",
|
// width: 120
|
||||||
// width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "hospital",
|
||||||
prop: "hospital",
|
label: "建卡医院",
|
||||||
label: "建卡医院",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "spread_member_name",
|
||||||
prop: "spread_member_name",
|
label: "推广渠道",
|
||||||
label: "推广渠道",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "spread_member_phone",
|
||||||
prop: "spread_member_phone",
|
label: "推广人号码",
|
||||||
label: "推广人号码",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: "used_time_name",
|
||||||
prop: "used_time_name",
|
label: "是否核销",
|
||||||
label: "是否核销",
|
width: 120
|
||||||
width: 120
|
},
|
||||||
},
|
|
||||||
|
],
|
||||||
],
|
}
|
||||||
}
|
},
|
||||||
},
|
methods: {
|
||||||
methods: {
|
closeshowChange() {},
|
||||||
closeshowChange(){},
|
fullScreen() {},
|
||||||
fullScreen(){},
|
async getOrder() {
|
||||||
async getOrder(){
|
await show({
|
||||||
await show({
|
id: this.id
|
||||||
id:this.id
|
}).then(res => {
|
||||||
}).then(res=>{
|
for (var k of res.apply) {
|
||||||
for(var k of res.apply){
|
k.wechat_nickname = k.members ? k.members.wechat_nickname : ""
|
||||||
k.wechat_nickname = k.members?k.members.wechat_nickname:""
|
k.used_time_name = k.used_time ? '已核销' : '待核销'
|
||||||
k.used_time_name = k.used_time ? '已核销':'待核销'
|
k.spread_member_name = k.spread_member ? k.spread_member.name : ''
|
||||||
k.spread_member_name = k.spread_member?k.spread_member.name:''
|
k.spread_member_phone = k.spread_member ? k.spread_member.phone : ''
|
||||||
k.spread_member_phone = k.spread_member?k.spread_member.phone:''
|
}
|
||||||
}
|
this.list = res.apply
|
||||||
this.list = res.apply
|
})
|
||||||
})
|
|
||||||
|
},
|
||||||
},
|
downloadExel() {
|
||||||
downloadExel(){
|
// this.$Print('#print')
|
||||||
// this.$Print('#print')
|
this.$Export.excel({
|
||||||
this.$Export.excel({
|
title: this.name,
|
||||||
title: this.name,
|
columns: this.table,
|
||||||
columns: this.table,
|
data: this.list
|
||||||
data: this.list
|
});
|
||||||
});
|
// download(
|
||||||
// download(
|
// '/api/admin/active/show',
|
||||||
// '/api/admin/active/show',
|
// 'get', {
|
||||||
// 'get', {
|
// id:this.id
|
||||||
// id:this.id
|
// },
|
||||||
// },
|
// this.name+'.xlsx')
|
||||||
// this.name+'.xlsx')
|
}
|
||||||
}
|
},
|
||||||
},
|
watch: {
|
||||||
watch:{
|
isShow(newVal) {
|
||||||
isShow(newVal){
|
if (newVal) {
|
||||||
if(newVal){
|
this.getOrder()
|
||||||
this.getOrder()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
|
||||||
|
<style scoped lang="scss">
|
||||||
<style scoped lang="scss">
|
.ivu-modal-header-wrap {
|
||||||
.ivu-modal-header-wrap{
|
margin-bottom: 10px;
|
||||||
margin-bottom:10px;
|
padding-top: 0;
|
||||||
padding-top: 0;
|
|
||||||
.ivu-modal-screen{
|
.ivu-modal-screen {
|
||||||
top:16px;
|
top: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ivu-modal-close{
|
|
||||||
top:7px
|
.ivu-modal-close {
|
||||||
}
|
top: 7px
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in new issue