Răsfoiți Sursa

fix 修改bug

Alex 1 an în urmă
părinte
comite
7c9ff06e1c

+ 120 - 0
src/utils/use-order-operation.js

@@ -0,0 +1,120 @@
+import { getCurrentInstance, ref } from 'vue';
+import { ElMessageBox } from 'element-plus/es';
+import { EleMessage } from 'ele-admin-plus/es';
+import { useRouter } from 'vue-router';
+//订单日志
+import orderLog from '@/views/recycleOrder/components/order-log.vue';
+//订单详情
+import orderDetail from '@/views/recycleOrder/components/order-detail.vue';
+
+export function useOrderOperation(pageRef) {
+    const { proxy } = getCurrentInstance();
+    const router = useRouter();
+    
+    // 组件引用
+    const orderLogRef = ref(null);
+    const orderDetailRef = ref(null);
+
+    function messageBoxConfirm({ message, fetch }) {
+        ElMessageBox.confirm(message, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '关闭',
+            type: 'warning'
+        }).then(() => {
+            fetch().then((res) => {
+                if (res.data.code === 200) {
+                    EleMessage.success('操作成功');
+                    pageRef.value?.reload();
+                } else {
+                    EleMessage.error(res.data.msg);
+                }
+            });
+        });
+    }
+
+    return {
+        // 组件引用
+        orderLogRef,
+        orderDetailRef,
+        orderLog,
+        orderDetail,
+
+        //订单详情
+        toOrderDetail(row) {
+            orderDetailRef.value?.handleOpen(row);
+        },
+
+        //订单日志
+        openOrderLog(row) {
+            orderLogRef.value?.handleOpen(row);
+        },
+
+        //取消订单
+        handleCancelOrder(row) {
+            const rows = row == null ? [] : [row];
+            if (!rows.length) {
+                EleMessage.error('请至少选择一条数据');
+                return;
+            }
+            messageBoxConfirm({
+                message: '是否确认取消订单?',
+                fetch: () => proxy.$http.post('/order/orderInfo/adminCancel', {
+                    orderIds: rows.map(item => item.orderId)
+                })
+            });
+        },
+        //申请拦截退出
+        applyForInterception(row) {
+            messageBoxConfirm({
+                message: '确认拦截?',
+                fetch: () => proxy.$http.post(`/order/orderInfo/intercept/${row.orderId}`)
+            });
+        },
+        //物流签收
+        handleLogisticsSigning(row) {
+            messageBoxConfirm({
+                message: '确认签收?',
+                fetch: () => proxy.$http.post('/order/orderInfo/adminSigned', {
+                    orderIds: [row.orderId]
+                })
+            });
+        },
+        //回退状态
+        fallbackOrder(row) {
+            messageBoxConfirm({
+                message: '确认回退?',
+                fetch: () => proxy.$http.post(`/order/orderInfo/statusBack/${row.orderId}`)
+            });
+        },
+        //确认收货
+        handleConfirmReceipt(row) {
+            const rows = row == null ? [] : [row];
+            if (!rows.length) {
+                EleMessage.error('请至少选择一条数据');
+                return;
+            }
+            messageBoxConfirm({
+                message: '确认收货?',
+                fetch: () => proxy.$http.post('/order/orderInfo/adminConfirm', {
+                    orderIds: rows.map(item => item.orderId)
+                })
+            });
+        },
+        //物流揽件
+        materialPickup(row) {
+            messageBoxConfirm({
+                message: '确认物流揽件?',
+                fetch: () => proxy.$http.post('/order/orderInfo/adminPickup', {
+                    orderIds: [row.orderId]
+                })
+            });
+        },
+        //取消拦截退出
+        cancelInterception(row) {
+            messageBoxConfirm({
+                message: '确认取消拦截?',
+                fetch: () => proxy.$http.post(`/order/orderInfo/interceptBack/${row.orderId}`)
+            });
+        }
+    };
+} 

+ 121 - 147
src/views/recycleLogistics/abnormalSign/index.vue

@@ -1,168 +1,142 @@
 <template>
