状态修改

This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-09 16:29:02 +08:00
parent dd8626746a
commit 3f86343c6a
2 changed files with 189 additions and 272 deletions

View File

@ -169,23 +169,23 @@ export function cancelOrderStatusFilter(status) {
*
* 支付方式
*/
export function orderPayType(type) {
const typeMap = {
'0': '余额支付',
'1': '微信支付',
'2': '小程序',
'3': '微信支付',
'4': '支付宝',
'5': '支付宝扫码',
'6': '微信扫码'
}
return typeMap[type]
const typeMap = {
'0': '余额支付',
'1': '微信支付',
'2': '小程序',
'3': '微信支付',
'4': '支付宝',
'5': '支付宝扫码',
'6': '微信扫码',
'9': '商户支付'
}
/**
*
* 付费会员支付方式
*/
return typeMap[type]
}
/**
*
* 付费会员支付方式
*/
export function svipPayType(type) {
const typeMap = {
@ -204,12 +204,12 @@ export function svipPayType(type) {
* @description 订单活动状态
*/
export function activityOrderStatus(status) {
const statusMap = {
'-1': '未完成',
'10': '已完成',
'0': '进行中'
}
return statusMap[status]
const statusMap = {
'-1': '未完成',
'10': '已完成',
'0': '进行中'
}
return statusMap[status]
}
/**
* @description 自提订单状态
@ -251,13 +251,13 @@ export function reconciliationStatusFilter(status) {
* @description 商品状态
*/
export function productStatusFilter(status) {
const statusMap = {
'0': '下架',
'1': '上架显示',
'-1': '平台关闭'
}
return statusMap[status]
const statusMap = {
'0': '下架',
'1': '上架显示',
'-1': '平台关闭'
}
return statusMap[status]
}
/**
* @description 优惠券类型
*/
@ -380,87 +380,87 @@ export function seckillStatusFilter(status) {
}
return statusMap[status]
}
/**
* @description 导出订单类型
*/
/**
* @description 导出订单类型
*/
export function exportOrderTypeFilter(type) {
const typeMap = {
'order': '订单',
'financial': '流水',
'delivery': '发货单',
'importDelivery': '导入记录',
'exportFinancial': '账单信息',
'searchLog': '用户搜索'
}
return typeMap[type]
const typeMap = {
'order': '订单',
'financial': '流水',
'delivery': '发货单',
'importDelivery': '导入记录',
'exportFinancial': '账单信息',
'searchLog': '用户搜索'
}
return typeMap[type]
}
/**
* @description 主体类型
*/
export function organizationType(type) {
const typeMap = {
2401: '小微商户',
2500: '个人卖家',
4: '个体工商户',
2: '企业',
3: '党政、机关及事业单位',
1708: '其他组织'
}
return typeMap[type]
const typeMap = {
2401: '小微商户',
2500: '个人卖家',
4: '个体工商户',
2: '企业',
3: '党政、机关及事业单位',
1708: '其他组织'
}
return typeMap[type]
}
/**
* @description 证件类型
*/
export function id_docType(type) {
const typeMap = {
1: '中国大陆居民-身份证',
2: '其他国家或地区居民-护照',
3: '中国香港居民–来往内地通行证',
4: '中国澳门居民–来往内地通行证',
5: '中国台湾居民–来往大陆通行证'
}
return typeMap[type]
const typeMap = {
1: '中国大陆居民-身份证',
2: '其他国家或地区居民-护照',
3: '中国香港居民–来往内地通行证',
4: '中国澳门居民–来往内地通行证',
5: '中国台湾居民–来往大陆通行证'
}
/**
* @description 证件类型
*/
return typeMap[type]
}
/**
* @description 证件类型
*/
export function purchaseType(type) {
const typeMap = {
'sms': '短信',
'copy': '商品采集',
'dump': '电子面单',
'query': '物流查询'
}
return typeMap[type]
const typeMap = {
'sms': '短信',
'copy': '商品采集',
'dump': '电子面单',
'query': '物流查询'
}
return typeMap[type]
}
/**
* @description 证件类型
*/
export function communityStatus(status) {
const statusMap = {
'0': '待审核',
'1': '审核通过',
'-1': '审核失败',
'-2': '强制下架'
}
return statusMap[status]
/**
* @description 证件类型
*/
export function communityStatus(status) {
const statusMap = {
'0': '待审核',
'1': '审核通过',
'-1': '审核失败',
'-2': '强制下架'
}
return statusMap[status]
}
/**
* @description 订单配送状态
*/
export function runErrandStatus(status) {
const statusMap = {
'0': '待接单',
'-1': '已取消',
'2': '待取货',
'3': '配送中',
'4': '已完成',
'9': '物品返回中',
'10': '物品返回完成',
'100': '骑士到店'
}
return statusMap[status]
/**
* @description 订单配送状态
*/
export function runErrandStatus(status) {
const statusMap = {
'0': '待接单',
'-1': '已取消',
'2': '待取货',
'3': '配送中',
'4': '已完成',
'9': '物品返回中',
'10': '物品返回完成',
'100': '骑士到店'
}
return statusMap[status]
}

View File

@ -5,165 +5,92 @@
<div class="container">
<el-form size="small" inline label-width="100px">
<el-form-item label="订单状态:">
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1),getCardList()">
<el-radio-button label="">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
<el-radio-button
label="1"
>待付款 {{ '(' +orderChartType.unpaid?orderChartType.unpaid:0+ ')' }}</el-radio-button>
<el-radio-button
label="2"
>待发货 {{ '(' +orderChartType.unshipped?orderChartType.unshipped:0+ ')' }}</el-radio-button>
<el-radio-button
label="3"
>待收货 {{ '(' +orderChartType.untake?orderChartType.untake:0+ ')' }}</el-radio-button>
<el-radio-button
label="4"
>待评价 {{ '(' +orderChartType.unevaluate?orderChartType.unevaluate:0+ ')' }}</el-radio-button>
<el-radio-button
label="5"
>交易完成 {{ '(' +orderChartType.complete?orderChartType.complete:0+ ')' }}</el-radio-button>
<el-radio-button
label="6"
>已退款 {{ '(' +orderChartType.refund?orderChartType.refund:0+ ')' }}</el-radio-button>
<el-radio-button
label="7"
>已删除 {{ '(' +orderChartType.del?orderChartType.del:0+ ')' }}</el-radio-button>
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1), getCardList()">
<el-radio-button label="">全部 {{ '(' + orderChartType.all ? orderChartType.all : 0 + ')' }}</el-radio-button>
<el-radio-button label="1">待付款 {{ '(' + orderChartType.unpaid ? orderChartType.unpaid : 0 + ')'
}}</el-radio-button>
<el-radio-button label="2">待发货 {{ '(' + orderChartType.unshipped ? orderChartType.unshipped : 0 + ')'
}}</el-radio-button>
<el-radio-button label="3">待收货 {{ '(' + orderChartType.untake ? orderChartType.untake : 0 + ')'
}}</el-radio-button>
<el-radio-button label="4">待评价 {{ '(' + orderChartType.unevaluate ? orderChartType.unevaluate : 0 + ')'
}}</el-radio-button>
<el-radio-button label="5">交易完成 {{ '(' + orderChartType.complete ? orderChartType.complete : 0 + ')'
}}</el-radio-button>
<el-radio-button label="6">已退款 {{ '(' + orderChartType.refund ? orderChartType.refund : 0 + ')'
}}</el-radio-button>
<el-radio-button label="7">已删除 {{ '(' + orderChartType.del ? orderChartType.del : 0 + ')' }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="时间选择:" class="width100">
<el-radio-group
v-model="tableFrom.date"
type="button"
class="mr20"
size="small"
@change="selectChange(tableFrom.date)"
>
<el-radio-button
v-for="(item,i) in fromList.fromTxt"
:key="i"
:label="item.val"
>{{ item.text }}</el-radio-button>
<el-radio-group v-model="tableFrom.date" type="button" class="mr20" size="small"
@change="selectChange(tableFrom.date)">
<el-radio-button v-for="(item, i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text
}}</el-radio-button>
</el-radio-group>
<el-date-picker
v-model="timeVal"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 250px;"
@change="onchangeTime"
/>
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small"
type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;"
@change="onchangeTime" />
</el-form-item>
<el-form-item label="活动类型:" style="display: inline-block;">
<el-select
v-model="tableFrom.activity_type"
clearable
filterable
placeholder="请选择"
class="selWidth"
@change="getList(1),getCardList()"
>
<el-option
v-for="item in activity"
:key="item.type"
:label="item.name"
:value="item.type"
/>
<el-select v-model="tableFrom.activity_type" clearable filterable placeholder="请选择" class="selWidth"
@change="getList(1), getCardList()">
<el-option v-for="item in activity" :key="item.type" :label="item.name" :value="item.type" />
</el-select>
</el-form-item>
<el-form-item label="商户名称:" style="display: inline-block;">
<el-select
v-model="tableFrom.mer_id"
clearable
filterable
placeholder="请选择"
class="selWidth"
@change="getList(1),getCardList()"
>
<el-option
v-for="item in merSelect"
:key="item.mer_id"
:label="item.mer_name"
:value="item.mer_id"
/>
<el-select v-model="tableFrom.mer_id" clearable filterable placeholder="请选择" class="selWidth"
@change="getList(1), getCardList()">
<el-option v-for="item in merSelect" :key="item.mer_id" :label="item.mer_name" :value="item.mer_id" />
</el-select>
</el-form-item>
<el-form-item label="商户类别:" style="display: inline-block;">
<el-select
v-model="tableFrom.is_trader"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1),getCardList()"
>
<el-select v-model="tableFrom.is_trader" clearable placeholder="请选择" class="selWidth"
@change="getList(1), getCardList()">
<el-option label="自营" value="1" />
<el-option label="非自营" value="0" />
</el-select>
</el-form-item>
<el-form-item label="商品名称:" class="width100" style="display: inline-block;">
<el-input
v-model="tableFrom.store_name"
@keyup.enter.native="getList(1),getCardList()"
placeholder="请输入商品名称"
class="selWidth"
size="small"
>
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt" @click="getList(1),getCardList()" />
<el-input v-model="tableFrom.store_name" @keyup.enter.native="getList(1), getCardList()"
placeholder="请输入商品名称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt"
@click="getList(1), getCardList()" />
</el-input>
</el-form-item>
<el-form-item label="关键字:" class="width100" style="display: inline-block;">
<el-input
v-model="tableFrom.keywords"
@keyup.enter.native="getList(1),getCardList()"
placeholder="请输入订单号/收货人/联系方式"
class="selWidth"
size="small"
>
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt" @click="getList(1),getCardList()" />
<el-input v-model="tableFrom.keywords" @keyup.enter.native="getList(1), getCardList()"
placeholder="请输入订单号/收货人/联系方式" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt"
@click="getList(1), getCardList()" />
</el-input>
</el-form-item>
<el-form-item label="总单单号:" class="width100" style="display: inline-block;">
<el-input
v-model="tableFrom.group_order_sn"
@keyup.enter.native="getList(1),getCardList()"
placeholder="请输入总单单号"
class="selWidth"
size="small"
>
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt" @click="getList(1),getCardList()" />
<el-input v-model="tableFrom.group_order_sn" @keyup.enter.native="getList(1), getCardList()"
placeholder="请输入总单单号" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt"
@click="getList(1), getCardList()" />
</el-input>
</el-form-item>
<el-form-item label="用户信息:" class="width100" style="display: inline-block;">
<el-input
v-model="tableFrom.username"
@keyup.enter.native="getList(1),getCardList()"
placeholder="请输入用户昵称/手机号"
class="selWidth"
size="small"
>
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt" @click="getList(1),getCardList()" />
<el-input v-model="tableFrom.username" @keyup.enter.native="getList(1), getCardList()"
placeholder="请输入用户昵称/手机号" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" class="el-button-solt"
@click="getList(1), getCardList()" />
</el-input>
<el-button size="small" type="primary" icon="el-icon-top" @click="exports">导出列表</el-button>
<!-- <el-button size="small" type="primary" @click="getExportFileList">导出记录</el-button> -->
</el-form-item>
</el-form>
</div>
<el-tabs v-if="headeNum.length > 0" v-model="tableFrom.order_type" @tab-click="getList(1),getCardList()">
<el-tab-pane v-for="(item,index) in headeNum" :key="index" :name="item.order_type.toString()" :label="item.title +'('+item.count +')' " />
<el-tabs v-if="headeNum.length > 0" v-model="tableFrom.order_type" @tab-click="getList(1), getCardList()">
<el-tab-pane v-for="(item, index) in headeNum" :key="index" :name="item.order_type.toString()"
:label="item.title + '(' + item.count + ')'" />
</el-tabs>
<cards-data :card-lists="cardLists" />
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
:cell-class-name="addTdClass"
>
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini" class="table"
highlight-current-row :cell-class-name="addTdClass">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
@ -193,7 +120,9 @@
</el-table-column>
<el-table-column label="用户信息" min-width="170">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="onUserDetails(scope.row.uid)">{{scope.row.user&&scope.row.user.nickname +'/'+ scope.row.uid}}</el-button>
<el-button type="text" size="small"
@click.native="onUserDetails(scope.row.uid)">{{ scope.row.user && scope.row.user.nickname + '/' +
scope.row.uid }}</el-button>
</template>
</el-table-column>
<el-table-column label="订单类型" min-width="90">
@ -203,14 +132,17 @@
</el-table-column>
<el-table-column label="活动类型" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.activity_type != 4">{{ scope.row.activity_type === 1 ? "秒杀" : scope.row.activity_type === 2 ? "预售" : scope.row.activity_type === 3 ? "助力" : "--"}}</span>
<span v-else>拼团订单 <span v-if="scope.row.groupUser && scope.row.groupUser.groupBuying">-{{scope.row.groupUser.groupBuying.status | activityOrderStatus}}</span></span>
<span v-if="scope.row.activity_type != 4">{{ scope.row.activity_type === 1 ? "秒杀" : scope.row.activity_type
=== 2 ? "预售" : scope.row.activity_type === 3 ? "助力" : "--" }}</span>
<span v-else>拼团订单 <span
v-if="scope.row.groupUser && scope.row.groupUser.groupBuying">-{{ scope.row.groupUser.groupBuying.status
| activityOrderStatus }}</span></span>
</template>
</el-table-column>
<el-table-column prop="real_name" label="收货人/订购人" min-width="120" />
<el-table-column label="商户名称" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name :'' }}</span>
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name : '' }}</span>
</template>
</el-table-column>
<el-table-column prop="mer_name" label="商户类别" min-width="90">
@ -220,26 +152,16 @@
</el-table-column>
<el-table-column label="商品信息" min-width="330">
<template slot-scope="scope">
<div
v-for="(val, i) in scope.row.orderProduct"
:key="i"
class="tabBox acea-row row-middle"
>
<div v-for="(val, i) in scope.row.orderProduct" :key="i" class="tabBox acea-row row-middle">
<div class="demo-image__preview">
<el-image
:src="val.cart_info.product.image"
:preview-src-list="[val.cart_info.product.image]"
/>
<el-image :src="val.cart_info.product.image" :preview-src-list="[val.cart_info.product.image]" />
</div>
<span
class="tabBox_tit"
>{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
<span class="tabBox_tit">{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku
}}</span>
<span class="tabBox_pice">
{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}
<em
v-if="val.refund_num < val.product_num && val.refund_num > 0"
style="color: red;font-style: normal;"
>(-{{ val.product_num - val.refund_num }})</em>
{{ '¥' + val.cart_info.productAttr.price + ' x ' + val.product_num }}
<em v-if="val.refund_num < val.product_num && val.refund_num > 0"
style="color: red;font-style: normal;">(-{{ val.product_num - val.refund_num }})</em>
</span>
</div>
</template>
@ -252,8 +174,13 @@
</el-table-column>
<el-table-column label="订单佣金" min-width="100">
<template slot-scope="scope">
<span>{{ (parseFloat(scope.row.extension_one) + parseFloat(scope.row.extension_two) + parseFloat(scope.row.refund_extension_one) + parseFloat(scope.row.refund_extension_two)).toFixed(2) }}</span>
<em v-if="(scope.row.refund_extension_one > 0) || (scope.row.refund_extension_two > 0)" style="color: red;font-style: normal;">(-{{ (parseFloat(scope.row.refund_extension_one)+parseFloat(scope.row.refund_extension_two)).toFixed(2) }})</em>
<span>{{ (parseFloat(scope.row.extension_one) + parseFloat(scope.row.extension_two) +
parseFloat(scope.row.refund_extension_one) + parseFloat(scope.row.refund_extension_two)).toFixed(2)
}}</span>
<em v-if="(scope.row.refund_extension_one > 0) || (scope.row.refund_extension_two > 0)"
style="color: red;font-style: normal;">(-{{
(parseFloat(scope.row.refund_extension_one) + parseFloat(scope.row.refund_extension_two)).toFixed(2)
}})</em>
</template>
</el-table-column>
<el-table-column label="支付类型" min-width="80">
@ -272,7 +199,8 @@
<span v-if="scope.row.is_del === 0">
<span v-if="scope.row.paid === 0">待付款</span>
<span v-else>
<span v-if="scope.row.order_type === 0 || scope.row.order_type === 2">{{ scope.row.status | orderStatusFilter }}</span>
<span v-if="scope.row.order_type === 0 || scope.row.order_type === 2">{{ scope.row.status |
orderStatusFilter }}</span>
<span v-else>{{ scope.row.status | takeOrderStatusFilter }}</span>
</span>
</span>
@ -297,27 +225,17 @@
<el-table-column label="操作" min-width="80" fixed="right" align="center">
<template slot-scope="scope">
<span v-for="(val, i ) in scope.row.orderProduct" :key="i">
<el-button
v-if="orderFilter(scope.row)"
type="text"
size="small"
@click="onRefundDetail(scope.row.order_sn)"
>查看退款单</el-button>
<el-button v-if="orderFilter(scope.row)" type="text" size="small"
@click="onRefundDetail(scope.row.order_sn)">查看退款单</el-button>
</span>
<el-button type="text" size="small" @click="onOrderDetails(scope.row.order_id)">详情</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
<el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
@current-change="pageChange" />
</div>
</el-card>
<!--用户信息-->
@ -327,13 +245,8 @@
<!--导出订单列表-->
<file-list ref="exportList" />
<!--详情-->
<order-detail
ref="orderDetail"
:orderId="orderId"
@closeDrawer="closeDrawer"
@changeDrawer="changeDrawer"
:drawer="drawer"
></order-detail>
<order-detail ref="orderDetail" :orderId="orderId" @closeDrawer="closeDrawer" @changeDrawer="changeDrawer"
:drawer="drawer"></order-detail>
</div>
</template>
@ -365,10 +278,10 @@ export default {
total: 0,
},
activity: [
{name: "秒杀订单",type: 1},
{name: "预售订单",type: 2},
{name: "助力订单",type: 3},
{name: "拼团订单",type: 4}
{ name: "秒杀订单", type: 1 },
{ name: "预售订单", type: 2 },
{ name: "助力订单", type: 3 },
{ name: "拼团订单", type: 4 }
],
listLoading: true,
tableFrom: {
@ -490,13 +403,13 @@ export default {
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData = await this.downData(excelData)
pageCount = Math.ceil(lebData.count/excelData.limit)
pageCount = Math.ceil(lebData.count / excelData.limit)
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
}
}
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename);
return
},
/**订单列表 */
@ -578,17 +491,17 @@ export default {
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
// this.cardLists = res.data.stat;
// this.cardLists = res.data.stat;
this.listLoading = false;
// this.getCardList();
// this.getCardList();
})
.catch((res) => {
this.$message.error(res.message);
this.listLoading = false;
});
},
getCardList(){
cardListApi(this.tableFrom)
getCardList() {
cardListApi(this.tableFrom)
.then((res) => {
this.cardLists = res.data;
})
@ -623,17 +536,21 @@ export default {
width: 83px !important;
}
}
.selWidth {
width: 300px;
}
.el-dropdown-link {
cursor: pointer;
color: #409eff;
font-size: 12px;
}
.el-icon-arrow-down {
font-size: 12px;
}
.tabBox_tit {
width: 60%;
font-size: 12px !important;