刘翔宇-旅管家 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,56 @@ 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 ( return (
<div> <div>
<div style={{'display':'flex'}}> <div style={{'display':'flex'}}>
@ -57,11 +112,54 @@ 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-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'}} 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' size='small'
placeholder="请输入内容"
value={this.form.follow.content} value={this.form.follow.content}
on={{ on={{
['input']:(e)=>{ ['input']:(e)=>{
@ -71,13 +169,55 @@ export default {
</el-input> </el-input>
</div> </div>
</div> </div>
</div>
</div>)
}
else{
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-input
style={{'width':'240px'}}
size='small' type="textarea"
rows='2'
clearable
placeholder="请输入内容"
value={this.form.follow.content}
on={{
['input']:(e)=>{
this.form.follow.content = e
}
}}>
</el-input>
</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">
@ -180,6 +182,7 @@
end_paid: "", end_paid: "",
start_updated: "", start_updated: "",
end_updated: "", end_updated: "",
order_paid: false,
}, },
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
@ -278,7 +281,9 @@
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 > )
} }
}, },
{ {
@ -356,7 +361,7 @@
{ {
prop: "state_name", prop: "state_name",
label: "状态", label: "状态",
width: 80 width: 120
} }
] ]
}, },
@ -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; 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({ 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,
@ -434,6 +442,7 @@
...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() {

Loading…
Cancel
Save