-  <order-page ref="pageRef" :pageConfig="pageConfig">
-    <template #toolbar>
-      <el-radio-group @change="handleStatusChange" v-model="useStatus">
-        <el-radio-button label="待处理订单" value="1" />
-        <el-radio-button label="历史异常签收" value="2" />
-      </el-radio-group>
-    </template>
+    <order-page ref="pageRef" :pageConfig="pageConfig">
+        <template #toolbar>
+            <el-radio-group @change="handleStatusChange" v-model="useStatus">
+                <el-radio-button label="待处理订单" value="1" />
+                <el-radio-button label="历史异常签收" value="2" />
+            </el-radio-group>
+        </template>
 
-    <template #action="{ row }">
-      <div>
-        <el-button
-          type="primary"
-          link
-          v-permission="'recycleLogistics:abnormalSign:agree'"
-          @click="toOrderDetail(row)"
-        >
-          [同意]
-        </el-button>
-        <el-button
-          type="danger"
-          link
-          v-permission="'recycleLogistics:abnormalSign:reject'"
-          @click="toOrderDetail(row)"
-        >
-          [驳回]
-        </el-button>
-        <el-button
-          type="success"
-          link
-          v-permission="'recycleLogistics:abnormalSign:detail'"
-          @click="toOrderDetail(row)"
-        >
-          [订单详情]
-        </el-button>
-        <el-button
-          type="warning"
-          link
-          v-permission="'recycleLogistics:abnormalSign:log'"
-          @click="openOrderLog(row)"
-        >
-          [订单日志]
-        </el-button>
-        <el-button
-          type="danger"
-          link
-          v-permission="'recycleLogistics:abnormalSign:cancel'"
-          @click="cancelOrder(row)"
-        >
-          [取消订单]
-        </el-button>
-        <el-button
-          type="primary"
-          link
-          v-permission="'recycleLogistics:abnormalSign:fallback'"
-          @click="fallbackOrder(row)"
-        >
-          [回退状态]
-        </el-button>
-        <el-button
-          type="success"
-          link
-          v-permission="'recycleLogistics:abnormalSign:receive'"
-          @click="handleReceive(row)"
-        >
-          [物流签收]
-        </el-button>
-        <el-button
-          type="warning"
-          link
-          v-permission="'recycleLogistics:abnormalSign:userTag'"
-          @click="openEditUserTag(row)"
-        >
-          [用户标签]
-        </el-button>
-        <el-button
-          type="danger"
-          link
-          v-permission="'recycleLogistics:abnormalSign:interception'"
-          @click="applyForInterception(row)"
-        >
-          [申请拦截退回]
-        </el-button>
-      </div>
-    </template>
+        <template #action="{ row }">
+            <div>
+                <el-button type="primary" link v-permission="'recycleLogistics:abnormalSign:agree'"
+                    @click="handleAgree(row)">
+                    [同意]
+                </el-button>
+                <el-button type="danger" link v-permission="'recycleLogistics:abnormalSign:reject'"
+                    @click="handleReject(row)">
+                    [驳回]
+                </el-button>
+                <el-button type="success" link v-permission="'recycleLogistics:abnormalSign:detail'"
+                    @click="toOrderDetail(row)">
+                    [订单详情]
+                </el-button>
+                <el-button type="warning" link v-permission="'recycleLogistics:abnormalSign:log'"
+                    @click="openOrderLog(row)">
+                    [订单日志]
+                </el-button>
+                <el-button type="danger" link v-permission="'recycleLogistics:abnormalSign:cancel'"
+                    @click="handleCancelOrder(row)">
+                    [取消订单]
+                </el-button>
+                <el-button type="primary" link v-permission="'recycleLogistics:abnormalSign:fallback'"
+                    @click="fallbackOrder(row)">
+                    [回退状态]
+                </el-button>
+                <el-button type="success" link v-permission="'recycleLogistics:abnormalSign:receive'"
+                    @click="handleLogisticsSigning(row)">
+                    [物流签收]
+                </el-button>
+                <el-button type="warning" link v-permission="'recycleLogistics:abnormalSign:userTag'"
+                    @click="openEditUserTag(row)">
+                    [用户标签]
+                </el-button>
+                <el-button type="danger" link v-permission="'recycleLogistics:abnormalSign:interception'"
+                    @click="applyForInterception(row)">
+                    [申请拦截退回]
+                </el-button>
+            </div>
+        </template>
 
