ylong 2 месяцев назад
Родитель
Сommit
7a89bc5eb8

+ 17 - 1
src/views/recycleOrder/components/order-page-all.vue

@@ -1,7 +1,9 @@
 <template>
     <ele-page flex-table>
         <!-- 搜索表单 -->
-        <order-search @search="reload" />
+        <order-review-search v-if="permissionKey === 'review'" @search="reload" />
+        <order-search v-else @search="reload" />
+
         <ele-card :body-style="{ paddingTop: '8px' }" flex-table>
             <!-- 表格 -->
             <ele-pro-table ref="tableRef" row-key="orderId" :columns="propColumns.length > 0 ? propColumns : columns"
@@ -162,6 +164,11 @@
                             [退回不良]
                         </el-button>
 
+                        <el-button type="success" link plain v-if="row.status == 11 && permissionKey != 'review'"
+                            v-permission="usePermission('applyReview')" @click="handleApplyForOrderReview(row)">
+                            [申请复审]
+                        </el-button>
+
                         <template v-if="row.interceptStatus == 0">
                             <el-button type="danger" link v-if="['5', '6'].includes(row.status)"
                                 v-permission="usePermission('interception')" @click="applyForInterception(row)">
@@ -216,6 +223,7 @@ import { EleMessage } from "ele-admin-plus/es";
 import { DownloadOutlined } from "@/components/icons";
 import { Flag, ChatDotSquare } from "@element-plus/icons-vue";
 import OrderSearch from "../components/order-search.vue";
+import OrderReviewSearch from "./order-review-search.vue";
 import TimeClock from "@/views/recycleOrder/components/time-clock.vue";
 import OrderNumber from "@/views/recycleOrder/components/order-number.vue";
 import OrderCustomer from "@/views/recycleOrder/components/order-customer.vue";
@@ -480,6 +488,14 @@ function handleCancelOrder(row) {
             }),
     });
 }
+//申请复审
+function handleApplyForOrderReview(row) {
+    messageBoxConfirm({
+        message: "确认申请复审?",
+        fetch: () => proxy.$http.post(`/order/recycleOrderReview/adminApplyReview?orderId=${row.orderId}`),
+    });
+}
+
 //申请拦截退出
 function applyForInterception(row) {
     messageBoxConfirm({

+ 96 - 0
src/views/recycleOrder/components/order-review-search.vue

@@ -0,0 +1,96 @@
+<!-- 搜索表单 -->
+<template>
+    <ele-card :body-style="{ paddingBottom: '8px' }">
+        <ProSearch :items="columns" ref="searchRef" :isShowLabel="false" @search="search">
+            <el-col :span="6" style="min-width: 160px">
+                <el-button style="width: 80px" type="primary" plain @click="search">查询</el-button>
+                <el-button style="width: 80px" type="info" @click="reset">重置</el-button>
+            </el-col>
+        </ProSearch>
+    </ele-card>
+</template>
+
+<script setup>
+import { reactive, ref, defineEmits } from 'vue';
+import { useFormData } from '@/utils/use-form-data';
+import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+import request from '@/utils/request';
+
+const emit = defineEmits(['search']);
+const columns = ref([
+    {
+        type: 'dictSelect',
+        label: '复审状态',
+        prop: 'reviewStatus',
+        props: { code: 'recycle_refund_status' }
+    },
+    {
+        type: 'input',
+        label: '用户名',
+        prop: 'userName'
+    },
+    {
+        type: 'input',
+        label: '订单编号(多个以中文逗号、空格或换行分割)',
+        prop: 'orderIds',
+        colProps: { span: 8 }
+    },
+    {
+        type: 'input',
+        label: '物流单号(多个以中文逗号、空格或换行分割)',
+        prop: 'waybillCodes',
+        colProps: { span: 8 }
+    },
+    {
+        type: 'select',
+        label: '收货仓库',
+        prop: 'godownId',
+        options: []
+    },
+    {
+        type: 'datetime',
+        label: '提交复审时间(开始时间)',
+        prop: 'applyTimeStart',
+        props: {
+            format: 'YYYY-MM-DD HH:mm:ss',
+            valueFormat: 'YYYY-MM-DD HH:mm:ss'
+        }
+    },
+    {
+        type: 'datetime',
+        label: '提交复审时间(结束时间)',
+        prop: 'applyTimeEnd',
+        props: {
+            valueFormat: 'YYYY-MM-DD HH:mm:ss'
+        }
+    },
+]);
+
+//获取仓库数据
+function getGodownList() {
+    request.post('/baseinfo/godown/searchGodown?name=').then((res) => {
+        if (res.data.code === 200) {
+            let item = columns.value.find(
+                (item) => item.prop === 'godownId'
+            );
+            item.options = res.data.data.map((item) => ({
+                label: item.godownName,
+                value: item.id
+            }));
+        }
+    });
+}
+getGodownList();
+
+const searchRef = ref(null);
+/** 搜索 */
+const search = (data) => {
+    emit('search', { ...data });
+};
+
+/** 重置 */
+const reset = () => {
+    resetFields();
+    search();
+};
+</script>

+ 0 - 14
src/views/recycleService/review/index.vue

@@ -16,15 +16,6 @@
             >
                 导出订单明细
             </el-button>
-
-            <el-radio-group
-                v-model="status"
-                @change="handleExpressTypeChange"
-                style="position: relative; top: -3px; margin-left: 20px"
-            >
-                <el-radio-button label="全部" value="" />
-                <el-radio-button label="普通上门取件" value="1" />
-            </el-radio-group>
         </template>
     </order-page>
 </template>
@@ -63,11 +54,6 @@
         return data;
     };
 
-    function handleExpressTypeChange(val) {
-        pageConfig.where.expressType = val;
-        pageRef.value?.reload({ expressType: val });
-    }
-
     //导出数据
     function exportData() {
         pageRef.value?.exportData('复审订单');