master
lion 3 years ago
parent 59a0d1c07e
commit 57d5c3b8c5

@ -2,5 +2,5 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = https://yybtest.ali251.langye.net/
#VUE_APP_BASE_API = https://yunyubang.ali251.langye.net/
#VUE_APP_BASE_API = https://yybtest.ali251.langye.net/
VUE_APP_BASE_API = https://yunyubang.ali251.langye.net/

@ -14,7 +14,8 @@
</script>
<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=1a9ee0079fcb3c6c64c96dc903989994&plugin=AMap.PlaceSearch'></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script src="https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js"></script>
<script src="https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js"></script>
</head>
<body>
<noscript>

@ -39,3 +39,11 @@ export function destroy(data){
data
})
}
export function getActiveOrder(params){
return request({
method:'get',
url:'/api/admin/active/index',
params
})
}

@ -21,6 +21,7 @@
@editor="editorActivity"></xy-table>
<addActivity ref="addActivity" @refresh="getActivities"></addActivity>
<showActiveOrder :id="activeId" :name="activeName" :is-show.sync="isShowOrder"></showActiveOrder>
</div>
</template>
@ -28,10 +29,12 @@
import {index,destroy} from "@/api/activity"
import addActivity from '@/views/activity/component/addActivity'
import showActiveOrder from '@/views/activity/component/showActiveOrder'
import { Message } from 'element-ui'
export default {
components:{
addActivity
addActivity,
showActiveOrder
},
data() {
return {
@ -42,6 +45,9 @@ export default {
total:0,
list:[],
isShowOrder:false,
activeId:null,
activeName:"",
table:[
{
label:"活动名称",
@ -114,6 +120,14 @@ export default {
{
label:"开放名额",
width: 140,
prop:'member_sum',
formatter:(cell,data,value)=>{
return value ?? 0
}
},
{
label:"初始活动名额",
width: 140,
prop:'start_member_sum',
formatter:(cell,data,value)=>{
return value ?? 0
@ -123,16 +137,43 @@ export default {
label:"剩余名额",
width: 140,
customFn:(row)=>{
return (<div>{row?.start_member_sum - row?.member_sum}</div>)
return (<div>{row?.member_sum - row?.start_member_sum - row?.total}</div>)
}
},
{
label:"报名次数",
width: 140,
prop:'member_sum',
formatter:(cell,data,value)=>{
return value ?? 0
}
prop:'total',
customFn: (cell) => {
return ( < div style = {
{
cursor: 'pointer',
color: "blue"
}
}
on = {
{
['click']: (e) => {
if(cell.total<1){
return
}
this.activeId = cell.id;
this.activeName = cell.active_name
this.isShowOrder = true;
}
}
}
>
{
cell.total?cell.total:0
} </div> )
}
// formatter:(cell,data,value)=>{
// return value ?? 0
// }
},
{
label:"状态",

@ -158,6 +158,16 @@
</div>
</div>
</template>
<template v-slot:memberSum>
<div class="xy-table-item">
<div class="xy-table-item-label">
活动人数
</div>
<div class="xy-table-item-content">
<el-input-number :precision="0" :controls="false" v-model="form.memberSum" placeholder="请输入活动人数" clearable style="width: 300px;"></el-input-number>
</div>
</div>
</template>
<template v-slot:startMemberSum>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -255,7 +265,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>活动内容:
</div>
<div class="xy-table-item-content" style="width: 680px;">
<xyTinymce :height="200" v-model="form.content"></xyTinymce>
<xyTinymce v-if="isShow" :height="200" v-model="form.content"></xyTinymce>
</div>
</div>
</template>
@ -305,6 +315,7 @@ export default {
phoneNumber:"",
group:"",
startMemberSum:"",
memberSum:"",
greatServices:"",
applyDate:[],
money:0.00,
@ -428,6 +439,7 @@ export default {
phoneNumber:res.phone_number,
group:res.group,
startMemberSum:res.start_member_sum,
memberSum:res.member_sum,
greatServices:res.great_services,
applyDate:[res.apply_start,res.apply_end],
money:Number(res.money),
@ -456,6 +468,7 @@ export default {
phone_number:this.form.phoneNumber,
group:this.form.group,
start_member_sum:this.form.startMemberSum,
member_sum:this.form.member_sum,
content:this.form.content,
great_services:this.form.greatServices,
money:this.form.money,
@ -466,7 +479,7 @@ export default {
}).then(res => {
Message({
type:'success',
message:'新增活动成'
message:'新增活动成'
})
this.isShow = false
this.$emit('refresh')
@ -492,6 +505,7 @@ export default {
phone_number:this.form.phoneNumber,
group:this.form.group,
start_member_sum:this.form.startMemberSum,
member_sum:this.form.memberSum,
content:this.form.content,
great_services:this.form.greatServices,
money:this.form.money,

@ -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…
Cancel
Save