-    <order-log ref="orderLogRef" />
-    <userBindTag ref="userTagRef" />
-  </order-page>
+        <component :is="orderLog" ref="orderLogRef" />
+        <component :is="orderDetail" ref="orderDetailRef" @refresh="pageRef.value?.reload()" />
+        <userBindTag ref="userTagRef" />
+    </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/recycleLogistics/components/order-page.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import { useRouter } from 'vue-router';
+import { ref, reactive, getCurrentInstance } from 'vue';
+import { ElMessageBox } from 'element-plus/es';
+import { EleMessage } from 'ele-admin-plus/es';
+import OrderPage from '@/views/recycleLogistics/components/order-page.vue';
+import { useRouter } from 'vue-router';
+import { useOrderOperation } from '@/utils/use-order-operation';
+//用户标签
+import userBindTag from '@/views/recycleOrder/components/user-bind-tag.vue';
 
-  //订单日志
-  import orderLog from '@/views/recycleOrder/components/order-log.vue';
-  //用户标签
-  import userBindTag from '@/views/recycleOrder/components/user-bind-tag.vue';
+defineOptions({ name: 'abnormalSign' });
 
-  defineOptions({ name: 'abnormalSign' });
+let router = useRouter();
+const { proxy } = getCurrentInstance();
+/** 页面组件实例 */
+const pageRef = ref(null);
+//用户标签
+const userTagRef = ref(null);
 
-  let router = useRouter();
-  /** 页面组件实例 */
-  const pageRef = ref(null);
-
-  const useStatus = ref('1');
-  function handleStatusChange() {
+const useStatus = ref('1');
+function handleStatusChange() {
     pageRef.value.reload({ useStatus: useStatus.value });
-  }
+}
 
-  const pageConfig = reactive({
-    pageUrl: '',
-    exportUrl: '',
+const pageConfig = reactive({
+    pageUrl: '/order/orderInfo/exceptionOrderList',
+    exportUrl: '/order/orderInfo/exceptionOrderExport',
     fileName: '路由异常签收',
     cacheKey: 'abnormalSignTable',
     params: { status: '1' }
-  });
-
-  //订单详情
-  function toOrderDetail(row) {
-    router.push({ path: '/recycleOrder/detail', query: { id: row.postId } });
-  }
-
-  //订单日志
-  const orderLogRef = ref(null);
-  function openOrderLog(row) {
-    orderLogRef.value?.handleOpen(row);
-  }
+});
 
-  //用户绑定标签
-  const userTagRef = ref(null);
-  function openEditUserTag(row) {
+//用户绑定标签
+function openEditUserTag(row) {
     userTagRef.value?.handleOpen(row);
-  }
+}
+
+// 同意异常签收
+function handleAgree(row) {
+    ElMessageBox.confirm('确认同意异常签收?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+    }).then(() => {
+        proxy.$http.post(`/order/orderInfo/agreeAbnormalSign/${row.orderId}`).then((res) => {
+            if (res.data.code === 200) {
+                EleMessage.success('操作成功');
+                pageRef.value?.reload();
+            } else {
+                EleMessage.error(res.data.msg);
+            }
+        });
+    });
+}
 
