parent
275d4552ec
commit
8c7a9272e3
@ -1,166 +1,170 @@
|
||||
<template>
|
||||
<div>
|
||||
<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 v-solt:header>
|
||||
{{name+'订单列表'}}
|
||||
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i :class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
|
||||
</div>
|
||||
</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">
|
||||
<template v-slot:btns>
|
||||
<div></div>
|
||||
</template>
|
||||
</xy-table>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {show} from "@/api/activity"
|
||||
<template>
|
||||
<div>
|
||||
<Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen'
|
||||
@on-visible-change="$emit('update:isShow',$event)">
|
||||
<div class="ivu-modal-header ivu-modal-header-wrap">
|
||||
<template v-solt:header>
|
||||
{{name+'订单列表'}}
|
||||
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i
|
||||
:class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
|
||||
</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">
|
||||
<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 {
|
||||
isFullScreen:false,
|
||||
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: "area",
|
||||
label: "区域",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "address",
|
||||
label: "地址",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "budget_date",
|
||||
label: "预产期",
|
||||
// width: 120
|
||||
},
|
||||
{
|
||||
prop: "hospital",
|
||||
label: "建卡医院",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "spread_member_name",
|
||||
label: "推广渠道",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "spread_member_phone",
|
||||
label: "推广人号码",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "used_time_name",
|
||||
label: "是否核销",
|
||||
width: 120
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeshowChange(){},
|
||||
fullScreen(){},
|
||||
async getOrder(){
|
||||
await show({
|
||||
id:this.id
|
||||
}).then(res=>{
|
||||
for(var k of res.apply){
|
||||
k.wechat_nickname = k.members?k.members.wechat_nickname:""
|
||||
k.used_time_name = k.used_time ? '已核销':'待核销'
|
||||
k.spread_member_name = k.spread_member?k.spread_member.name:''
|
||||
k.spread_member_phone = k.spread_member?k.spread_member.phone:''
|
||||
}
|
||||
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">
|
||||
.ivu-modal-header-wrap{
|
||||
margin-bottom:10px;
|
||||
padding-top: 0;
|
||||
.ivu-modal-screen{
|
||||
top:16px;
|
||||
}
|
||||
}
|
||||
.ivu-modal-close{
|
||||
top:7px
|
||||
}
|
||||
} from '@/utils/downloadRequest'
|
||||
export default {
|
||||
props: {
|
||||
id: Number,
|
||||
name: String,
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isFullScreen: false,
|
||||
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: "area",
|
||||
label: "区域",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "address",
|
||||
label: "地址",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "budget_date",
|
||||
label: "预产期",
|
||||
// width: 120
|
||||
},
|
||||
{
|
||||
prop: "hospital",
|
||||
label: "建卡医院",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "spread_member_name",
|
||||
label: "推广渠道",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "spread_member_phone",
|
||||
label: "推广人号码",
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: "used_time_name",
|
||||
label: "是否核销",
|
||||
width: 120
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeshowChange() {},
|
||||
fullScreen() {},
|
||||
async getOrder() {
|
||||
await show({
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
for (var k of res.apply) {
|
||||
k.wechat_nickname = k.members ? k.members.wechat_nickname : ""
|
||||
k.used_time_name = k.used_time ? '已核销' : '待核销'
|
||||
k.spread_member_name = k.spread_member ? k.spread_member.name : ''
|
||||
k.spread_member_phone = k.spread_member ? k.spread_member.phone : ''
|
||||
}
|
||||
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">
|
||||
.ivu-modal-header-wrap {
|
||||
margin-bottom: 10px;
|
||||
padding-top: 0;
|
||||
|
||||
.ivu-modal-screen {
|
||||
top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.ivu-modal-close {
|
||||
top: 7px
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in new issue