|
|
@@ -1,5 +1,224 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
-
|
|
|
- </div>
|
|
|
-</template>
|
|
|
+ <order-page ref="pageRef" :pageConfig="pageConfig">
|
|
|
+ <template #toolbar>
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ v-permission="'recycleOrder:search:batchAudit'"
|
|
|
+ @click="handleBatchAudit"
|
|
|
+ >
|
|
|
+ 批量初审
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ v-permission="'recycleOrder:search:batchAuditComplete'"
|
|
|
+ @click="handleBatchAuditComplete"
|
|
|
+ >
|
|
|
+ 批量审核完成
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ :icon="DownloadOutlined"
|
|
|
+ v-permission="'recycleOrder:search:export'"
|
|
|
+ @click="exportData"
|
|
|
+ >
|
|
|
+ 导出订单明细
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #action="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:detail'"
|
|
|
+ @click="toOrderDetail(row)"
|
|
|
+ >
|
|
|
+ [订单详情]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:log'"
|
|
|
+ @click="openOrderLog(row)"
|
|
|
+ >
|
|
|
+ [订单日志]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:fallback'"
|
|
|
+ @click="fallbackOrder(row)"
|
|
|
+ >
|
|
|
+ [回退状态]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:arrivalAudit'"
|
|
|
+ @click="handleArrivalAudit(row)"
|
|
|
+ >
|
|
|
+ [到货审核]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:auditScreenshot'"
|
|
|
+ @click="handleAuditScreenshot(row)"
|
|
|
+ >
|
|
|
+ [审核截图]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:userTag'"
|
|
|
+ @click="openEditUserTag(row)"
|
|
|
+ >
|
|
|
+ [用户标签]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ link
|
|
|
+ v-permission="'recycleOrder:search:sendSMS'"
|
|
|
+ @click="handleSendSMS(row)"
|
|
|
+ >
|
|
|
+ [推送短信]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ link
|
|
|
+ plain
|
|
|
+ v-permission="'recycleOrder:search:smsLog'"
|
|
|
+ @click="handleSmsLog(row)"
|
|
|
+ >
|
|
|
+ [短信记录]
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <order-log ref="orderLogRef" />
|
|
|
+ <userBindTag ref="userTagRef" />
|
|
|
+ <audit-screenshot ref="auditScreenshotRef"></audit-screenshot>
|
|
|
+ <afterSalesPayment ref="paymentRef" />
|
|
|
+ <applyforOrderClaim ref="claimRef"></applyforOrderClaim>
|
|
|
+ <sendSMS ref="smsRef"></sendSMS>
|
|
|
+ <orderSmsLog ref="smsLogRef"></orderSmsLog>
|
|
|
+ </order-page>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+ import { ref, reactive } from 'vue';
|
|
|
+ import { ElMessageBox } from 'element-plus/es';
|
|
|
+ import { EleMessage } from 'ele-admin-plus/es';
|
|
|
+ import { DownloadOutlined } from '@/components/icons';
|
|
|
+ import OrderPage from '@/views/recycleOrder/components/order-page.vue';
|
|
|
+ import { useDictData } from '@/utils/use-dict-data';
|
|
|
+ import { useRouter } from 'vue-router';
|
|
|
+
|
|
|
+ //订单日志
|
|
|
+ import orderLog from '@/views/recycleOrder/components/order-log.vue';
|
|
|
+ //用户标签
|
|
|
+ import userBindTag from '@/views/recycleOrder/components/user-bind-tag.vue';
|
|
|
+ //审核截图
|
|
|
+ import auditScreenshot from '@/views/recycleOrder/components/audit-screenshot.vue';
|
|
|
+ //售后补款
|
|
|
+ import afterSalesPayment from '@/views/recycleOrder/components/after-sales-payment.vue';
|
|
|
+ //申请订单理赔
|
|
|
+ import applyforOrderClaim from '@/views/recycleOrder/components/applyfor-order-claim.vue';
|
|
|
+ //推送短信
|
|
|
+ import sendSMS from '@/views/recycleOrder/components/send-SMS.vue';
|
|
|
+ //短信记录
|
|
|
+ import orderSmsLog from '@/views/recycleOrder/components/order-sms-log.vue'
|
|
|
+
|
|
|
+ defineOptions({ name: 'recycleOrderSearch' });
|
|
|
+
|
|
|
+ let router = useRouter();
|
|
|
+ /** 页面组件实例 */
|
|
|
+ const pageRef = ref(null);
|
|
|
+
|
|
|
+ const pageConfig = reactive({
|
|
|
+ pageUrl: '',
|
|
|
+ exportUrl: '',
|
|
|
+ fileName: '回收订单查询',
|
|
|
+ cacheKey: 'recycleOrderTable'
|
|
|
+ });
|
|
|
+
|
|
|
+ //批量初审
|
|
|
+ function handleBatchAudit() {
|
|
|
+ pageRef.value?.operatBatch({
|
|
|
+ title: '确认批量审核?',
|
|
|
+ url: '/recycleOrder/batchAudit'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //批量审核完成
|
|
|
+ function handleBatchAuditComplete() {
|
|
|
+ pageRef.value?.operatBatch({
|
|
|
+ title: '确认批量审核完成?',
|
|
|
+ url: '/recycleOrder/batchAuditComplete'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ //导出数据
|
|
|
+ function exportData() {
|
|
|
+ pageRef.value?.exportData('回收订单查询');
|
|
|
+ }
|
|
|
+ //订单详情
|
|
|
+ function toOrderDetail(row) {
|
|
|
+ router.push({ path: '/recycleOrder/detail', query: { id: row.postId } });
|
|
|
+ }
|
|
|
+
|
|
|
+ //订单日志
|
|
|
+ const orderLogRef = ref(null);
|
|
|
+ function openOrderLog(row) {
|
|
|
+ console.log(row, orderLogRef.value, 'row');
|
|
|
+
|
|
|
+ orderLogRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+
|
|
|
+ //用户绑定标签
|
|
|
+ const userTagRef = ref(null);
|
|
|
+ function openEditUserTag(row) {
|
|
|
+ userTagRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+
|
|
|
+ function messageBoxConfirm({ message, url, row }) {
|
|
|
+ ElMessageBox.confirm(message, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '关闭',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ console.log(row, 'row');
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ //到货审核
|
|
|
+ function handleArrivalAudit(row) {
|
|
|
+ messageBoxConfirm({ message: '确认到货审核?', url: '', row });
|
|
|
+ }
|
|
|
+ //回退状态
|
|
|
+ function fallbackOrder(row) {
|
|
|
+ messageBoxConfirm({ message: '确认回退状态?', url: '', row });
|
|
|
+ }
|
|
|
+ //审核截图
|
|
|
+ const auditScreenshotRef = ref(null);
|
|
|
+ function handleAuditScreenshot(row) {
|
|
|
+ auditScreenshotRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+ //售后补款
|
|
|
+ const paymentRef = ref(null);
|
|
|
+ function handleAfterSalesPayment(row) {
|
|
|
+ paymentRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+ //推送短信
|
|
|
+ const smsRef = ref(null);
|
|
|
+ function handleSendSMS(row) {
|
|
|
+ smsRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+ //短信记录
|
|
|
+ const smsLogRef = ref(null);
|
|
|
+ function handleSmsLog(row) {
|
|
|
+ smsLogRef.value?.handleOpen(row);
|
|
|
+ }
|
|
|
+</script>
|