-  function messageBoxConfirm({ message, url, row }) {
-    ElMessageBox.confirm(message, '提示', {
-      confirmButtonText: '确定',
-      cancelButtonText: '关闭',
-      type: 'warning'
+// 驳回异常签收
+function handleReject(row) {
+    ElMessageBox.confirm('确认驳回异常签收?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
     }).then(() => {
-      console.log(row, 'row');
+        proxy.$http.post(`/order/orderInfo/rejectAbnormalSign/${row.orderId}`).then((res) => {
+            if (res.data.code === 200) {
+                EleMessage.success('操作成功');
+                pageRef.value?.reload();
+            } else {
+                EleMessage.error(res.data.msg);
+            }
+        });
     });
-  }
+}
 
-  //取消订单
-  function cancelOrder(row) {
-    messageBoxConfirm({ message: '确认取消?', url: '', row });
-  }
-  //回退状态
-  function fallbackOrder(row) {
-    messageBoxConfirm({ message: '确认回退状态?', url: '', row });
-  }
-  //物流签收
-  function handleReceive(row) {
-    messageBoxConfirm({ message: '确认签收?', url: '', row });
-  }
-  //申请拦截退回
-  function applyForInterception(row) {
-    messageBoxConfirm({ message: '确认申请拦截退回?', url: '', row });
-  }
+const { 
+    handleCancelOrder, 
+    applyForInterception, 
+    handleLogisticsSigning, 
+    fallbackOrder,
+    toOrderDetail,
+    openOrderLog,
+    orderLogRef,
+    orderDetailRef,
+    orderLog,
+    orderDetail
+} = useOrderOperation(pageRef);
 </script>

+ 199 - 218
src/views/recycleLogistics/components/order-page.vue

@@ -1,284 +1,265 @@
 <template>
-  <ele-page flex-table>
-    <!-- 搜索表单 -->
-    <order-search @search="reload" />
-    <ele-card :body-style="{ paddingTop: '8px' }" flex-table>
-      <!-- 表格 -->
-      <ele-pro-table
-        ref="tableRef"
-        row-key="postId"
-        :columns="columns"
-        :datasource="datasource"
-        :show-overflow-tooltip="true"
-        v-model:selections="selections"
-        highlight-current-row
-        :export-config="{ fileName: pageConfig.fileName }"
-        :cache-key="pageConfig.cacheKey"
-      >
-        <template #toolbar>
-          <slot name="toolbar"></slot>
-        </template>
+    <ele-page flex-table>
+        <!-- 搜索表单 -->
+        <order-search @search="reload" />
+        <ele-card :body-style="{ paddingTop: '8px' }" flex-table>
+            <!-- 表格 -->
+            <ele-pro-table ref="tableRef" row-key="orderId" :columns="columns" :datasource="datasource"
+                :show-overflow-tooltip="true" v-model:selections="selections" highlight-current-row
+                :export-config="{ fileName: pageConfig.fileName }" :cache-key="pageConfig.cacheKey">
+                <template #toolbar>
+                    <slot name="toolbar"></slot>
+                </template>
 
-        <template #status="{ row }">
-          <dict-data
-            code="sys_normal_disable"
-            type="tag"
-            :model-value="row.status"
-          />
-        </template>
-        <template #orderNumber="{ row }">
-          <order-number :row="row"></order-number>
-        </template>
-        <template #customer="{ row }">
-          <order-customer :row="row"></order-customer>
-        </template>
-        <template #amount="{ row }">
-          <order-amount :row="row"></order-amount>
-        </template>
-        <template #time="{ row }">
-          <order-time :row="row"></order-time>
-        </template>
-        <template #sender="{ row }">
-          <div class="common-text">
-            <el-text>推送人:</el-text>
-            <el-text>周武泰</el-text>
-          </div>
-          <div class="common-text">
-            <el-text>推送时间:</el-text>
-            <el-text>2024-11-21 10:24:56 </el-text>
-          </div>
-        </template>
-        <template #dealer="{ row }">
-          <div class="common-text">
-            <el-text>处理人:</el-text>
-            <el-text>周武泰</el-text>
-          </div>
-          <div class="common-text">
-            <el-text>处理时间:</el-text>
-            <el-text>2024-11-21 10:24:56 </el-text>
-          </div>
-        </template>
-        <template #remarks="{ row }">
-          <el-popover trigger="hover" width="240px">
-            <template #reference>
-              <el-button
-                :icon="Flag"
-                link
-                style="font-size: 20px"
-                @click="handleRemarks(row)"
-              >
-              </el-button>
-            </template>
-            <orderTimeline
-              :records="activities"
-              title="备注历史记录"
-            ></orderTimeline>
-          </el-popover>
-        </template>
+                <template #status="{ row }">
+                    <dict-data code="order_status" type="tag" :model-value="row.status" />
+                </template>
+                <template #orderNumber="{ row }">
+                    <order-number :row="row"></order-number>
+                </template>
+                <template #customer="{ row }">
+                    <order-customer :row="row"></order-customer>
+                </template>
+                <template #amount="{ row }">
+                    <order-amount :row="row"></order-amount>
+                </template>
+                <template #time="{ row }">
+                    <order-time :row="row"></order-time>
+                </template>
+                <template #sender="{ row }">
+                    <div class="common-text">
+                        <el-text>推送人:</el-text>
+                        <el-text>周武泰</el-text>
+                    </div>
+                    <div class="common-text">
+                        <el-text>推送时间:</el-text>
+                        <el-text>2024-11-21 10:24:56 </el-text>
+                    </div>
+                </template>
+                <template #dealer="{ row }">
+                    <div class="common-text">
+                        <el-text>处理人:</el-text>
+                        <el-text>周武泰</el-text>
+                    </div>
+                    <div class="common-text">
+                        <el-text>处理时间:</el-text>
+                        <el-text>2024-11-21 10:24:56 </el-text>
+                    </div>
+                </template>
+                <template #remarks="{ row }">
+                    <el-popover trigger="hover" width="240px">
+                        <template #reference>
+                            <el-button :icon="Flag" link style="font-size: 20px" @click="handleRemarks(row)">
+                            </el-button>
+                        </template>
+                        <orderTimeline :records="activities" title="备注历史记录"></orderTimeline>
+                    </el-popover>
+                </template>
 
-        <template #action="{ row }">
-          <slot name="action" :row="row"></slot>
-        </template>
-      </ele-pro-table>
-    </ele-card>
+                <template #action="{ row }">
+                    <slot name="action" :row="row"></slot>
+                </template>
+            </ele-pro-table>
+        </ele-card>
 
-    <slot></slot>
-    <orderRemarks ref="remarksRef" />
-  </ele-page>
+        <slot></slot>
+        <orderRemarks ref="remarksRef" />
+    </ele-page>
 </template>
 
 <script setup>
-  import { ref, getCurrentInstance } from 'vue';
-  import { ElMessageBox } from 'element-plus/es';
-  import { EleMessage } from 'ele-admin-plus/es';
-  import { DownloadOutlined } from '@/components/icons';
-  import { Flag, ChatDotSquare } from '@element-plus/icons-vue';
-  import OrderSearch from './order-search.vue';
-  import OrderNumber from '@/views/recycleOrder/components/order-number.vue';
-  import OrderCustomer from '@/views/recycleOrder/components/order-customer.vue';
-  import OrderAmount from '@/views/recycleOrder/components/order-amount.vue';
-  import OrderTime from '@/views/recycleOrder/components/order-time.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import { download, toFormData, checkDownloadRes } from '@/utils/common';
-  import orderRemarks from '@/views/recycleOrder/components/order-remarks.vue';
-  import orderTimeline from '@/views/recycleOrder/components/order-timeline.vue';
+import { ref, getCurrentInstance } from 'vue';
+import { ElMessageBox } from 'element-plus/es';
+import { EleMessage } from 'ele-admin-plus/es';
+import { DownloadOutlined } from '@/components/icons';
+import { Flag, ChatDotSquare } from '@element-plus/icons-vue';
+import OrderSearch from './order-search.vue';
+import OrderNumber from '@/views/recycleOrder/components/order-number.vue';
+import OrderCustomer from '@/views/recycleOrder/components/order-customer.vue';
+import OrderAmount from '@/views/recycleOrder/components/order-amount.vue';
+import OrderTime from '@/views/recycleOrder/components/order-time.vue';
+import { useDictData } from '@/utils/use-dict-data';
+import { download, toFormData, checkDownloadRes } from '@/utils/common';
+import orderRemarks from '@/views/recycleOrder/components/order-remarks.vue';
+import orderTimeline from '@/views/recycleOrder/components/order-timeline.vue';
 
-  let props = defineProps({
+let props = defineProps({
     pageConfig: {
-      type: Object,
-      default: () => ({
-        cacheKey: 'recycleOrderTable',
-        fileName: '回收订单查询'
-      })
+        type: Object,
+        default: () => ({
+            cacheKey: 'abnormalSignTable',
+            fileName: '异常订单查询'
+        })
     },
-    pageUrl: { type: String, default: '/system/post/list' },
-    exportUrl: { type: String, default: '/system/post/export' }
-  });
-  let { proxy } = getCurrentInstance();
-  /** 字典数据 */
-  const [statusDicts] = useDictData(['sys_normal_disable']);
+    pageUrl: { type: String, default: '/order/orderInfo/exceptionOrderList' },
+    exportUrl: { type: String, default: '/order/orderInfo/exceptionOrderExport' }
+});
+let { proxy } = getCurrentInstance();
+/** 字典数据 */
+const [statusDicts] = useDictData(['sys_normal_disable']);
 
-  /** 表格实例 */
-  const tableRef = ref(null);
+/** 表格实例 */
+const tableRef = ref(null);
 
-  /** 表格列配置 */
-  const columns = ref([
+/** 表格列配置 */
+const columns = ref([
     {
-      type: 'selection',
-      columnKey: 'selection',
-      width: 50,
-      align: 'center',
-      fixed: 'left'
+        type: 'selection',
+        columnKey: 'selection',
+        width: 50,
+        align: 'center',
+        fixed: 'left'
     },
-    { label: '单号', prop: 'orderNumber', slot: 'orderNumber', minWidth: 180 },
+    { label: '单号', prop: 'orderNumber', slot: 'orderNumber', minWidth: 240 },
     { label: '客户', prop: 'customer', slot: 'customer', minWidth: 360 },
     { label: '信息', prop: 'amount', slot: 'amount', minWidth: 160 },
     {
-      label: '状态',
-      prop: 'status',
-      slot: 'status',
-      formatter: (row) =>
-        statusDicts.value.find((d) => d.dictValue == row.status)?.dictLabel
+        label: '状态',
+        prop: 'status',
+        slot: 'status',
+        minWidth: 140,
+        formatter: (row) =>
+            statusDicts.value.find((d) => d.dictValue == row.status)?.dictLabel
     },
+    { label: '时间', prop: 'time', slot: 'time', minWidth: 220 },
     { label: '推送人', prop: 'sender', slot: 'sender', minWidth: 170 },
     { label: '处理人', prop: 'dealer', slot: 'dealer', minWidth: 170 },
     {
-      label: '处理结果',
-      prop: 'status',
-      slot: 'status',
-      formatter: (row) =>
-        statusDicts.value.find((d) => d.dictValue == row.status)?.dictLabel
+        label: '处理结果',
+        prop: 'status',
+        slot: 'status',
+        formatter: (row) =>
+            statusDicts.value.find((d) => d.dictValue == row.status)?.dictLabel
     },
-    { label: '时间', prop: 'time', slot: 'time', minWidth: 200 },
     { label: '处理备注', prop: 'remarks', slot: 'remarks' },
     {
-      columnKey: 'action',
-      label: '操作',
-      width: 180,
-      align: 'center',
-      slot: 'action',
-      fixed: 'right',
+        columnKey: 'action',
+        label: '操作',
+        width: 180,
+        align: 'center',
+        slot: 'action',
+        fixed: 'right',
     }
-  ]);
+]);
 
-  /** 表格选中数据 */
-  const selections = ref([]);
+/** 表格选中数据 */
+const selections = ref([]);
 
-  /** 当前编辑数据 */
-  const current = ref(null);
+/** 当前编辑数据 */
+const current = ref(null);
 
-  /** 是否显示编辑弹窗 */
-  const showEdit = ref(false);
+/** 是否显示编辑弹窗 */
+const showEdit = ref(false);
 
-  async function queryPage(params) {
+async function queryPage(params) {
     const res = await proxy.$http.get(props.pageUrl, { params });
     if (res.data.code === 200) {
-      return res.data;
+        return res.data;
     }
     return Promise.reject(new Error(res.data.msg));
-  }
+}
 
-  /** 表格数据源 */
-  const datasource = ({ pages, where, orders }) => {
+/** 表格数据源 */
+const datasource = ({ pages, where, orders }) => {
     return queryPage({ ...where, ...orders, ...pages });
-  };
+};
 
-  /** 搜索 */
-  const reload = (where) => {
+/** 搜索 */
+const reload = (where) => {
     tableRef.value?.reload?.({ page: 1, where });
-  };
+};
 
-  /** 批量操作 */
-  const operatBatch = ({ row, url, title }) => {
+/** 批量操作 */
+const operatBatch = ({ row, url, title }) => {
     const rows = row == null ? selections.value : [row];
     if (!rows.length) {
-      EleMessage.error('请至少选择一条数据');
-      return;
+        EleMessage.error('请至少选择一条数据');
+        return;
     }
     title = title || '是否确认当前操作?';
     ElMessageBox.confirm(title, '提示', {
-      type: 'warning',
-      draggable: true
+        type: 'warning',
+        draggable: true
     })
-      .then(() => {
-        const loading = EleMessage.loading({
-          message: '请求中..',
-          plain: true
-        });
+        .then(() => {
+            const loading = EleMessage.loading({
+                message: '请求中..',
+                plain: true
+            });
 
-        proxy.$http
-          .delete(url)
-          .then(() => {
-            loading.close();
-            EleMessage.success('操作成功');
-            reload();
-          })
-          .catch((e) => {
-            loading.close();
-            EleMessage.error(e.message);
-          });
-      })
-      .catch(() => {});
-  };
+            proxy.$http
+                .delete(url)
+                .then(() => {
+                    loading.close();
+                    EleMessage.success('操作成功');
+                    reload();
+                })
+                .catch((e) => {
+                    loading.close();
+                    EleMessage.error(e.message);
+                });
+        })
+        .catch(() => { });
+};
 
-  /// 导出数据
-  async function exportPage(params, name) {
+/// 导出数据
+async function exportPage(params, name) {
     const res = await proxy.$http({
-      url: props.exportUrl,
-      method: 'POST',
-      data: toFormData(params),
-      responseType: 'blob'
+        url: props.exportUrl,
+        method: 'POST',
+        data: toFormData(params),
+        responseType: 'blob'
     });
     await checkDownloadRes(res);
     download(
-      res.data,
-      name ? `${name}_${Date.now()}.xlsx` : `post_${Date.now()}.xlsx`
+        res.data,
+        name ? `${name}_${Date.now()}.xlsx` : `post_${Date.now()}.xlsx`
     );
-  }
+}
 
-  /** 导出数据 */
-  const exportData = (name) => {
+/** 导出数据 */
+const exportData = (name) => {
     const loading = EleMessage.loading({
-      message: '请求中..',
-      plain: true
+        message: '请求中..',
+        plain: true
     });
     tableRef.value?.fetch?.(({ where, orders }) => {
-      exportPage({ ...where, ...orders }, name)
-        .then(() => {
-          loading.close();
-        })
-        .catch((e) => {
-          loading.close();
-          EleMessage.error(e.message);
-        });
+        exportPage({ ...where, ...orders }, name)
+            .then(() => {
+                loading.close();
+            })
+            .catch((e) => {
+                loading.close();
+                EleMessage.error(e.message);
+            });
     });
-  };
+};
 
-  //修改备注
-  const remarksRef = ref(null);
-  function handleRemarks(row) {
+//修改备注
+const remarksRef = ref(null);
+function handleRemarks(row) {
     remarksRef.value?.handleOpen(row);
-  }
-  const activities = [
+}
+const activities = [
     {
-      content: 'Event start',
-      timestamp: '2018-04-15',
-      color: '#0bbd87',
-      icon: ChatDotSquare
+        content: 'Event start',
+        timestamp: '2018-04-15',
+        color: '#0bbd87',
+        icon: ChatDotSquare
     },
     {
-      content: 'Approved',
-      timestamp: '2018-04-13',
-      color: '#0bbd87',
-      icon: ChatDotSquare
+        content: 'Approved',
+        timestamp: '2018-04-13',
+        color: '#0bbd87',
+        icon: ChatDotSquare
     },
     {
-      content: 'Success',
-      timestamp: '2018-04-11',
-      color: '#0bbd87',
-      icon: ChatDotSquare
+        content: 'Success',
+        timestamp: '2018-04-11',
+        color: '#0bbd87',
+        icon: ChatDotSquare
     }
-  ];
+];
 
-  defineExpose({ reload, exportData, operatBatch });
+defineExpose({ reload, exportData, operatBatch });
 </script>

+ 0 - 2
src/views/recycleOrder/components/first-check-modal.vue

@@ -18,13 +18,11 @@ const formItems = computed(() => {
             label: '快递',
             prop: 'finalExpress',
             props: { code: 'final_express' },
-            required: true
         },
         {
             type: 'select',
             label: '收货仓库',
             prop: 'godownId',
-            required: true,
             options: godownList.value
                 .filter((v) => v.useStatus == 1)
                 .map((d) => {

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

@@ -137,7 +137,7 @@
         <!-- 备注 -->
         <orderRemarks ref="remarksRef" />
         <!-- 初审 -->
-        <firstCheckModal ref="firstCheckRef" />
+        <firstCheckModal ref="firstCheckRef" @success="reload()" />
         <!-- 修改地址 -->
         <modifyAddress ref="modifyAddressRef" />
         <!-- 订单日志 -->