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

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

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

@ -1,5 +1,8 @@
<script> <script>
import {itemAction,itemPreAction} from '@/api/order' 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' import { Message } from 'element-ui'
export default { export default {
props:{ props:{
@ -21,7 +24,11 @@ export default {
form:{ form:{
follow:{ follow:{
content:'' content:'',
merchant_id:"",
product_id:"",
merchant_name:"",
product_name:"",
} }
} }
} }
@ -48,8 +55,124 @@ export default {
</Button> </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(){ 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 ( return (
<div> <div>
<div style={{'display':'flex'}}> <div style={{'display':'flex'}}>
@ -57,11 +180,16 @@ export default {
<div>{this.content.vo?.order?.order_name}</div> <div>{this.content.vo?.order?.order_name}</div>
</div> </div>
<div class="action-form"> <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"> <div class="action-form-content">
<el-input <el-input
style={{'width':'240px'}} style={{'width':'240px'}}
size='small' size='small' type="textarea"
rows='2'
clearable
placeholder="请输入内容"
value={this.form.follow.content} value={this.form.follow.content}
on={{ on={{
['input']:(e)=>{ ['input']:(e)=>{
@ -71,13 +199,25 @@ export default {
</el-input> </el-input>
</div> </div>
</div> </div>
</div>
</div> </div>
) )
}
}, },
actionPreClick(action){ 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({ itemPreAction({
item_id:this.row.id, item_id:this.row.id,
action action
@ -90,6 +230,15 @@ export default {
actionClick(){ actionClick(){
let data ; let data ;
switch (this.action){ 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: default:
data = { data = {
item_id:this.row.id, item_id:this.row.id,
@ -147,14 +296,17 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.action-form{ .action-form{
display: flex; display: flex;
align-items: center; flex-direction: column;
&-item{
display: flex;
flex-direction: row;
align-items: center;
}
&-label{ &-label{
} }
&-content{ &-content{
padding: 6px 10px; padding: 6px 10px;
} }
} }

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

Loading…
Cancel
Save