刘翔宇-旅管家 3 years ago
parent bc4784b3f4
commit 2617503b4a

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

@ -19,6 +19,9 @@
<div class="boxcontentitem-small">支付
{{totaldata.order.order_list.total.order_date.paid}}
</div>
<div class="boxcontentitem-small">总支付(包含0元订单)
{{totaldata.order.order_list.total.order_date.total_paid}}
</div>
</div>
<div class="boxcontentitem">
<div class="boxcontentitem-big">
@ -29,6 +32,9 @@
<div class="boxcontentitem-small">退款
{{totaldata.order.order_list.total.order_date.refunded}}
</div>
<div class="boxcontentitem-small">已完成
{{totaldata.order.order_list.total.order_date.finished}}
</div>
</div>
</div>
<div class="boxcline"></div>
@ -43,6 +49,9 @@
<div class="boxcontentitem-small">支付
{{totaldata.order.order_list.total.order_month.paid}}
</div>
<div class="boxcontentitem-small">总支付(包含0元订单)
{{totaldata.order.order_list.total.order_month.total_paid}}
</div>
</div>
<div class="boxcontentitem">
<div class="boxcontentitem-big">
@ -52,6 +61,9 @@
<div class="boxcontentitem-small">退款
{{totaldata.order.order_list.total.order_month.refunded}}
</div>
<div class="boxcontentitem-small">已完成
{{totaldata.order.order_list.total.order_month.finished}}
</div>
</div>
</div>
</div>

