|
@@ -3,7 +3,7 @@
|
|
|
<PageTitle title="订单评价" />
|
|
<PageTitle title="订单评价" />
|
|
|
<StatusTabs v-model="activeMainTab" :tabs="mainTabs" type="line" />
|
|
<StatusTabs v-model="activeMainTab" :tabs="mainTabs" type="line" />
|
|
|
|
|
|
|
|
- <div class="search-bar">
|
|
|
|
|
|
|
+ <!-- <div class="search-bar">
|
|
|
<el-input v-model="queryParams.keyword" placeholder="搜索" style="width: 260px" clearable>
|
|
<el-input v-model="queryParams.keyword" placeholder="搜索" style="width: 260px" clearable>
|
|
|
<template #prefix
|
|
<template #prefix
|
|
|
><el-icon><Search /></el-icon
|
|
><el-icon><Search /></el-icon
|
|
@@ -19,10 +19,9 @@
|
|
|
style="width: 260px"
|
|
style="width: 260px"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div class="filter-bar">
|
|
<div class="filter-bar">
|
|
|
- <!-- <span class="filter-label">下单部门</span> -->
|
|
|
|
|
<el-tree-select
|
|
<el-tree-select
|
|
|
v-model="queryParams.department"
|
|
v-model="queryParams.department"
|
|
|
style="width: 160px"
|
|
style="width: 160px"
|
|
@@ -35,15 +34,13 @@
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
</el-tree-select>
|
|
</el-tree-select>
|
|
|
- <!-- <span class="filter-label">状态</span> -->
|
|
|
|
|
<el-select v-model="queryParams.status" placeholder="状态" style="width: 160px" clearable>
|
|
<el-select v-model="queryParams.status" placeholder="状态" style="width: 160px" clearable>
|
|
|
<el-option v-for="dict in order_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
<el-option v-for="dict in order_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <!-- <span class="filter-label">支付方式</span> -->
|
|
|
|
|
<el-select v-model="queryParams.payType" placeholder="支付方式" style="width: 160px" clearable>
|
|
<el-select v-model="queryParams.payType" placeholder="支付方式" style="width: 160px" clearable>
|
|
|
<el-option v-for="dict in pay_method" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
<el-option v-for="dict in pay_method" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>-->
|
|
|
|
|
|
|
|
<div class="order-list">
|
|
<div class="order-list">
|
|
|
<div v-for="(order, orderIndex) in orderList" :key="orderIndex" class="order-card">
|
|
<div v-for="(order, orderIndex) in orderList" :key="orderIndex" class="order-card">
|
|
@@ -154,7 +151,7 @@ import { useRouter } from 'vue-router';
|
|
|
import { Search, Edit, ChatDotRound, Document, ArrowRight, Picture, Plus } from '@element-plus/icons-vue';
|
|
import { Search, Edit, ChatDotRound, Document, ArrowRight, Picture, Plus } from '@element-plus/icons-vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
|
import { PageTitle, StatusTabs } from '@/components';
|
|
import { PageTitle, StatusTabs } from '@/components';
|
|
|
-import { getOrderList, getOrderProducts, cancelOrder, deleteOrder, getEvalutionList, addOrderEvaluation } from '@/api/pc/enterprise/order';
|
|
|
|
|
|
|
+import { getOrderList, getOrderProducts, getEvalutionList, addOrderEvaluation, getOrderEvaluation } from '@/api/pc/enterprise/order';
|
|
|
import type { OrderMain, OrderStatusStats } from '@/api/pc/enterprise/orderTypes';
|
|
import type { OrderMain, OrderStatusStats } from '@/api/pc/enterprise/orderTypes';
|
|
|
import { getDeptTree } from '@/api/pc/organization';
|
|
import { getDeptTree } from '@/api/pc/organization';
|
|
|
import { DeptInfo } from '@/api/pc/organization/types';
|
|
import { DeptInfo } from '@/api/pc/organization/types';
|
|
@@ -247,8 +244,10 @@ const getorders = async () => {
|
|
|
|
|
|
|
|
if (queryParams.keyword) params.orderNo = queryParams.keyword;
|
|
if (queryParams.keyword) params.orderNo = queryParams.keyword;
|
|
|
if (queryParams.dateRange && queryParams.dateRange.length === 2) {
|
|
if (queryParams.dateRange && queryParams.dateRange.length === 2) {
|
|
|
- params.beginTime = queryParams.dateRange[0];
|
|
|
|
|
- params.endTime = queryParams.dateRange[1];
|
|
|
|
|
|
|
+ params.params = {
|
|
|
|
|
+ beginTime: queryParams.dateRange[0],
|
|
|
|
|
+ endTime: queryParams.dateRange[1]
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
if (queryParams.department) params.department = queryParams.department;
|
|
if (queryParams.department) params.department = queryParams.department;
|
|
|
if (queryParams.status) params.orderStatus = queryParams.status;
|
|
if (queryParams.status) params.orderStatus = queryParams.status;
|
|
@@ -330,17 +329,32 @@ const handleEvaluate = (order: any) => {
|
|
|
evaluateForm.evaluationType = 1;
|
|
evaluateForm.evaluationType = 1;
|
|
|
evaluateDialogVisible.value = true;
|
|
evaluateDialogVisible.value = true;
|
|
|
};
|
|
};
|
|
|
-const handleFollowUpEvaluate = (order: any) => {
|
|
|
|
|
- currentOrder.value = order;
|
|
|
|
|
- currentProduct.value = order.products[0];
|
|
|
|
|
- evaluateDialogTitle.value = '追加评价';
|
|
|
|
|
- evaluateForm.deliverGoods = undefined;
|
|
|
|
|
- evaluateForm.content = '';
|
|
|
|
|
- evaluateForm.evaluationType = 2;
|
|
|
|
|
- evaluateDialogVisible.value = true;
|
|
|
|
|
|
|
+const handleFollowUpEvaluate = async (order: any) => {
|
|
|
|
|
+ const res = await getOrderEvaluation(order.orderId);
|
|
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
|
|
+ currentOrder.value = order;
|
|
|
|
|
+ currentProduct.value = order.products[0];
|
|
|
|
|
+ evaluateDialogTitle.value = '追加评价';
|
|
|
|
|
+ evaluateForm.deliverGoods = res.data.deliverGoods;
|
|
|
|
|
+ evaluateForm.content = res.data.content;
|
|
|
|
|
+ evaluateForm.evaluationType = 2;
|
|
|
|
|
+ evaluateDialogVisible.value = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error('获取评价失败');
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
-const handleViewEvaluation = (order: any) => {
|
|
|
|
|
- ElMessage.info('查看评价详情');
|
|
|
|
|
|
|
+const handleViewEvaluation = async (order: any) => {
|
|
|
|
|
+ const res = await getOrderEvaluation(order.orderId);
|
|
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
|
|
+ currentOrder.value = order;
|
|
|
|
|
+ currentProduct.value = order.products[0];
|
|
|
|
|
+ evaluateDialogTitle.value = '查看评价';
|
|
|
|
|
+ evaluateForm.deliverGoods = res.data.deliverGoods;
|
|
|
|
|
+ evaluateForm.content = res.data.content;
|
|
|
|
|
+ evaluateDialogVisible.value = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error('获取评价失败');
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
const handleSubmitEvaluate = async () => {
|
|
const handleSubmitEvaluate = async () => {
|
|
|
const valid = await evaluateFormRef.value?.validate();
|
|
const valid = await evaluateFormRef.value?.validate();
|