Commit 6f1adaa7 by cwq0219

订单管理

1 parent cae4117f
......@@ -78,27 +78,31 @@ function exportFn(url) {
// }
const orderManageStatusList = [
{ confId: '1', confName: '未支付' },
{ confId: '2', confName: '已支付' },
{ confId: '1', confName: '待付款' },
{ confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' },
{ confId: '5', confName: '已收货' },
{ confId: '6', confName: '待审核' },
{ confId: '7', confName: '审核成功' },
{ confId: '8', confName: '审核失败' },
{ confId: '9', confName: '待确认' },
{ confId: '10', confName: '退款中' },
{ confId: '11', confName: '已退款' },
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '待安装' },
{ confId: '15', confName: '已安装' }
{ confId: '4', confName: '待收货(待核销)' },
{ confId: '5', confName: '已收货(已核销)' },
{ confId: '6', confName: '待发货' },
{ confId: '7', confName: '待核销' },
{ confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' }
]
const afterSaleStatusList = [
{ confId: '1', confName: '待审核' },
{ confId: '2', confName: '审核成功' },
{ confId: '3', confName: '审核失败' },
{ confId: '4', confName: '待确认' },
{ confId: '5', confName: '退款中' },
{ confId: '6', confName: '已退款' },
{ confId: '7', confName: '退款失败' },
]
const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' }
{ confId: '3', confName: '秒杀订单' }
]
const deliveryTypeList = [
......@@ -201,6 +205,7 @@ export {
exportFn,
// aToExport,
orderManageStatusList,
afterSaleStatusList,
orderSourceList,
deliveryTypeList,
statusList,
......
......@@ -9,6 +9,8 @@
<span class="red-txt">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
项 累计订单总额:
<span class="red-txt">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="red-txt">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元
</span>
</div>
......@@ -112,7 +114,7 @@
<script>
import * as dayjs from 'dayjs'
import url from "@/assets/empty.png"
import { orderManageStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
data() {
......@@ -123,11 +125,13 @@ export default {
isEdit: true,
orderCode: '',
oldVal: {
orderStatuses: []
orderStatuses: [],
afterSaleStatuses: []
},
searchForm: {
orderCode: '',
orderStatuses: [],
afterSaleStatuses: [],
merchantName: '',
customerName: '',
createDate: [],
......@@ -137,7 +141,8 @@ export default {
tableSearchForm: {},
statisticsInfo: {
orderCount: '',
payPriceTotal: ''
payPriceTotal: '',
refundTotal: ''
},
// 搜索
searchFormData1: [
......@@ -154,7 +159,7 @@ export default {
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'orderStatusList',
optionsName: 'searchOrderStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1]
......@@ -179,13 +184,45 @@ export default {
}
},
{
label: '售后状态',
name: 'afterSaleStatuses',
type: 'select',
multiple: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'searchAfterSaleStatusList',
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1]
if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
targetVal = this.oldVal.afterSaleStatuses[i]
break
}
}
}
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData1[2].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData1[2].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData1[2].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('')
}
}
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
}
],
searchFormData2: [
{
label: '门店',
name: 'merchantName',
type: 'input',
labelWidth: 56
}
],
searchFormData2: [
},
{
label: '客户姓名',
name: 'customerName',
......@@ -197,7 +234,9 @@ export default {
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
}
],
searchFormData3: [
{
label: '订单类型',
name: 'orderSource',
......@@ -206,9 +245,7 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'orderSourceList'
}
],
searchFormData3: [
},
{
label: '结算方式',
name: 'deliveryType',
......@@ -357,6 +394,14 @@ export default {
}
},
{
label: '售后状态',
prop: 'afterSaleStatus',
width: '80',
formatter: cellValue => {
return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-'
}
},
{
label: '结算方式',
prop: 'deliveryType',
width: '80',
......@@ -369,7 +414,10 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
searchOrderStatusList: orderManageStatusList.filter(item => ['1', '3', '4', '5', '6', '9'].includes(item.confId)),
searchAfterSaleStatusList: afterSaleStatusList.filter(item => ['1', '6', '7'].includes(item.confId)),
orderStatusList: orderManageStatusList,
afterSaleStatusList: afterSaleStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
......@@ -462,7 +510,7 @@ export default {
var params = this.getParams()
delete params.createDate
this.$apis.orderManage.getCountApi(params).then(res => {
this.statisticsInfo = res || { orderCount: '', payPriceTotal: '' }
this.statisticsInfo = res || { orderCount: '', payPriceTotal: '', refundTotal: '' }
})
},
......@@ -662,6 +710,7 @@ export default {
this.searchForm = {
orderCode: '',
orderStatuses: [],
afterSaleStatuses: [],
merchantName: '',
customerName: '',
createDate: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!