@ -1,5 +1,8 @@
<script>
import {itemAction,itemPreAction} from '@/api/order'
import {index as merchantIndex} from '@/api/merchant'
import {index as productIndex} from '@/api/product'
import { Message } from 'element-ui'
export default {
props:{
@ -21,7 +24,11 @@ export default {
form:{
follow:{
content:''
content:'',
merchant_id:"",
product_id:"",
merchant_name:"",
product_name:"",
}
}
}
@ -48,8 +55,124 @@ export default {
</Button>
)
})
},
handleSelectProduct(item) {
this.form.follow.product_id = item.id;
},
querySearchAsyncProduct(queryString,cb){
productIndex({
name: queryString,
merchant_id:this.form.follow.merchant_id,
page_size: 999
}).then(res=>{
var data = res.rows;
let _data=[];
for (var m of data) {
_data.push(
{
value:m.name,
id:m.id
}
)
}
cb(_data)
})
},
handleSelect(item) {
console.log(item)
this.form.follow.merchant_id = item.id;
this.form.follow.product_name="";
this.form.follow.product_id="";
},
querySearchAsync(queryString,cb){
merchantIndex({
keyword: queryString,
page_size: 999
}).then(res=>{
var data = res.data;
let _data=[];
for (var m of data) {
_data.push(
{
value:m.name,
id:m.id
}
)
}
cb(_data)
})
},
contentRender(){
if(this.action=="assign"){
return (
<div>
<div style={{'display':'flex'}}>
<div>产品名称</div>
<div>{this.content.vo?.order?.order_name}</div>
</div>
<div class="action-form">
<div class="action-form-item">
<div class="action-form-label">商家</div>
<div class="action-form-content">
<el-autocomplete
style={{'width':'240px'}}
v-model={this.form.follow.merchant_name}
fetch-suggestions={this.querySearchAsync}
clearable
placeholder="请输入选择商家"
on={{
['select']:(e)=>{
this.handleSelect(e);
}
}}></el-autocomplete>
</div>
</div>
<div class="action-form-item">
<div class="action-form-label">产品</div>
<div class="action-form-content">
<el-autocomplete
style={{'width':'240px'}}
clearable
v-model={this.form.follow.product_name}
fetch-suggestions={this.querySearchAsyncProduct}
placeholder="请输入选择产品"
on={{
['select']:(e)=>{
this.handleSelectProduct(e)
}
}}></el-autocomplete>
</div>
</div>
<div class="action-form-item">
<div class="action-form-label">内容</div>
<div class="action-form-content">
<el-input
style={{'width':'340px'}}
type="textarea"
rows='2'
clearable
size='small'
placeholder="请输入内容"
value={this.form.follow.content}
on={{
['input']:(e)=>{
this.form.follow.content = e
}
}}>
</el-input>
</div>
</div>
</div>
</div>)
}
else{
return (
<div>
<div style={{'display':'flex'}}>
@ -57,11 +180,16 @@ export default {
<div>{this.content.vo?.order?.order_name}</div>
</div>
<div class="action-form">
<div class="action-form-label">请输入内容</div>
<div class="action-form-item">
<div class="action-form-label">内容</div>
<div class="action-form-content">
<el-input
style={{'width':'240px'}}
size='small'
size='small' type="textarea"
rows='2'
clearable
placeholder="请输入内容"
value={this.form.follow.content}
on={{
['input']:(e)=>{
@ -71,13 +199,25 @@ export default {
</el-input>
</div>
</div>
</div>
</div>
)
}
},
actionPreClick(action){
this.action = action
this.action = action;
if(this.row.merchant){
this.form.follow.merchant_id=this.row.merchant.id;
this.form.follow.merchant_name=this.row.merchant.name;
}
if(this.row.product){
this.form.follow.product_id=this.row.product.id;
this.form.follow.product_name=this.row.product.name;
}
itemPreAction({
item_id:this.row.id,
action
@ -90,6 +230,15 @@ export default {
actionClick(){
let data ;
switch (this.action){
case "assign":
data = {
item_id:this.row.id,
action:this.action,
remark:this.form.follow.content,
merchant_id:this.form.follow.merchant_id,
product_id:this.form.follow.product_id,
}
break
default:
data = {
item_id:this.row.id,
@ -147,14 +296,17 @@ export default {
<style scoped lang="scss">
.action-form{
display: flex;
align-items: center;
flex-direction: column;
&-item{
display: flex;
flex-direction: row;
align-items: center;
}
&-label{
}
&-content{
padding: 6px 10px;
}
}

@ -32,14 +32,16 @@
size="small" :options="productTypes" :props="{checkStrictly:true,label:'name',value:'id'}"
@change="productTypeChange"></el-cascader>
</div>
<el-checkbox style="margin-left: 10px;" v-model="select.order_paid"></el-checkbox>
</div>
</el-col>
<el-col :span="12">
<div class="select-content-item">
<div class="select-content-item-label">订单状态</div>
<div>
<template v-for="(value,key) of orderStates">
<el-tag size="small" :effect="select.orderStates.key === key ? 'dark' : 'plain'"
<template v-for="(value,key) of orderItemStates">
<el-tag size="small" v-if="key!='unpaid'"
:effect="select.orderStates.key === key ? 'dark' : 'plain'"
@click="select.orderStates = {key,value}" style="margin-right: 6px;">{{value}}</el-tag>
</template>
</div>
@ -56,16 +58,16 @@
</div>
</div>
</el-col>
<el-col :span="12">
<div class="select-content-item">
<div class="select-content-item-label">更新日期</div>
<div>
<el-date-picker @change="changeUpdateDate" v-model="select.updateDate" type="daterange"
:picker-options="pickerOptions" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
</div>
</div>
<el-col :span="12">
<div class="select-content-item">
<div class="select-content-item-label">更新日期</div>
<div>
<el-date-picker @change="changeUpdateDate" v-model="select.updateDate" type="daterange"
:picker-options="pickerOptions" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="select-content-item">
@ -114,7 +116,7 @@
</lx-header>
</div>
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="e => select.pageSize = e"
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="e => {select.pageSize = e;searchOrder()}"
@pageIndexChange="pageChange">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="400" header-align="center">
@ -172,14 +174,15 @@
productTypeName: "",
is_merchant: false,
createdDate: [],
payDate: [],
updateDate:[],
payDate: [],
updateDate: [],
start_created: "",
end_created: "",
start_paid: "",
end_paid: "",
start_updated: "",
end_updated: "",
order_paid: false,
},
pickerOptions: {
shortcuts: [{
@ -267,131 +270,133 @@
},
{
label: "客户服务地址",
width: 220,
align:"left",
width: 220,
align: "left",
customFn: (row) => {
return ( <div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
cursor:'pointer',
color:"blue"
}
} > {row.order.member_address?row.order.member_address:"修改服务地址"}</div > )
return ( < div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
cursor: 'pointer',
color: "blue"
}
} > {
row.order.member_address ? row.order.member_address : "修改服务地址"
} < /div > )
}
},
{
label: "用户信息",
Fprop: 'member',
multiHd: [{
prop: "name",
label: "姓名",
width: 110
},
{
prop: "wechat_nickname",
label: "微信昵称",
width: 110
},
{
label: "头像",
width: 80,
customFn: (row) => {
return ( < div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}
} > <el-avatar src = {
row.member?.avatar
} > </el-avatar></div > )
}
},
{
prop: "phone",
label: "联系电话",
width: 120
},
{
prop: "area",
label: "区域",
width: 110
},
{
prop: "due_date",
label: "预产期",
width: 120
}
},
{
label: "用户信息",
Fprop: 'member',
multiHd: [{
prop: "name",
label: "姓名",
width: 110
},
{
prop: "wechat_nickname",
label: "微信昵称",
width: 110
},
{
label: "头像",
width: 80,
customFn: (row) => {
return ( < div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
],
},
{
label: '订单明细',
multiHd: [{
prop: "product_type.name",
label: "产品类型",
width: 100
},
{
prop: "merchant.name",
label: "服务商家",
align: "left",
width: 220
},
{
label: "历史商家",
width: 220,
align: "left",
customFn: (row) => {
return row.assign_merchant.map(item => {
return ( < div > {
item.name
} < /div>)
})
}
} > <el-avatar src = {
row.member?.avatar
} > </el-avatar></div > )
}
},
},
{
prop: "phone",
label: "联系电话",
width: 120
},
{
prop: "area",
label: "区域",
width: 110
{
prop: "state_name",
label: "状态",
width: 120
}
]
},
{
prop: "due_date",
label: "预产期",
width: 120
prop: "order.remark",
label: "备注"
}
],
},
{
label: '订单明细',
multiHd: [{
prop: "product_type.name",
label: "产品类型",
width: 100
},
{
prop: "merchant.name",
label: "服务商家",
align: "left",
width: 220
},
{
label: "历史商家",
width: 220,
align: "left",
customFn: (row) => {
return row.assign_merchant.map(item => {
return ( < div > {
item.name
} < /div>)
})
}
},
{
prop: "state_name",
label: "状态",
width: 80
}
]
},
{
prop: "order.remark",
label: "备注"
}
],
}
},
methods: {
resetsearch(){
this.select.page = 1;
this.select.merchant= '';
this.select. keyword= '';
this.select.productType= '';
this.select.orderStates= '';
this.select.productTypeName= '';
this.select.is_merchant= false;
this.select.createdDate= [];
this.select.payDate= [];
this.select.updateDate=[];
this.select.start_created= "";
this.select.end_created= '';
this.select.start_paid= '';
this.select.end_paid= '';
this.select.start_updated= '';
this.select.end_updated= '';
this.getOrders();
},
changeUpdateDate(e){
this.select.start_updated = e[0];
this.select.end_updated = e[1];
}
},
methods: {
resetsearch() {
this.select.page = 1;
this.select.merchant = '';
this.select.keyword = '';
this.select.productType = '';
this.select.orderStates = '';
this.select.productTypeName = '';
this.select.is_merchant = false;
this.select.createdDate = [];
this.select.payDate = [];
this.select.updateDate = [];
this.select.start_created = "";
this.select.end_created = '';
this.select.start_paid = '';
this.select.end_paid = '';
this.select.start_updated = '';
this.select.end_updated = '';
this.getOrders();
},
changeUpdateDate(e) {
this.select.start_updated = e[0];
this.select.end_updated = e[1];
},
changePayDate(e) {
this.select.start_paid = e[0];
this.select.end_paid = e[1];
@ -404,10 +409,10 @@
this.select.productType = this.$refs['cascader'].getCheckedNodes()[0].data.id;
this.select.productTypeName = this.$refs['cascader'].getCheckedNodes()[0].data.name;
},
searchOrder(){
this.select.page = 1
this.getOrders()
searchOrder() {
this.select.page = 1
this.getOrders()
},
pageChange(e) {
this.select.page = e
@ -423,17 +428,21 @@
},
async getOrders() {
let is_merchant = this.select.is_merchant
this.select.is_merchant= is_merchant ? 1 : 0;
let is_merchant = this.select.is_merchant
this.select.is_merchant = is_merchant ? 1 : 0;
let order_paid = this.select.order_paid
this.select.order_paid = order_paid ? 1 : '';
const res = await getList({
page_size: this.select.pageSize,
product_type_id: this.select.productType,
merchant_id: this.select.merchant.id,
order_state: this.select.orderStates.key,
...this.select
})
this.select.is_merchant=is_merchant;
})
this.select.is_merchant = is_merchant;
this.select.order_paid = order_paid;
this.total = res.total
this.list = res.rows
},
@ -444,9 +453,13 @@
},
downloadExel() {
let is_merchant = this.select.is_merchant
this.select.is_merchant= is_merchant ? 1 : 0;
let is_merchant = this.select.is_merchant
this.select.is_merchant = is_merchant ? 1 : 0;
let order_paid = this.select.order_paid
this.select.order_paid = order_paid ? 1 : '';
download(
'/api/admin/order/get-list',
'get', {
@ -458,6 +471,10 @@
...this.select
},
'订单列表.xlsx')
this.select.is_merchant = is_merchant;
this.select.order_paid = order_paid;
}
},
mounted() {
@ -465,7 +482,7 @@
this.getOrders()
}
}
}
</script>
<style scoped lang="scss">

Loading…
Cancel
Save