master
271556543@qq.com 3 years ago
parent 0ffcea1116
commit d7ec486141

@ -8,7 +8,7 @@ let loading;
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 5000, // request timeout
timeout: 10000, // request timeout
isLoading:true
})

@ -45,9 +45,10 @@ export default {
table:[
{
label:"活动名称",
width: 200,
width: 220,
prop:'active_name',
align:'left'
align:'left',
fixed:'left',
},
{
label:"活动发布方",
@ -100,7 +101,7 @@ export default {
},
{
label:"活动地址",
width: 260,
minWidth: 260,
align:'left',
prop:'address'
},

@ -106,7 +106,14 @@ export default {
},
{
prop:"state",
label: "状态"
label: "状态",
customFn:(row)=>{
if(row.state == 1 || row.state === 'active'){
return (<div style={{'color':'green'}}>启用</div>)
}else{
return (<div style={{'color':'red'}}>禁用</div>)
}
}
}
]

@ -4,25 +4,43 @@
<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 class="select" icon="ios-add" type="primary" style="margin-right: 10px;" @click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'recharge'">商家充值</Button>
<Button class="select" icon="ios-remove" type="primary" style="margin-right: 10px;" @click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'fine'">商家罚款</Button>
<Button class="select" icon="ios-add" type="primary" style="margin-right: 10px;"
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'recharge'"
>商家充值
</Button>
<Button class="select" icon="ios-remove" type="primary" style="margin-right: 10px;"
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'fine'"
>商家罚款
</Button>
<Select v-model="select.merchantId" class="select" style="width:200px;margin-right: 10px;" :clearable="true" placeholder="所属商家" filterable>
<Select v-model="select.merchantId" class="select" style="width:200px;margin-right: 10px;" :clearable="true"
placeholder="所属商家" filterable
>
<Option v-for="item in merchants" :value="item.id" :key="item.id">{{ item.username }}</Option>
</Select>
<Select v-model="select.type" class="select" style="width:200px;margin-right: 10px;" :clearable="true" placeholder="类型" filterable>
<Option v-for="item in [{label:'佣金',value:'fee'},{label:'充值',value:'recharge'},{label:'退款',value:'fine'}]" :value="item.value" :key="item.value">{{ item.label }}</Option>
<Select v-model="select.type" class="select" style="width:200px;margin-right: 10px;" :clearable="true"
placeholder="类型" filterable
>
<Option v-for="item in [{label:'',value:'fee'},{label:'',value:'recharge'},{label:'退',value:'fine'}]"
:value="item.value" :key="item.value"
>{{ item.label }}
</Option>
</Select>
<Button icon="ios-search" type="primary" style="margin-right: 10px;" @click="getFlow"></Button>
<Button icon="ios-repeat" type="primary" style="margin-right: 10px;" @click="select = {pageIndex:1,pageSize:10,merchantId:'',type:''},getFlow()">全部</Button>
<Button icon="ios-repeat" type="primary" style="margin-right: 10px;"
@click="select = {pageIndex:1,pageSize:10,merchantId:'',type:''},getFlow()"
>全部
</Button>
<Button icon="ios-download" type="primary" style="margin-right: 10px;" @click="downloadExel"></Button>
</div>
</slot>
</lx-header>
</div>
<xy-table :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :list="list" :table-item="table">
<xy-table :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :list="list"
:table-item="table"
>
<template v-slot:btns>
<div></div>
</template>
@ -33,88 +51,91 @@
</template>
<script>
import {index,getMerchants} from "@/api/finance"
import { index, getMerchants } from '@/api/finance'
import { parseTime } from '@/utils'
import {download} from '@/utils/downloadRequest'
import { download } from '@/utils/downloadRequest'
import rechargeFine from '@/views/finance/component/rechargeFine'
export default {
components:{
components: {
rechargeFine
},
data() {
return {
select:{
pageIndex:1,
pageSize:10,
merchantId:'',
type:''
select: {
pageIndex: 1,
pageSize: 10,
merchantId: '',
type: ''
},
merchants:[],
merchants: [],
total:0,
list:[],
table:[
total: 0,
list: [],
table: [
{
prop:'merchant.name',
label:"商家名称",
prop: 'merchant.name',
label: '商家名称',
width: 240,
align:'left'
align: 'left',
fixed:'left'
},
{
prop:"money",
label:"金额",
align:'right',
prop: 'money',
label: '金额',
align: 'right',
width: 140
},
{
prop:"balance",
label:"实时余额",
align:'right',
prop: 'balance',
label: '实时余额',
align: 'right',
width: 140
},
{
prop:"created_at",
label:"系统入账时间",
width:220,
formatter:(cell,data,value,index)=>{
return parseTime(new Date(value),"{y}-{m}-{d} {h}:{i}:{s}")
prop: 'created_at',
label: '系统入账时间',
width: 220,
formatter: (cell, data, value, index) => {
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}:{s}')
}
},
{
prop:"related_type_name",
label:"发生原因",
width: 140,
prop: 'related_type_name',
label: '发生原因',
width: 140
},
{
prop:"comment",
label:"备注",
align:'left'
prop: 'comment',
label: '备注',
minWidth:220,
align: 'left'
}
]
}
},
methods: {
downloadExel(){
download('/api/admin/finance/index','get',{is_export:1},'财务流水.xlsx')
downloadExel() {
download('/api/admin/finance/index', 'get', { is_export: 1 }, '财务流水.xlsx')
},
pageChange(e){
pageChange(e) {
this.select.pageIndex = e
this.getFlow()
},
async getMerchant(){
async getMerchant() {
const res = await getMerchants()
this.merchants = res
},
async getFlow(){
async getFlow() {
const res = await index({
page:this.select.pageIndex,
page_size:this.select.pageSize,
merchant_id:this.select.merchantId,
type:this.select.type
page: this.select.pageIndex,
page_size: this.select.pageSize,
merchant_id: this.select.merchantId,
type: this.select.type
})
this.list = res.data
this.total = res.total
@ -129,8 +150,8 @@ export default {
</script>
<style scoped lang="scss">
@media screen and (max-width: 1190px){
.select{
@media screen and (max-width: 1190px) {
.select {
margin-bottom: 6px;
}
}

@ -134,7 +134,8 @@ export default {
sortable:false,
width: 180,
align:'left',
prop:'name'
prop:'name',
fixed:'left'
},
{
label:'发布系统',
@ -144,7 +145,7 @@ export default {
{
label:'活动跳转',
sortable:false,
width: 300,
minWidth: 300,
align:'left',
prop:'action'
},

@ -19,6 +19,11 @@ export default {
action:'',
content:'',
form:{
follow:{
content:''
}
}
}
},
methods: {
@ -51,6 +56,28 @@ export default {
<div>产品名称</div>
<div>{this.content.vo?.order?.order_name}</div>
</div>
{
this.action === 'follow' ?
(
<div class="action-form">
<div class="action-form-label">请输入跟进内容</div>
<div class="action-form-content">
<el-input
style={{'width':'240px'}}
size='small'
value={this.form.follow.content}
on={{
['input']:(e)=>{
this.form.follow.content = e
}
}}>
</el-input>
</div>
</div>
) :
''
}
</div>
)
},
@ -67,16 +94,29 @@ export default {
})
},
actionClick(){
itemAction({
item_id:this.row.id,
action:this.action
}).then(res => {
let data ;
switch (this.action){
case 'follow':
data = {
item_id:this.row.id,
action:this.action,
remark:this.form.follow.content
}
break;
default:
data = {
item_id:this.row.id,
action:this.action
}
}
itemAction(data).then(res => {
console.log(res)
Message({
type:'success',
message:res.msg || '操作成功'
})
this.isShow = false
this.$emit('refresh')
})
}
},
@ -117,5 +157,17 @@ export default {
</script>
<style scoped lang="scss">
.action-form{
display: flex;
align-items: center;
&-label{
}
&-content{
padding: 6px 10px;
}
}
</style>

@ -77,7 +77,7 @@
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="200" header-align="center">
<template slot-scope="scope">
<actions :row="scope.row" @log="showLog(scope.row)"></actions>
<actions :row="scope.row" @log="showLog(scope.row)" @refresh="getOrders"></actions>
<!-- <Button icon="ios-chatbubbles-outline" type="primary" style="margin-left: 10px;margin-bottom: 6px;" size="small" ghost>跟进</Button>-->
<!-- <Button v-show="scope.row.state_name == ''" icon="ios-paper-plane-outline" type="primary" style="margin-left: 10px;margin-bottom: 6px;" size="small" ghost>分发</Button>-->
<!-- <Button v-show="scope.row.state_name == ''" icon="ios-close" type="primary" style="margin-left: 10px;margin-bottom: 6px;" size="small" ghost>取消</Button>-->
@ -128,7 +128,7 @@ export default {
{
prop: "order_name",
label:"订单名称",
width:220,
width:240,
align:'left',
fixed:'left'
},
@ -140,7 +140,7 @@ export default {
{
prop:"order_total",
label:"金额",
width: 110,
width: 140,
align:'right'
},
{
@ -185,13 +185,13 @@ export default {
label:"头像",
width:80,
customFn:(row)=>{
return (<div style={{display:'flex',alignItems:'center',justifyContent:'center'}}><el-avatar src={row.member.avatar}></el-avatar></div>)
return (<div style={{display:'flex',alignItems:'center',justifyContent:'center'}}><el-avatar src={row.member?.avatar}></el-avatar></div>)
}
},
{
prop:"wechat_nickname",
label:"昵称",
width: 150
width: 160
},
{
prop:"phone",

@ -67,12 +67,19 @@
<template v-slot:btns>
<el-table-column fixed="right" label="操作" :width="130" align="left" header-align="center">
<template slot-scope="scope">
<Button ghost size="small" type="primary" @click="editorClick(scope.row)" style="margin: 0 6px 4px 0">编辑</Button>
<Poptip trigger="hover" transfer placement="bottom">
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0">编辑</Button>
<div slot="content" style="display:flex;flex-direction: column">
<Button size="small" type="primary" @click="editorClick(scope.row)" style="margin: 0 6px 4px 0">产品编辑</Button>
<Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="comboClick(scope.row)"></Button>
<Button size="small" type="primary" style="margin: 0 6px 4px 0" @click="picClick(scope.row)"></Button>
</div>
</Poptip>
<Poptip confirm transfer title="确认要删除吗" @on-ok="destroyProduct(scope.row)">
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0">删除</Button>
</Poptip>
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0;width: 95px" @click="comboClick(scope.row)"></Button>
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0;width: 95px" @click="picClick(scope.row)"></Button>
</template>
</el-table-column>
</template>
@ -121,7 +128,7 @@ export default {
{
prop:'name',
label:'名称',
width: 220,
minWidth: 240,
fixed:'left',
align:'left'
},
@ -165,7 +172,7 @@ export default {
},
{
label:'排序',
width: 160,
width: 150,
prop:'sort_number'
},
{
@ -176,7 +183,7 @@ export default {
{
label:'提交日期',
prop:'created_at',
minWidth: 200,
width: 200,
formatter:(cell,data,value)=>{
return parseTime(new Date(value),'{y}-{m}-{d}')
}

@ -284,18 +284,7 @@
工作时间
</div>
<div class="xy-table-item-content">
<el-time-picker
is-range
v-model="form.workTime"
:picker-options="{
start: '00:00',
end: '23:59',
}"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<el-input v-model="form.workTime" placeholder="请输入工作时间" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
@ -450,7 +439,7 @@ export default {
subheading:res?.subheading,
merchantId:res?.merchant_id,
featuredLabel:res?.featured_label?.split(',') || [],//
relLabel:res?.rel_label?.split(','),//
relLabel:res?.rel_label?.split(',').map(item=>Number(item)),//
reach:!!res?.reach,//,
state:!!res?.state,//
sortNumber:res?.sort_number,
@ -465,7 +454,7 @@ export default {
functionaryPhone:res?.functionary_phone,
linkman:res?.linkman,
linkmanPhone:res?.linkman_phone,
workTime:res?.work_time?.split(','),
workTime:res?.work_time,
}
this.$refs['tinymce'].setContent(this.form.content)
},
@ -493,7 +482,7 @@ export default {
functionary_phone:this.form.functionaryPhone,
linkman:this.form.linkman,
linkman_phone:this.form.linkmanPhone,
work_time: this.form.workTime?.toString()
work_time: this.form.workTime
}).then(res => {
Message({
type:'success',
@ -526,7 +515,7 @@ export default {
functionary_phone:this.form.functionaryPhone,
linkman:this.form.linkman,
linkman_phone:this.form.linkmanPhone,
work_time: this.form.workTime?.toString()
work_time: this.form.workTime
}).then(res => {
Message({
type:'success',

@ -23,12 +23,20 @@
<template v-slot:btns>
<el-table-column fixed="right" label="操作" :width="130" align="left" header-align="center">
<template slot-scope="scope">
<Button ghost size="small" type="primary" @click="editorClub(scope.row)" style="margin: 0 6px 4px 0">编辑</Button>
<Poptip trigger="hover" transfer placement="bottom">
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0">编辑</Button>
<div slot="content" style="display:flex;flex-direction: column">
<Button size="small" type="primary" @click="editorClub(scope.row)" style="margin: 0 6px 4px 0">信息编辑</Button>
<Button size="small" type="primary" @click="showInfo(scope.row)" style="margin: 0 6px 4px 0;">商户简介</Button>
<Button size="small" type="primary" @click="showPic(scope.row)" style="margin: 0 6px 4px 0;">商户图片</Button>
</div>
</Poptip>
<Poptip confirm transfer title="确认要删除吗" @on-ok="clubDelete(scope.row)">
<Button ghost size="small" type="primary" style="margin: 0 6px 4px 0">删除</Button>
</Poptip>
<Button ghost size="small" type="primary" @click="showInfo(scope.row)" style="margin: 0 6px 4px 0;width: 95px">商户信息</Button>
<Button ghost size="small" type="primary" @click="showPic(scope.row)" style="margin: 0 6px 4px 0;width: 95px">商户图片</Button>
</template>
</el-table-column>
</template>
@ -71,7 +79,7 @@ export default {
{
prop:'name',
label:'名称',
width:200,
minWidth:220,
align:'left'
},
{
@ -115,7 +123,7 @@ export default {
{
label:'提交日期',
prop:'created_at',
minWidth: 200,
width: 200,
formatter:(cell,data,value)=>{
return parseTime(new Date(value),'{y}-{m}-{d}')
}

@ -155,7 +155,7 @@ export default {
{
prop:'name',
label:'名称',
width:250,
width:260,
align:'left',
fixed:'left'
},
@ -172,19 +172,19 @@ export default {
{
prop: "price",
label:"单价",
width: 120,
width: 160,
align:'right'
},
{
prop:"fee",
label:"平台佣金",
width: 120,
width: 160,
align:'right'
},
{
prop:'sharing',
label: '分享金',
width: 120,
width: 160,
align:'right'
},
{

@ -56,13 +56,13 @@ export default {
label:'标题',
prop:'title',
align:'left',
width: 200
minWidth: 240
},
{
label:'副标题',
prop:'subheading',
align:'left',
width: 180
minWidth: 200
},
{
label:'状态',
@ -74,7 +74,7 @@ export default {
{
label:'创建时间',
prop:'created_at',
minWidth:200,
width:180,
formatter:(cell,value,data,index)=>{
return parseTime(new Date(data),'{y}-{m}-{d}')
}

@ -50,12 +50,12 @@ export default {
{
prop:'name',
label:'名称',
width:180
minWidth:220
},
{
prop:'call_logo',
label:'调用标识',
width:200
width:180
},
{
label:'状态',
@ -73,7 +73,7 @@ export default {
},
{
label:'创建时间',
width: 260,
width: 220,
prop:'created_at',
formatter:(cell,data,value)=>{
return parseTime(new Date(value),'{y}-{m}-{d}')
@ -81,7 +81,8 @@ export default {
},
{
label:'创建人',
minWidth:160
width:160,
prop:'admin.name'
}
],
}

@ -15,7 +15,7 @@
<xy-table :list="list" :table-item="table" :total="total" :page-size="select.pageSize" @pageIndexChange="pageChange" @pageSizeChange="e => select.pageSize = e">
<template v-slot:btns>
<el-table-column label="操作" header-align="center" fixed="right" min-width="382">
<el-table-column label="操作" header-align="center" fixed="right" :width="386">
<template slot-scope="scope">
<Button icon="ios-basket" type="primary" style="margin-left: 10px;" size="small" @click="isShowCombine = true,$refs['productCombine'].id = scope.row.id">产品组合</Button>
<Button icon="ios-build" type="primary" style="margin-left: 10px;" size="small" @click="editorClick(scope.row)"></Button>
@ -71,12 +71,12 @@ export default {
{
prop:"name",
label:'名称',
width: 280,
minWidth: 300,
align:'left'
},
{
label:'项目数量',
width: 200,
width: 180,
customFn:(row)=>{
return (<div>{row.items.length}</div>)
}

@ -69,12 +69,13 @@ export default {
prop:'name',
label:'姓名',
width:180,
sortable:false
sortable:false,
fixed:'left'
},
{
prop:'phone',
label:'电话',
width:200
width:220
},
{
prop:'due_date',
@ -90,7 +91,7 @@ export default {
prop:'address',
label:'住址',
align:'left',
width: 300
minWidth: 300
},
{
prop:'hospital',

Loading…
Cancel
Save