|
|
@ -26,19 +26,19 @@ |
|
|
|
待收货 |
|
|
|
</span> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane name="4"> |
|
|
|
<!-- <el-tab-pane name="4"> |
|
|
|
<span slot="label"> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
待评价 |
|
|
|
</span> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> --> |
|
|
|
<el-tab-pane name="5"> |
|
|
|
<span slot="label"> |
|
|
|
<i class="el-icon-circle-check"></i> |
|
|
|
交易完成 |
|
|
|
</span> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane name="13"> |
|
|
|
<!-- <el-tab-pane name="13"> |
|
|
|
<span slot="label"> |
|
|
|
<i class="el-icon-back"></i> |
|
|
|
申请退款 |
|
|
@ -49,7 +49,7 @@ |
|
|
|
<i class="el-icon-finished"></i> |
|
|
|
已退款 |
|
|
|
</span> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> --> |
|
|
|
<el-tab-pane name="15"> |
|
|
|
<span slot="label"> |
|
|
|
<i class="el-icon-circle-close"></i> |
|
|
@ -62,28 +62,38 @@ |
|
|
|
<div> |
|
|
|
<i class="el-icon-search"></i> |
|
|
|
<span>筛选搜索</span> |
|
|
|
<el-button style="float:right" type="primary" @click="handleSearchList()" size="small">查询搜索</el-button> |
|
|
|
<el-button style="float:right;margin-right: 15px" @click="handleResetSearch()" size="small">重置</el-button> |
|
|
|
<el-button style="float:right" type="primary" @click="handleSearchList()" size="small">查询搜索 |
|
|
|
</el-button> |
|
|
|
<el-button style="float:right;margin-right: 15px" @click="handleResetSearch()" size="small">重置 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 15px"> |
|
|
|
<el-form :inline="true" :model="listQuery" size="small" label-width="140px"> |
|
|
|
<el-form-item label="输入搜索:"><el-input v-model="listQuery.id" class="input-width" placeholder="编号"></el-input></el-form-item> |
|
|
|
<el-form-item label="订单分类:"> |
|
|
|
<el-form-item label="输入搜索:"> |
|
|
|
<el-input v-model="listQuery.id" class="input-width" placeholder="编号"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="订单分类:"> |
|
|
|
<el-select v-model="listQuery.orderType" class="input-width" placeholder="全部" clearable> |
|
|
|
<el-option v-for="item in orderTypeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
<el-option v-for="item in orderTypeOptions" :key="item.value" :label="item.label" |
|
|
|
:value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
<el-form-item label="提交时间:"> |
|
|
|
<el-date-picker class="input-width" v-model="listQuery.createTime" value-format="yyyy-MM-dd" type="date" placeholder="请选择时间"></el-date-picker> |
|
|
|
<el-date-picker class="input-width" v-model="listQuery.createTime" value-format="yyyy-MM-dd" |
|
|
|
type="date" placeholder="请选择时间"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="收货信息 :"> |
|
|
|
<el-input v-model="listQuery.receiverPhone" class="input-width" placeholder="收货人电话"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="收货信息 :"><el-input v-model="listQuery.receiverPhone" class="input-width" placeholder="收货人电话"></el-input></el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="订单来源:"> |
|
|
|
<!-- <el-form-item label="订单来源:"> |
|
|
|
<el-select v-model="listQuery.sourceType" class="input-width" placeholder="全部" clearable> |
|
|
|
<el-option v-for="item in sourceTypeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
<el-option v-for="item in sourceTypeOptions" :key="item.value" :label="item.label" |
|
|
|
:value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
@ -109,20 +119,35 @@ |
|
|
|
<i class="el-icon-tickets"></i> |
|
|
|
<span>数据列表</span> |
|
|
|
</el-card> |
|
|
|
<!-- <div class="batch-operate-container"> |
|
|
|
<el-checkbox v-model="printChecked" @change="batchSelection" |
|
|
|
style="margin-left:23px; margin-right: 20px;"></el-checkbox> |
|
|
|
<el-select v-model="batchHandle" @change="handlePrintOption" clearable placeholder="批量操作" |
|
|
|
class="filter-item" style="width: 130px; margin-right: 8px;"> |
|
|
|
<el-option v-for="item in handleOptions" :key="item.value" :label="item.label" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="batchExport" @change="handleExportOption" clearable placeholder="批量导出" |
|
|
|
class="filter-item" style="width: 130px"> |
|
|
|
<el-option v-for="item in exportOptions" :key="item.value" :label="item.label" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> --> |
|
|
|
<div class="table-container"> |
|
|
|
<el-table ref="orderTable" :data="list" style="width: 100%;" @selection-change="handleSelectionChange" v-loading="listLoading" border> |
|
|
|
<el-table ref="orderTable" :data="list" style="width: 100%;" @selection-change="handleSelectionChange" |
|
|
|
v-loading="listLoading" border> |
|
|
|
<el-table-column type="selection" width="60" align="center"></el-table-column> |
|
|
|
<el-table-column label="编号" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.id }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="订单编号" width="180" align="center"> |
|
|
|
<el-table-column label="订单编号" width="200" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.orderSn }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="商品" width="180" align="center"> |
|
|
|
<el-table-column label="商品" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.goodsName }} |
|
|
|
</template> |
|
|
@ -132,7 +157,7 @@ |
|
|
|
{{ scope.row.createTime | formatCreateTime }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="用户账号" align="center"> |
|
|
|
<el-table-column label="用户账号" width="180" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.memberUsername }} |
|
|
|
</template> |
|
|
@ -152,7 +177,7 @@ |
|
|
|
{{ scope.row.payType | formatPayType }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="订单来源" width="120" align="center"> |
|
|
|
<!-- <el-table-column label="订单来源" width="120" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.sourceType | formatSourceType }} |
|
|
|
</template> |
|
|
@ -161,7 +186,7 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.orderType | formatOrderType }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
|
|
|
|
<el-table-column label="订单状态" width="120" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -171,34 +196,23 @@ |
|
|
|
<el-table-column label="操作" width="200" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" @click="handleViewOrder(scope.$index, scope.row)">查看订单</el-button> |
|
|
|
<el-button size="mini" @click="handleCloseOrder(scope.$index, scope.row)" v-show="scope.row.status === 14">关闭订单</el-button> |
|
|
|
<el-button size="mini" @click="handleDeliveryOrder(scope.$index, scope.row)" v-show="scope.row.status === 2">订单发货</el-button> |
|
|
|
<el-button size="mini" @click="handleViewLogistics(scope.$index, scope.row)" v-show="scope.row.status > 2 || scope.row.status < 9">订单跟踪</el-button> |
|
|
|
<el-button size="mini" type="danger" @click="handleDeleteOrder(scope.$index, scope.row)" v-show="scope.row.status === 15">删除订单</el-button> |
|
|
|
<!-- <el-button size="mini" @click="handleCloseOrder(scope.$index, scope.row)" |
|
|
|
v-show="scope.row.status === 14">关闭订单</el-button> --> |
|
|
|
<el-button size="mini" @click="handleDeliveryOrder(scope.$index, scope.row)" |
|
|
|
v-show="scope.row.status === 2">订单发货</el-button> |
|
|
|
<!-- <el-button size="mini" @click="handleViewLogistics(scope.$index, scope.row)" |
|
|
|
v-show="scope.row.status > 2 || scope.row.status < 9">订单跟踪</el-button> --> |
|
|
|
<!-- <el-button size="mini" type="danger" @click="handleDeleteOrder(scope.$index, scope.row)" |
|
|
|
v-show="scope.row.status === 15">删除订单</el-button> --> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="batch-operate-container"> |
|
|
|
<el-checkbox v-model="printChecked" @change="batchSelection" style="margin-right: 20px;"></el-checkbox> |
|
|
|
<el-select v-model="batchHandle" @change="handlePrintOption" clearable placeholder="批量操作" class="filter-item" style="width: 130px; margin-right: 8px;"> |
|
|
|
<el-option v-for="item in handleOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="batchExport" @change="handleExportOption" clearable placeholder="批量导出" class="filter-item" style="width: 130px"> |
|
|
|
<el-option v-for="item in exportOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="pagination-container"> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
layout="total, sizes,prev, pager, next,jumper" |
|
|
|
:current-page.sync="listQuery.pageNum" |
|
|
|
:page-size="listQuery.pageSize" |
|
|
|
:page-sizes="[5, 10, 15]" |
|
|
|
:total="total" |
|
|
|
></el-pagination> |
|
|
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|
|
|
layout="total, sizes,prev, pager, next,jumper" :current-page.sync="listQuery.pageNum" |
|
|
|
:page-size="listQuery.pageSize" :page-sizes="[5, 10, 15]" :total="total"></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -206,9 +220,18 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import checkPermission from '@/utils/permission'; |
|
|
|
import { formatTime } from '@/utils/index'; |
|
|
|
import { fetchList, closeOrder, deleteOrder, orderData } from '@/api/order'; |
|
|
|
import { formatDate } from '@/utils/date'; |
|
|
|
import { |
|
|
|
formatTime |
|
|
|
} from '@/utils/index'; |
|
|
|
import { |
|
|
|
fetchList, |
|
|
|
closeOrder, |
|
|
|
deleteOrder, |
|
|
|
orderData |
|
|
|
} from '@/api/order'; |
|
|
|
import { |
|
|
|
formatDate |
|
|
|
} from '@/utils/date'; |
|
|
|
import LogisticsDialog from '@/views/oms/order/components/logisticsDialog'; |
|
|
|
const defaultListQuery = { |
|
|
|
pageNum: 1, |
|
|
@ -223,11 +246,13 @@ const defaultListQuery = { |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'orderList', |
|
|
|
components: { LogisticsDialog }, |
|
|
|
components: { |
|
|
|
LogisticsDialog |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
delLoading: false, |
|
|
|
status: '-9', |
|
|
|
status: '0', |
|
|
|
orderType: '0', |
|
|
|
createTime: '', |
|
|
|
checkList: [], |
|
|
@ -246,8 +271,7 @@ export default { |
|
|
|
content: null, |
|
|
|
orderIds: [] |
|
|
|
}, |
|
|
|
statusOptions: [ |
|
|
|
{ |
|
|
|
statusOptions: [{ |
|
|
|
label: '待付款', |
|
|
|
value: 12 |
|
|
|
}, |
|
|
@ -276,8 +300,7 @@ export default { |
|
|
|
value: 15 |
|
|
|
} |
|
|
|
], |
|
|
|
orderTypeOptions: [ |
|
|
|
{ |
|
|
|
orderTypeOptions: [{ |
|
|
|
label: '正常订单', |
|
|
|
value: 1 |
|
|
|
}, |
|
|
@ -306,8 +329,7 @@ export default { |
|
|
|
value: 5 |
|
|
|
} |
|
|
|
], |
|
|
|
sourceTypeOptions: [ |
|
|
|
{ |
|
|
|
sourceTypeOptions: [{ |
|
|
|
label: '小程序订单', |
|
|
|
value: 1 |
|
|
|
}, |
|
|
@ -324,8 +346,7 @@ export default { |
|
|
|
value: 3 |
|
|
|
} |
|
|
|
], |
|
|
|
operateOptions: [ |
|
|
|
{ |
|
|
|
operateOptions: [{ |
|
|
|
label: '批量发货', |
|
|
|
value: 1 |
|
|
|
}, |
|
|
@ -340,8 +361,23 @@ export default { |
|
|
|
], |
|
|
|
logisticsDialogVisible: false, |
|
|
|
|
|
|
|
handleOptions: [{ value: '', label: '批量操作' }, { value: '0', label: '批量打印' }], |
|
|
|
exportOptions: [{ value: '', label: '批量导出' }, { value: '0', label: '导出全部' }, { value: '1', label: '导出选中' }], |
|
|
|
handleOptions: [{ |
|
|
|
value: '', |
|
|
|
label: '批量操作' |
|
|
|
}, { |
|
|
|
value: '0', |
|
|
|
label: '批量打印' |
|
|
|
}], |
|
|
|
exportOptions: [{ |
|
|
|
value: '', |
|
|
|
label: '批量导出' |
|
|
|
}, { |
|
|
|
value: '0', |
|
|
|
label: '导出全部' |
|
|
|
}, { |
|
|
|
value: '1', |
|
|
|
label: '导出选中' |
|
|
|
}], |
|
|
|
caculateInfo: { |
|
|
|
orderCount: 0, |
|
|
|
orderPay: 0, |
|
|
@ -439,6 +475,7 @@ export default { |
|
|
|
this.listQuery.status = tab.name; |
|
|
|
this.getList(); |
|
|
|
this.orderDatas(tab.name); |
|
|
|
console.log("tab", tab) |
|
|
|
}, |
|
|
|
handleResetSearch() { |
|
|
|
this.listQuery = Object.assign({}, defaultListQuery); |
|
|
@ -451,7 +488,12 @@ export default { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
handleViewOrder(index, row) { |
|
|
|
this.$router.push({ path: '/oms/orderDetail', query: { id: row.id } }); |
|
|
|
this.$router.push({ |
|
|
|
path: '/oms/orderDetail', |
|
|
|
query: { |
|
|
|
id: row.id |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleCloseOrder(index, row) { |
|
|
|
this.closeOrder.dialogVisible = true; |
|
|
@ -459,7 +501,13 @@ export default { |
|
|
|
}, |
|
|
|
handleDeliveryOrder(index, row) { |
|
|
|
let listItem = this.covertOrder(row); |
|
|
|
this.$router.push({ path: '/oms/deliverOrderList', query: { list: [listItem] } }); |
|
|
|
console.log("listItem", listItem) |
|
|
|
this.$router.push({ |
|
|
|
path: '/oms/deliverOrderList', |
|
|
|
query: { |
|
|
|
list: [listItem] |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleViewLogistics(index, row) { |
|
|
|
this.logisticsDialogVisible = true; |
|
|
@ -494,7 +542,12 @@ export default { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$router.push({ path: '/oms/deliverOrderList', query: { list: list } }); |
|
|
|
this.$router.push({ |
|
|
|
path: '/oms/deliverOrderList', |
|
|
|
query: { |
|
|
|
list: list |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (this.operateType === 2) { |
|
|
|
//关闭订单 |
|
|
|
this.closeOrder.orderIds = []; |
|
|
@ -511,11 +564,13 @@ export default { |
|
|
|
this.deleteOrder(ids); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 设置每页几条 |
|
|
|
handleSizeChange(val) { |
|
|
|
this.listQuery.pageNum = 1; |
|
|
|
this.listQuery.pageSize = val; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
// 查看第几页数据 |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.listQuery.pageNum = val; |
|
|
|
this.getList(); |
|
|
@ -545,14 +600,20 @@ export default { |
|
|
|
}, |
|
|
|
getList() { |
|
|
|
this.listLoading = true; |
|
|
|
if (this.listQuery.status == 0) |
|
|
|
this.listQuery.status = null |
|
|
|
console.log("listQuery", this.listQuery) |
|
|
|
fetchList(this.listQuery).then(response => { |
|
|
|
this.listLoading = false; |
|
|
|
console.log("list", response.data.records) |
|
|
|
this.list = response.data.records; |
|
|
|
this.total = response.data.total; |
|
|
|
}); |
|
|
|
}, |
|
|
|
orderDatas(status) { |
|
|
|
orderData({ status: status }).then(response => { |
|
|
|
orderData({ |
|
|
|
status: status |
|
|
|
}).then(response => { |
|
|
|
this.caculateInfo = response.data; |
|
|
|
}); |
|
|
|
}, |
|
|
@ -576,7 +637,8 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
covertOrder(order) { |
|
|
|
let address = order.receiverProvince + order.receiverCity + order.receiverRegion + order.receiverDetailAddress; |
|
|
|
let address = order.receiverProvince + order.receiverCity + order.receiverRegion + order |
|
|
|
.receiverDetailAddress; |
|
|
|
let listItem = { |
|
|
|
orderId: order.id, |
|
|
|
orderSn: order.orderSn, |
|
|
@ -722,10 +784,12 @@ export default { |
|
|
|
color: #909399; |
|
|
|
border-top: 1px solid #f0f0f0; |
|
|
|
padding: 20px 10px; |
|
|
|
|
|
|
|
.caculate-title { |
|
|
|
display: inline-block; |
|
|
|
margin-right: 50px; |
|
|
|
} |
|
|
|
|
|
|
|
.caculate-num { |
|
|
|
font-size: 20px; |
|
|
|
color: #ff4949; |
|
|
@ -764,16 +828,19 @@ export default { |
|
|
|
font-weight: bolder; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
.order-info { |
|
|
|
span { |
|
|
|
display: inline-block; |
|
|
|
padding: 0 0 10px 0; |
|
|
|
font-size: 3mm; |
|
|
|
} |
|
|
|
|
|
|
|
span.info { |
|
|
|
width: 60mm; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.el-table--small th, |
|
|
|
.el-table--small td { |
|
|
|
padding: 4px 0; |
|
|
|