Commit f90cd497 authored by yaya's avatar yaya

feat:添加订单管理页面

parent a90e076d
import request from '@/utils/request' import request from '@/utils/request'
import Qs from 'qs'
export function listOrder(query) { export function requestOrderList(data) {
return request({ return request({
url: '/order/list', url: '/sysDistributionOrder/findList',
method: 'get',
params: query,
paramsSerializer: function(params) {
return Qs.stringify(params, { arrayFormat: 'repeat' })
}
})
}
export function detailOrder(id) {
return request({
url: '/order/detail',
method: 'get',
params: { id }
})
}
export function shipOrder(data) {
return request({
url: '/order/ship',
method: 'post', method: 'post',
data data
}) })
} }
export function refundOrder(data) {
return request({
url: '/order/refund',
method: 'post',
data
})
}
export function replyComment(data) {
return request({
url: '/order/reply',
method: 'post',
data
})
}
export function listShipChannel() {
return request({
url: '/order/listShipChannel',
method: 'get'
})
}
...@@ -501,6 +501,42 @@ export const asyncRouterMap = [ ...@@ -501,6 +501,42 @@ export const asyncRouterMap = [
} }
] ]
}, },
{
path: '/order',
component: Layout,
redirect: 'noredirect',
alwaysShow: true,
name: 'order',
meta: {
title: '订单管理',
icon: 'shopping'
},
children: [
{
path: 'saleList',
component: () => import('@/views/order/itemOrderList'),
name: 'itemOrderList',
meta: {
perms: [],
title: '藏馆订单',
icon: 'list',
noCache: true,
keepAlive: true
}
}, {
path: 'saleOrderList',
component: () => import('@/views/order/saleOrderList'),
name: 'saleOrderList',
meta: {
perms: [],
title: '分销订单',
icon: 'list',
noCache: true,
keepAlive: true
}
}
]
},
/* { /* {
path: '/service', path: '/service',
component: Layout, component: Layout,
......
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-select v-model="listQuery.state" placeholder="请选择订单状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select>
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏品名称"/>
<el-input v-model="listQuery.sellerName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家名称"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" />
<el-table-column align="center" label="藏家名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<el-table-column align="center" label="数量" prop="itemNum" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单用户" prop="buyerName" />
<el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<!-- <el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="primary"
size="mini"
@click="handleToDetail(scope.row)">编辑
</el-button>
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="danger"
size="mini"
@click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>-->
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestOrderList } from '@/api/business/order'
export default {
name: 'ItemOrderList',
components: {
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20,
type: 3
},
list: [],
total: 0,
// 图文估价
imageValueDialogShow: false,
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
currentSaleId: ''
}
},
created() {
this.getList()
},
methods: {
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20,
type: 3
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
requestOrderList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-select v-model="listQuery.state" placeholder="请选择订单状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select>
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏品名称"/>
<el-input v-model="listQuery.sellerName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家名称"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" />
<el-table-column align="center" label="藏家名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<el-table-column align="center" label="数量" prop="itemNum" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单用户" prop="buyerName" />
<el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<!-- <el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="primary"
size="mini"
@click="handleToDetail(scope.row)">编辑
</el-button>
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="danger"
size="mini"
@click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>-->
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestOrderList } from '@/api/business/order'
export default {
name: 'SaleOrderList',
components: {
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20
},
list: [],
total: 0,
// 图文估价
imageValueDialogShow: false,
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
currentSaleId: ''
}
},
created() {
this.getList()
},
methods: {
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
requestOrderList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="page_consignList"> <div class="page_consignList">
<div class="filter-container"> <div class="filter-container">
<div class="button_left"> <div class="button_left">
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入标题"/> <el-input v-model="listQuery.name" clearable class="filter-item" style="width: 200px;" placeholder="请输入标题"/>
<el-select v-model="listQuery.isOnSale" placeholder="请选择是否出售" class="filter-item" style="width: 200px;"> <el-select v-model="listQuery.isOnSale" placeholder="请选择是否出售" class="filter-item" style="width: 200px;">
<el-option <el-option
v-for="item in options" v-for="item in options"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="listQuery.page" :page.sync="listQuery.page"
:limit.sync="listQuery.size" :limit.sync="listQuery.limit"
@pagination="getList" /> @pagination="getList" />
</div> </div>
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
size: 20, limit: 20,
type: 3 type: 3
}, },
list: [], list: [],
...@@ -140,9 +140,6 @@ export default { ...@@ -140,9 +140,6 @@ export default {
created() { created() {
this.getList() this.getList()
}, },
destroyed() {
this.clearAll()
},
methods: { methods: {
handleFilter() { handleFilter() {
this.listQuery.page = 1 this.listQuery.page = 1
...@@ -167,14 +164,6 @@ export default { ...@@ -167,14 +164,6 @@ export default {
handleCreate() { handleCreate() {
this.$router.push({ path: '/sale/saleAdd' }) this.$router.push({ path: '/sale/saleAdd' })
}, },
// 清除所有定时器
clearAll() {
if (this.list) {
this.list.forEach((el) => {
clearInterval(el.countDown)
})
}
},
handlerGetList() { handlerGetList() {
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() this.getList()
...@@ -187,7 +176,6 @@ export default { ...@@ -187,7 +176,6 @@ export default {
localStorage.setItem('systemState', '') localStorage.setItem('systemState', '')
this.listLoading = true this.listLoading = true
getSaleList(this.listQuery).then(response => { getSaleList(this.listQuery).then(response => {
this.clearAll()
this.list = response.data.data.dataList this.list = response.data.data.dataList
this.total = response.data.data.total this.total = response.data.data.total
this.listLoading = false this.listLoading = false
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="page_consignList"> <div class="page_consignList">
<div class="filter-container"> <div class="filter-container">
<div class="button_left"> <div class="button_left">
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入标题"/> <el-input v-model="listQuery.name" clearable class="filter-item" style="width: 200px;" placeholder="请输入标题"/>
<el-select v-model="listQuery.isOnSale" placeholder="请选择" class="filter-item" style="width: 200px;"> <el-select v-model="listQuery.isOnSale" placeholder="请选择" class="filter-item" style="width: 200px;">
<el-option <el-option
v-for="item in options" v-for="item in options"
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="listQuery.page" :page.sync="listQuery.page"
:limit.sync="listQuery.size" :limit.sync="listQuery.limit"
@pagination="getList" /> @pagination="getList" />
</div> </div>
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
size: 20 limit: 20
}, },
list: [], list: [],
total: 0, total: 0,
...@@ -139,9 +139,6 @@ export default { ...@@ -139,9 +139,6 @@ export default {
created() { created() {
this.getList() this.getList()
}, },
destroyed() {
this.clearAll()
},
methods: { methods: {
handleFilter() { handleFilter() {
this.listQuery.page = 1 this.listQuery.page = 1
...@@ -166,14 +163,6 @@ export default { ...@@ -166,14 +163,6 @@ export default {
handleCreate() { handleCreate() {
this.$router.push({ path: '/sale/saleAdd' }) this.$router.push({ path: '/sale/saleAdd' })
}, },
// 清除所有定时器
clearAll() {
if (this.list) {
this.list.forEach((el) => {
clearInterval(el.countDown)
})
}
},
handlerGetList() { handlerGetList() {
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() this.getList()
...@@ -186,7 +175,6 @@ export default { ...@@ -186,7 +175,6 @@ export default {
localStorage.setItem('systemState', '') localStorage.setItem('systemState', '')
this.listLoading = true this.listLoading = true
getSaleList(this.listQuery).then(response => { getSaleList(this.listQuery).then(response => {
this.clearAll()
this.list = response.data.data.dataList this.list = response.data.data.dataList
this.total = response.data.data.total this.total = response.data.data.total
this.listLoading = false this.listLoading = false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment