master
lion 2 years ago
parent 2c19ac9772
commit 1306d7c9c5

@ -3,4 +3,4 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = https://yunyubang.ali251.langye.net/
VUE_APP_BASE_DEV_API = https://yybtest.ali251.langye.net/

@ -17,6 +17,22 @@ export function reporttotal(params){
})
}
export function returnCount(params){
return request({
method:'get',
url:'/api/admin/home/return-count',
params
})
}
export function typeCount(params){
return request({
method:'get',
url:'/api/admin/home/add-order-count',
params
})
}
export function store(data){
return request({
method:'post',

@ -252,6 +252,20 @@ font-size: 15px;
cursor: pointer;
color:#bf617c
}
.ivu-modal-fullscreen{
.ivu-modal{
width:100%!important
}
.ivu-modal-content{
height:100vh
}
.ivu-modal-body{
max-height: 100vh !important;
min-height: 300px;
overflow: scroll;
}
}
.vertical-full-modal{
.ivu-modal{
width:100%!important

@ -189,7 +189,7 @@ export default {
page_size:10,
sort_name:'',
sort_type:''
},
}
};
},
methods: {
@ -419,8 +419,10 @@ export default {
leave-to-class="slide-out-down"
>
<Page
page-size-opts={this.pageSizeOpts}
show-total={true}
current={this.selectOpt.page}
page-size={this.pageSize}
v-show={this.isShowPage}
total={this.action ? (this.totalData || this.listData.length) : this.total}
@ -442,6 +444,7 @@ export default {
this.selectOpt.page = e
this.getTableData()
}
this.selectOpt.page = e
this.$emit("pageIndexChange", e)
}
}}
@ -583,6 +586,13 @@ export default {
created() {
this.getTableData()
},
watch:{
total(newval){
if(newval){
this.selectOpt.page=1
}
}
},
mounted() {
this.initLoad();
},

@ -59,10 +59,10 @@
<el-dropdown-item :divided="!index">
<div style="display: flex; align-items: center">
<div v-for="(value, key) in item.data">
<div v-if="key!='order_item_id'">
<div v-if="key=='通知'">
{{timeymd(item.created_at)}} {{ key }} : {{ value }}
</div>
<div v-else>
<div v-else-if="key=='order_item_id'">
<Button
style="margin-left: 10px;"
size="small"
@ -71,8 +71,6 @@
>查看订单</Button>
</div>
</div>
<Button
style="margin-left: 10px;"
size="small"

@ -5,6 +5,7 @@ import { getToken } from '@/utils/auth'
let loading;
// create an axios instance
// console.log("process.env.ENV",process.env.NODE_ENV)
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests

@ -1,7 +1,7 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="活动关联方" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" text="活动分类" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Button icon="ios-add" type="primary" style="margin-right: 10px;" @click="$refs['addActivityType'].isShow = true,$refs['addActivityType'].type = 'add'">添加</Button>

@ -150,7 +150,7 @@
<template v-slot:active_type_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
活动分类
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span> 活动分类
</div>
<div class="xy-table-item-content">
<el-select style="width: 300px;" v-model="form.active_type_id" placeholder="请选择">
@ -426,9 +426,9 @@ companykeyword:"",
// shopId:[
// {required:true,message:''}
// ],
// sponsor:[
// {required:true,message:''}
// ],
active_type_id:[
{required:true,message:'请选择活动分类'}
],
date:[
{required:true,message:'请选择活动日期'}
],

@ -11,7 +11,7 @@
</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">
<xy-table id="print" :is-page="false" :list="list" :table-item="table">
<template v-slot:btns>
<div></div>
</template>
@ -41,6 +41,18 @@
isFullScreen: false,
list: [],
table: [{
prop: "created_at",
label: "报名时间",
width: 180
}, {
prop: "used_time_name",
label: "是否核销",
width: 120
}, {
prop: "code",
label: "核销码",
width: 120
}, {
prop: "name",
label: "姓名",
width: 120
@ -63,7 +75,7 @@
}
} > <el-avatar src = {
row.members?.avatar
} > </el-avatar></div> )
} > </el-avatar></div > )
}
},
@ -85,7 +97,7 @@
{
prop: "budget_date",
label: "预产期",
// width: 120
width: 120
},
{
prop: "hospital",
@ -101,12 +113,7 @@
prop: "spread_member_phone",
label: "推广人号码",
width: 120
},
{
prop: "used_time_name",
label: "是否核销",
width: 120
},
}
],
}
@ -154,17 +161,19 @@
}
</script>
<style scoped lang="scss">
<style scoped>
.ivu-modal-header-wrap {
margin-bottom: 10px;
padding-top: 0;
}
.ivu-modal-screen {
top: 16px;
}
}
.ivu-modal-close {
top: 7px
}
}
/deep/ .ivu-modal-fullscreen .el-table{
height: 100vh !important;
}
</style>

