|
|
|
|
@ -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">
|
|
|
|
|
|