|
|
@@ -104,12 +104,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="订单佣金" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <span v-if="row.orderCommission !== null && row.orderCommission !== undefined" style="color: #f56c6c; font-weight: bold">¥{{ row.orderCommission / 100.0 }}</span>
|
|
|
- <span v-else>-</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
|
|
|
<el-table-column label="订单佣金" width="100">
|
|
|
<template #default="{ row }">
|
|
|
@@ -136,6 +131,8 @@
|
|
|
<!-- <el-button v-if="![0, 4].includes(row.status)" link type="warning" size="small" @click="openDispatchDialog(row)">重新派单</el-button>-->
|
|
|
<el-button v-if="[0, 1].includes(row.status)" link type="danger" size="small"
|
|
|
@click="handleCancel(row)">取消</el-button>
|
|
|
+ <el-button v-if="row.fulfiller && [3, 4, 5].includes(row.status)" link type="warning" size="small"
|
|
|
+ @click="openComplaintDialog(row)">投诉</el-button>
|
|
|
|
|
|
<el-dropdown v-if="[3, 4].includes(row.status)" trigger="click"
|
|
|
@command="(cmd) => handleCommand(cmd, row)">
|
|
|
@@ -175,6 +172,30 @@
|
|
|
<CareSummaryDrawer v-model:visible="careSummaryVisible" :order="careSummaryOrder" @submit="saveCareSummary" />
|
|
|
|
|
|
<PetDetailDrawer v-model:visible="petDetailVisible" :pet-id="currentPetId" />
|
|
|
+
|
|
|
+ <!-- 投诉/评价弹窗 -->
|
|
|
+ <el-dialog v-model="complaintDialogVisible" :title="complaintForm.praiseFlag ? '评价' : '投诉'" width="460px">
|
|
|
+ <el-form :model="complaintForm" label-width="80px">
|
|
|
+ <el-form-item label="评价类型">
|
|
|
+ <el-radio-group v-model="complaintForm.praiseFlag">
|
|
|
+ <el-radio :label="false">投诉/差评</el-radio>
|
|
|
+ <el-radio :label="true">好评</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="complaintForm.praiseFlag ? '评价内容' : '投诉原因'" required>
|
|
|
+ <el-input v-model="complaintForm.reason" type="textarea" :rows="4" :placeholder="complaintForm.praiseFlag ? '请输入评价内容' : '请输入投诉原因'" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="凭证图片">
|
|
|
+ <image-upload v-model="complaintForm.photos" :limit="6" />
|
|
|
+ <div class="form-tip">最多上传6张</div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="complaintDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitComplaint">确认提交</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -193,6 +214,7 @@ import { getStore } from '@/api/system/store';
|
|
|
import { reward } from '@/api/fulfiller/pool';
|
|
|
import { getPet } from '@/api/archieves/pet';
|
|
|
import { getCustomer } from '@/api/archieves/customer';
|
|
|
+import { addComplaint } from '@/api/fulfiller/complaint/index';
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const { sys_house_type, sys_entry_method } = toRefs(
|
|
|
@@ -413,6 +435,14 @@ const rewardDialogVisible = ref(false);
|
|
|
const remarkDialogVisible = ref(false);
|
|
|
const currentOperateRow = ref(null);
|
|
|
|
|
|
+const complaintDialogVisible = ref(false);
|
|
|
+const complaintForm = reactive({
|
|
|
+ reason: '',
|
|
|
+ photos: '',
|
|
|
+ praiseFlag: false
|
|
|
+});
|
|
|
+const currentComplaintOrder = ref(null);
|
|
|
+
|
|
|
const petDetailVisible = ref(false);
|
|
|
const currentPetId = ref(null);
|
|
|
|
|
|
@@ -745,6 +775,38 @@ const handleRemarkSubmit = async (text) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 投诉
|
|
|
+const openComplaintDialog = (row) => {
|
|
|
+ currentComplaintOrder.value = row;
|
|
|
+ complaintForm.reason = '';
|
|
|
+ complaintForm.photos = '';
|
|
|
+ complaintForm.praiseFlag = false;
|
|
|
+ complaintDialogVisible.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const submitComplaint = async () => {
|
|
|
+ if (!complaintForm.reason.trim()) {
|
|
|
+ ElMessage.warning(complaintForm.praiseFlag ? '请输入评价内容' : '请输入投诉原因');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!currentComplaintOrder.value?.id || !currentComplaintOrder.value?.fulfiller) {
|
|
|
+ ElMessage.warning('订单信息不完整');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ await addComplaint({
|
|
|
+ orderId: currentComplaintOrder.value.id,
|
|
|
+ fulfiller: currentComplaintOrder.value.fulfiller,
|
|
|
+ reason: complaintForm.reason,
|
|
|
+ photos: complaintForm.photos,
|
|
|
+ praiseFlag: complaintForm.praiseFlag
|
|
|
+ });
|
|
|
+ ElMessage.success('提交成功');
|
|
|
+ complaintDialogVisible.value = false;
|
|
|
+ handleSearch();
|
|
|
+ } catch { /* handled by interceptor */ }
|
|
|
+};
|
|
|
+
|
|
|
// 更多操作
|
|
|
const handleCommand = (cmd, row) => {
|
|
|
if (cmd === 'reward') openRewardDialog(row);
|