@ -22,6 +22,8 @@ export default {
action:'',
content:'',
operations:{},
orderInfo:{},
valueFormate:"yyyy-MM-dd HH:mm:ss",
operationsLen:false,
manuallyRefundFee:0,
form:{
@ -31,7 +33,8 @@ export default {
product_id:"",
merchant_name:"",
product_name:"",
manually_refund_fee:''
manually_refund_fee:'',
next_follow_time:""
}
}
}
@ -208,6 +211,25 @@ export default {
</div>
</div>:''}
{this.action=='follow'&&this.orderInfo.state=='pending'?<div class="action-form-item">
<div class="action-form-label">下次跟进时间</div>
<div class="action-form-content">
<el-date-picker
value={this.form.follow.next_follow_time}
type="datetime"
value-format='yyyy-MM-dd HH:mm:ss'
placeholder="选择下次跟进时间"
on={{
['input']:(e)=>{
console.log("this.form",this.form)
this.form.follow.next_follow_time = e
}
}}>
</el-date-picker>
</div>
</div>:''}
<div class="action-form-item">
<div class="action-form-label">内容</div>
@ -255,7 +277,7 @@ export default {
console.log(this.content)
this.isShow = true;
this.operations=res.operations;
this.orderInfo = res.vo
if(JSON.stringify(this.operations)!="{}"&&this.operations.length!=0){
let manually_refund_fee=0;
let data=this.operations;
@ -286,16 +308,20 @@ export default {
}
break
default:
console.log()
data = {
item_id:this.row.id,
action:this.action,
remark:this.form.follow.content
remark:this.form.follow.content,
next_follow_time:this.form.follow.next_follow_time
}
if(this.operationsLen){
data.manually_refund_fee=this.form.follow.manually_refund_fee;
}
break;
}
console.log("data",data)
// return
itemAction(data).then(res => {
console.log(res)
Message({

@ -40,6 +40,11 @@ export default {
return parseTime(new Date(value),'{y}-{m}-{d}')
}
},
{
label:'下次跟进时间',
prop:'next_follow_time',
width: 160
},
{
label:'操作',
prop:'operate_name',

@ -154,7 +154,6 @@
import orderLog from '@/views/order/component/orderLog'
import actions from '@/views/order/component/actions'
import orderEdit from '@/views/order/component/orderEdit'
export default {
components: {
orderLog,

@ -6,8 +6,12 @@
</lx-header>
</div>
<xy-table :total="total" :isPage='false' :list="list" :table-item="table">
<div style="margin-bottom:20px">
<el-date-picker v-model="dateRange" type="daterange" value-format="yyyy-MM-dd" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="dateChange">
</el-date-picker>
</div>
<xy-table :isPage='false' :list="list" :table-item="table">
<template slot="btns">
<div></div>
</template>
@ -29,9 +33,11 @@
data() {
return {
select: {
},
total: 0,
start_date:'',
end_date:""
},
today:'',
dateRange:[],
list: [],
table: [{
prop: 'name',
@ -40,13 +46,18 @@
},
{
prop: 'total_order_person',
label: '下单人总数',
label: '下单人总数(含取消)',
width: 180
},
{
prop: 'total_order_all',
label: '下单总数',
label: '下单总订单(不含取消)',
width: 180
},
{
prop: 'total_order_cancel_all',
label: '下单取消数',
width: 180
},
{
prop: 'total_order',
@ -69,17 +80,39 @@
]
}
},
methods: {
methods: {
dateChange(e){
if(e){
this.select.start_date = e[0]
this.select.end_date = e[1]
}else{
this.select.start_date = '2000-01-01'
this.select.end_date = this.today
}
this.getTotal()
},
async initTotal(){
const res = await reporttotal({
start_date:'2000-01-01',
end_date:this.select.end_date
})
// this.total = res.total
this.list = res
},
async getTotal() {
const res = await reporttotal({
start_date:this.select.start_date,
end_date:this.select.end_date
})
this.total = res.total
this.list = res
}
},
mounted() {
this.getTotal()
mounted() {
let date = new Date()
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1):date.getMonth()+1
this.today = date.getFullYear()+'-'+month+'-'+date.getDate()
this.select.end_date = this.today
this.initTotal()
}
}
@ -105,4 +138,4 @@
}
}
}
</style>
</style>

@ -0,0 +1,109 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="退单统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
</lx-header>
</div>
<div>
<el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateChange">
</el-date-picker>
</div>
<div class="totals">
<p><span>总退单人数</span><span>{{list.total_return_order_person}}</span></p>
<p><span>退单后仍会下单人数</span><span>{{list.total_return_order_once_more_person}}</span></p>
<p><span>退单后不再下单人数</span><span>{{list.total_return_order_no_person}}</span></p>
<p><span>不再下单人数占退单总退单人数比例</span><span>{{returnPer(list.percentage)}}</span></p>
</div>
</div>
</template>
<script>
import {
returnCount
} from '@/api/type'
import {
Message
} from 'element-ui'
export default {
components: {},
data() {
return {
select: {
start_date:"",
end_date:""
},
dateRange:[],
list: {},
today:''
}
},
methods: {
async initTotal(){
const res = await returnCount({
start_date:'2000-01-01',
end_date:this.select.end_date
})
// this.total = res.total
this.list = res.return_list.total
},
async getTotal() {
const res = await returnCount({
start_date:this.select.start_date,
end_date:this.select.end_date
})
// this.total = res.total
this.list = res.return_list.total
},
dateChange(e){
if(e){
this.select.start_date = e[0]
this.select.end_date = e[1]
}else{
this.select.start_date = '2000-01-01'
this.select.end_date = this.today
}
this.getTotal()
},
returnPer(val){
return val?val.toFixed(4)*100 + "%":0
},
},
mounted() {
let date = new Date()
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1):date.getMonth()+1
this.today = date.getFullYear()+'-'+month+'-'+date.getDate()
this.select.end_date = this.today
this.initTotal()
}
}
</script>
<style scoped lang="scss">
.totals{
border-bottom:1px solid #ddd;
margin-top:20px;
}
.totals p{
font-size: 20px;
border:1px solid #ddd;
border-bottom:none
}
.totals span{
padding: 10px;
width:50%;
display: inline-block;
border-right: 1px solid #ddd;
}
</style>

@ -0,0 +1,144 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="板块订单统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
</lx-header>
</div>
<div>
<el-date-picker style="margin-left:10px" v-model="dateRange" type="daterange" value-format="yyyy-MM-dd"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateChange">
</el-date-picker>
<el-cascader ref="typeCas" style="margin-left:10px" v-model="select.product_type_list" :options="options"
:props="props" collapse-tags @change="changeType" @remove-tag="removeType" clearable></el-cascader>
<el-button style="margin-left:10px" type="primary" @click="getTotal"></el-button>
</div>
<!-- <div class='typetitle'>
{{typeName}}
</div> -->
<div class="totals">
<p><span>下单人数</span><span>{{list.add_total_order}}</span></p>
<p><span>多板块下单人数</span><span>{{list.total_order_more_type_person}}</span></p>
</div>
</div>
</template>
<script>
import {
index as getType
} from "@/api/type"
import {
typeCount
} from '@/api/type'
import {
Message
} from 'element-ui'
export default {
components: {},
data() {
return {
select: {
start_date: "",
end_date: "",
product_type_list: []
},
typeName: '所有',
dateRange: [],
list: {},
today: '',
options: [],
props: {
value: 'id',
label: 'name',
multiple: true,
checkStrictly: true
}
}
},
methods: {
async getTypes() {
const res = await getType()
this.options = res
},
changeType(e) {
this.select.product_type_list = e
if (this.select.product_type_list.length < 1) {
this.typeName = '所有'
} else {
let obj = this.$refs['typeCas'].getCheckedNodes()
let names = ''
for (var k of obj) {
names += k.label + "、"
}
this.typeName = names
}
},
removeType(e) {},
async initTotal() {
const res = await typeCount({
start_date: '2000-01-01',
end_date: this.select.end_date
})
// this.total = res.total
this.list = res.return_list.total
},
async getTotal() {
const res = await typeCount({
start_date: this.select.start_date,
end_date: this.select.end_date,
product_type_list: this.select.product_type_list
})
// this.total = res.total
this.list = res.return_list.total
},
dateChange(e) {
if (e) {
this.select.start_date = e[0]
this.select.end_date = e[1]
} else {
this.select.start_date = '2000-01-01'
this.select.end_date = this.today
}
this.getTotal()
}
},
mounted() {
let date = new Date()
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
this.today = date.getFullYear() + '-' + month + '-' + date.getDate()
this.select.end_date = this.today
this.getTypes()
this.initTotal()
}
}
</script>
<style scoped lang="scss">
.totals {
border-bottom: 1px solid #ddd;
margin-top: 20px;
}
.typetitle {
font-size: 20px;
padding: 10px;
}
.totals p {
font-size: 20px;
border: 1px solid #ddd;
border-bottom: none
}
.totals span {
padding: 10px;
width: 50%;
display: inline-block;
border-right: 1px solid #ddd;
}
</style>

@ -21,6 +21,18 @@
</div>
<div class="selector-item">
<el-checkbox v-model="select.is_phone"></el-checkbox>
</div>
<div class="selector-item">
<div class="selector-item__label">下单查询</div>
<el-date-picker
v-model="dateRange"
@change='dateChange'
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div class="selector-item">
<Button type="primary" @click="doSearch"></Button>
@ -69,8 +81,11 @@
keywords: "",
area: "",
hospital: "",
is_phone: true
},
is_phone: true,
create_time:'',
over_time:''
},
dateRange:[],
areas: ["吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"],
total: 0,
@ -127,6 +142,12 @@
<span>{row.order_sum?row.order_sum:'0.00'}</span>
)
}
},
{
prop: 'order_finish',
label: '核销数',
width: 180,
align:"center"
},
{
prop: 'due_date',
@ -173,7 +194,16 @@
]
}
},
methods: {
methods: {
dateChange(e){
if(e){
this.select.create_time = this.dateRange[0]
this.select.over_time = this.dateRange[1]
}else{
this.select.create_time = ''
this.select.over_time = ''
}
},
pageSizeChange(e) {
this.select.pageSize = e
@ -195,7 +225,9 @@
keyword: this.select.keywords,
hospital: this.select.hospital,
area: this.select.area,
is_phone: this.select.is_phone ? 1 : ""
is_phone: this.select.is_phone ? 1 : "",
create_time:this.select.create_time,
over_time:this.select.over_time
})
this.total = res.total
this.list = res.data
@ -237,5 +269,20 @@
word-break: keep-all;
}
}
}
.el-range-editor.el-input__inner{
height:32px;
width:250px;
}
.el-date-editor{
::v-deep .el-range__icon{
line-height: 26px!important;
}
::v-deep .el-range-separator{
line-height: 26px!important;
}
::v-deep .el-range__close-icon{
line-height: 26px!important;
}
}
</style>

Loading…
Cancel
Save