订单列表增加部分订单状态枚举

This commit is contained in:
cuiyouliang 2025-06-11 16:49:31 +08:00
parent 456d9a47e3
commit ea57595738
3 changed files with 124 additions and 73 deletions

View File

@ -316,3 +316,22 @@ export const removeClass = (ele: HTMLElement, cls: string) => {
export const isExternal = (path: string) => {
return /^(https?:|http?:|mailto:|tel:)/.test(path);
};
// 获取枚举值的中文label回显
/**
*@param id id
*@param emuList枚举值
*/
export const getEmulistLabelById = (id: string, emuList: any) => {
if (!id) {
return '--';
}
if (emuList && emuList.length) {
const { label } = emuList.find((item: any) => {
return item.value == id;
});
return label || '--';
} else {
return '--';
}
};

View File

@ -1,18 +1,17 @@
<template>
<div class="app-container" v-if="show">
<el-form-item label="订单类型" prop="orderType">
<DictRadio
v-if="orderStatusMap.length > 0"
:radioList="orderStatusMap"
v-model="queryParams.status"
radioData="oms_order_status"
size="small"
:show-all="'all'"
:filter="['11', '12', '13', '14']"
@change="handleQuery"
></DictRadio>
</el-form-item>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
<el-form-item label="订单类型" prop="orderType">
<DictRadio
v-model="queryParams.status"
radioData="oms_order_type"
:radioList="orderTypeMap"
size="small"
:show-all="'all'"
@change="handleQuery"
>
</DictRadio>
</el-form-item>
<el-form-item label="订单状态" prop="status">
<DictRadio
v-if="orderStatusMap.length > 0"
@ -27,27 +26,27 @@
</el-form-item>
<el-form-item label="提现状态" prop="orderType">
<DictRadio
v-if="orderStatusMap.length > 0"
:radioList="orderStatusMap"
v-if="orderWithdrawMap.length > 0"
v-model="queryParams.status"
radioData="oms_order_status"
radioData="oms_withdraw_staus"
:radioList="orderWithdrawMap"
size="small"
:show-all="'all'"
:filter="['11', '12', '13', '14']"
@change="handleQuery"
></DictRadio>
>
</DictRadio>
</el-form-item>
<el-form-item label="退款状态" prop="orderType">
<DictRadio
v-if="orderStatusMap.length > 0"
:radioList="orderStatusMap"
v-if="orderAftersaleMap.length > 0"
v-model="queryParams.status"
radioData="oms_order_status"
radioData="oms_aftersale_status"
:radioList="orderAftersaleMap"
size="small"
:show-all="'all'"
:filter="['11', '12', '13', '14']"
@change="handleQuery"
></DictRadio>
>
</DictRadio>
</el-form-item>
<el-form-item label="订单编号" prop="orderSn">
<el-input v-model.trim="queryParams.orderSn" placeholder="请输入订单编号" clearable size="small" @keyup.enter="handleQuery" />
@ -85,13 +84,70 @@
</el-form>
<el-table v-loading="loading" :data="omsOrderList" border cell-class-name="my-cell">
<el-table-column label="达人信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="买家信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="卖家信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="代理信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="商品信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="达人信息" prop="couponAmount">
<template v-slot="scope">
<div>达人姓名{{ scope.row.deliverySn }}</div>
<div>达人手机号{{ scope.row.deliverySn }}</div>
</template>
</el-table-column>
<el-table-column label="买家信息" prop="couponAmount">
<template v-slot="scope">
<div>买家姓名{{ scope.row.deliverySn }}</div>
<div>买家手机号{{ scope.row.deliverySn }}</div>
</template>
</el-table-column>
<el-table-column label="卖家信息" prop="couponAmount">
<template v-slot="scope">
<div>卖家姓名{{ scope.row.deliverySn }}</div>
<div>卖家手机号{{ scope.row.deliverySn }}</div>
</template>
</el-table-column>
<el-table-column label="代理信息" prop="couponAmount">
<template v-slot="scope">
<div>代理人姓名{{ scope.row.deliverySn }}</div>
<div>代理区域{{ scope.row.deliverySn }}</div>
<div>代理手机号{{ scope.row.deliverySn }}</div>
</template>
</el-table-column>
<el-table-column label="代理信息" prop="couponAmount">
<template v-slot="scope">
<div>达人姓名{{ scope.row.deliverySn }}</div>
<div>达人手机号{{ scope.row.deliverySn }}</div>
</template>
</el-table-column>
<el-table-column label="商品规格" prop="productList" width="280">
<template v-slot="scope">
<div v-for="item in scope.row.productList" class="product-container">
<el-popover placement="right" trigger="hover">
<el-image :src="item.pic" style="width: 350px; height: 350px" />
<template v-slot:reference>
<el-image class="small-img product-item" :src="item.pic" style="width: 40px; height: 40px" />
</template>
</el-popover>
<div class="product-item" style="margin-left: 5px">
<div class="sp-data">
<span v-for="(value, key) in JSON.parse(item.spData)">{{ key }}{{ value }}&nbsp;</span>
</div>
<div class="product-item quantity">
<span style="margin-right: 10px">{{ item.salePrice }}</span>
<span>x{{ item.buyNum }}</span>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="分佣信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="代理信息" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="订单类型" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="订单编号" prop="orderSn" width="120">
<template v-slot="scope">
<el-link type="text" icon="Copy" link @click="copy(scope.row.orderSn)" :underline="false">
{{ scope.row.orderSn }}
<el-icon><CopyDocument /></el-icon>
</el-link>
</template>
</el-table-column>
<el-table-column label="交易编号" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="金额" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="订单状态" prop="status" width="160">
<template v-slot="scope">
<div>
@ -106,6 +162,8 @@
<div v-if="scope.row.deliveryTime">发货时间{{ parseTime(scope.row.deliveryTime, '') }}</div>
</template>
</el-table-column>
<el-table-column label="退款状态" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="提现状态" prop="couponAmount" width="80"> </el-table-column>
<el-table-column label="收件信息" prop="receiverName" width="280">
<template v-slot="scope">
<div>
@ -119,12 +177,6 @@
</div>
</template>
</el-table-column>
<el-table-column label="客户信息" prop="receiverName" width="160">
<template v-slot="scope">
<p>{{ scope.row.nickName }}</p>
<p>{{ scope.row.mark }}</p>
</template>
</el-table-column>
<el-table-column label="备注留言" prop="note" width="160">
<template v-slot="scope">
<div>
@ -157,35 +209,6 @@
<div>实付 {{ scope.row.payAmount }}</div>
</template>
</el-table-column>
<el-table-column label="商品规格" prop="productList" width="280">
<template v-slot="scope">
<div v-for="item in scope.row.productList" class="product-container">
<el-popover placement="right" trigger="hover">
<el-image :src="item.pic" style="width: 350px; height: 350px" />
<template v-slot:reference>
<el-image class="small-img product-item" :src="item.pic" style="width: 40px; height: 40px" />
</template>
</el-popover>
<div class="product-item" style="margin-left: 5px">
<div class="sp-data">
<span v-for="(value, key) in JSON.parse(item.spData)">{{ key }}{{ value }}&nbsp;</span>
</div>
<div class="product-item quantity">
<span style="margin-right: 10px">{{ item.salePrice }}</span>
<span>x{{ item.buyNum }}</span>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="订单编号" prop="orderSn" width="120" fixed="right">
<template v-slot="scope">
<el-link type="text" icon="Copy" link @click="copy(scope.row.orderSn)" :underline="false">
{{ scope.row.orderSn }}
<el-icon><CopyDocument /></el-icon>
</el-link>
</template>
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="220" fixed="right">
<template v-slot="scope">
<el-button size="small" type="text" @click="goDetail(scope.row)" v-hasPermi="['oms:order:query']">详情 </el-button>
@ -201,19 +224,19 @@
</el-table-column>
</el-table>
<pagination v-if="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<!-- 发货对话框 -->
<!-- 核销对话框 -->
<el-dialog :title="deliveryObj.title" v-model="deliveryObj.open" width="500px" append-to-body>
<el-form ref="deliveryForm" :model="deliveryObj.form" :rules="deliveryObj.rules" label-width="100px">
<el-form-item label="快递公司" prop="expressName">
<!-- <el-form-item label="快递公司" prop="expressName">
<el-select v-model="deliveryObj.form.expressName" placeholder="请选择快递公司" clearable size="small" filterable>
<!-- <el-option v-for="(item, index) in experssList" :label="item.expressName" :value="item.expressCode"/>-->
&lt;!&ndash; <el-option v-for="(item, index) in experssList" :label="item.expressName" :value="item.expressCode"/>&ndash;&gt;
<el-option label="顺丰速运" value="1" />
<el-option label="申通快递" value="2" />
<el-option label="圆通快递" value="2" />
</el-select>
</el-form-item>
<el-form-item label="快递单号" prop="expressSn">
<el-input v-model="deliveryObj.form.expressSn" placeholder="请输入快递单号" controls-position="right" :min="0" />
</el-form-item>-->
<el-form-item label="核销编码" prop="expressSn">
<el-input v-model="deliveryObj.form.expressSn" placeholder="请输入核销编码" controls-position="right" :min="0" />
</el-form-item>
</el-form>
<template v-slot:footer>
@ -316,6 +339,9 @@ export default {
shortcuts: dateUtil.getTimeShort2()
},
orderStatusMap: [],
orderTypeMap: [],
orderWithdrawMap: [],
orderAftersaleMap: [],
//
showSearch: true,
//
@ -353,7 +379,7 @@ export default {
},
showMoreCondition: false,
deliveryObj: {
title: '订单发货',
title: '核销',
form: {
orderId: null,
expressName: null,
@ -401,7 +427,13 @@ export default {
async mounted() {
this.show = true;
const orderStatusMap = await this.getDictionaryByKey('oms_order_status');
const orderTypeMap = await this.getDictionaryByKey('oms_order_type');
const orderWithdrawMap = await this.getDictionaryByKey('oms_withdraw_staus');
const orderAftersaleMap = await this.getDictionaryByKey('oms_aftersale_status');
this.orderStatusMap = orderStatusMap;
this.orderTypeMap = orderTypeMap;
this.orderWithdrawMap = orderWithdrawMap;
this.orderAftersaleMap = orderAftersaleMap;
const { phone, status, today } = this.$route.query;
if (phone) {
this.queryParams.userPhone = phone;
@ -609,7 +641,7 @@ export default {
this.$refs['deliveryForm'].validate((valid) => {
if (valid) {
deliverProduct(this.deliveryObj.form).then((resp) => {
this.$modal.msgSuccess('发货成功');
this.$modal.msgSuccess('核销成功');
this.cancelDelivery();
this.getList();
});

View File

@ -24,9 +24,9 @@ export default defineConfig(({ mode, command }) => {
open: true,
proxy: {
[env.VITE_APP_BASE_API]: {
target: 'http://192.168.1.13:8080',
// target: 'http://192.168.1.13:8080',
// target: 'http://192.168.1.250:8080',
// target: 'http://111.62.22.190:8080', // 测试环境
target: 'http://111.62.22.190:8080', // 测试环境
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),