浏览代码

fix 8-12优化 bug

ylong 4 月之前
父节点
当前提交
0b5f24f383

+ 2 - 0
src/utils/common.js

@@ -1,5 +1,6 @@
 import { removeToken } from '@/utils/token-util';
 import axios from 'axios';
+import { ElMessage } from 'element-plus';
 
 export async function downloadOssLink(url, name) {
     const res = await axios.get(url, {
@@ -150,6 +151,7 @@ export function isBlobFile(obj) {
 export async function checkDownloadRes(res) {
     if (res.headers['content-type'].startsWith('application/json')) {
         const json = await res.data.text();
+        ElMessage.error(JSON.parse(json).msg || '系统未知错误,请反馈给管理员');
         return Promise.reject(
             new Error(JSON.parse(json).msg || '系统未知错误,请反馈给管理员')
         );

+ 6 - 0
src/utils/request.js

@@ -38,11 +38,17 @@ service.interceptors.request.use(
     }
 );
 
+
+
 /**
  * 添加响应拦截器
  */
 service.interceptors.response.use(
     (res) => {
+        if (res.config.responseType === 'blob') {
+            return res;
+        }
+
         // 登录过期处理
         if (res.data?.code === 401) {
             const { path, fullPath } = unref(router.currentRoute);

+ 1 - 1
src/views/data/books/components/book-import-log.vue

@@ -4,7 +4,7 @@
         form
         :width="1160"
         v-model="visible"
-        title="导记录"
+        title="导记录"
         @open="handleOpen"
     >
         <common-table

+ 189 - 213
src/views/data/books/components/books-edit.vue

@@ -1,242 +1,218 @@
 <!-- 搜索表单 -->
 <template>
-    <simple-form-modal
-        :title="title"
-        :items="formItems"
-        ref="editRef"
-        :baseUrl="baseUrl"
-        width="1080px"
-        :formProps="{ grid: 8 }"
-        :formatData="formatData"
-        :fallbackData="fallbackData"
-        labelWidth="120px"
-        @success="(data) => emit('success', data)"
-        :body-style="{ overflow: 'auto' }"
-    >
+    <simple-form-modal :title="title" :items="formItems" ref="editRef" :baseUrl="baseUrl" width="1080px"
+        :formProps="{ grid: 8 }" :formatData="formatData" :fallbackData="fallbackData" labelWidth="120px"
+        @success="(data) => emit('success', data)" :body-style="{ overflow: 'auto' }">
         <template #other>
             <div class="image-pos" id="image-pos">
-                <image-upload
-                    :limit="1"
-                    v-model="formData.cover"
-                    :item-style="{ width: '260px', height: '320px', margin: 0 }"
-                    :button-style="{
+                <image-upload :limit="1" v-model="formData.cover"
+                    :item-style="{ width: '260px', height: '320px', margin: 0 }" :button-style="{
                         width: '260px',
                         height: '320px',
                         margin: 0
-                    }"
-                />
+                    }" />
             </div>
         </template>
     </simple-form-modal>
 </template>
 
 <script setup>
-    import {
-        reactive,
-        ref,
-        defineEmits,
-        getCurrentInstance,
-        nextTick
-    } from 'vue';
-    import { useFormData } from '@/utils/use-form-data';
-    import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
-    import ImageUpload from '@/components/ImageUpload/index.vue';
-    const { proxy } = getCurrentInstance();
+import {
+    reactive,
+    ref,
+    defineEmits,
+    getCurrentInstance,
+    nextTick
+} from 'vue';
+import { useFormData } from '@/utils/use-form-data';
+import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
+import ImageUpload from '@/components/ImageUpload/index.vue';
+const { proxy } = getCurrentInstance();
 
-    //获取省市
-    const provinceList = ref([]);
-    const cityList = ref([]);
-    const title = ref('新增图书');
-    const emit = defineEmits(['success']);
+//获取省市
+const provinceList = ref([]);
+const cityList = ref([]);
+const title = ref('新增图书');
+const emit = defineEmits(['success']);
 
-    let colProps = { style: { marginRight: '15px' } };
+let colProps = { style: { marginRight: '15px' } };
 
-    const formItems = reactive([
-        { type: 'input', label: '书名', prop: 'bookName', required: true },
-        {
-            type: 'input',
-            label: 'ISBN',
-            prop: 'isbn',
-            required: true,
-            colProps
+const formItems = reactive([
+    { type: 'input', label: '书名', prop: 'bookName', required: true },
+    {
+        type: 'input',
+        label: 'ISBN',
+        prop: 'isbn',
+        required: true,
+        colProps
+    },
+    // { type: 'imageUpload', label: '封面', prop: 'cover', props: { limit: 1 } },
+    { type: 'input', label: '作者', prop: 'author', required: true },
+    {
+        type: 'input',
+        label: '定价',
+        prop: 'price',
+        required: true,
+        colProps
+    },
+    { type: 'input', label: '出版社', prop: 'publish', required: true },
+    {
+        type: 'date',
+        label: '出版时间',
+        prop: 'pubDate',
+        required: true,
+        props: {
+            format: 'YYYY-MM-DD',
+            valueFormat: 'YYYY-MM-DD'
         },
-        // { type: 'imageUpload', label: '封面', prop: 'cover', props: { limit: 1 } },
-        { type: 'input', label: '作者', prop: 'author', required: true },
-        {
-            type: 'input',
-            label: '定价',
-            prop: 'price',
-            required: true,
-            colProps
-        },
-        { type: 'input', label: '出版社', prop: 'publish', required: true },
-        {
-            type: 'date',
-            label: '出版时间',
-            prop: 'pubDate',
-            required: true,
-            props: {
-                format: 'YYYY-MM-DD',
-                valueFormat: 'YYYY-MM-DD'
-            },
-            colProps
-        },
-        {
-            type: 'dictSelect',
-            label: '分类标签',
-            prop: 'bookTag',
-            props: { code: 'book_tag' }
-        },
-        { type: 'input', label: '中图法分类', prop: 'chineCateNo', colProps },
-        { type: 'input', label: '丛书提名', prop: 'bookPut' },
-        { type: 'input', label: '其他提名', prop: 'otherPut', colProps },
-        { type: 'input', label: '主题', prop: 'bookTopic' },
-        { type: 'input', label: '语种', prop: 'lang', colProps },
-        { type: 'input', label: '开本尺寸', prop: 'bookFormat' },
-        { type: 'input', label: '装帧', prop: 'bookPack', colProps },
-        { type: 'input', label: '翻译人', prop: 'translator' },
-        {
-            type: 'dictSelect',
-            label: '是否套装',
-            prop: 'suit',
-            props: { code: 'is_common_yes' }
-        },
-        { type: 'input', label: '中图法分类名称', prop: 'chineCateName' },
-        { type: 'input', label: '总页数', prop: 'pageTotal' },
-        {
-            type: 'dictSelect',
-            label: '人工核实',
-            prop: 'perCheck',
-            props: { code: 'is_common_yes' }
-        },
-        { type: 'input', label: '字数', prop: 'worldCount' },
-        { type: 'input', label: '出版地', prop: 'putAddress' },
-        { type: 'input', label: '读者对象', prop: 'readers' },
-        { type: 'input', label: '版本', prop: 'bookVersion' },
-        { type: 'input', label: '印刷厂', prop: 'printHouse' },
-        {
-            type: 'date',
-            label: '印刷时间',
-            prop: 'printTime',
-            props: {
-                format: 'YYYY-MM-DD',
-                valueFormat: 'YYYY-MM-DD'
-            }
-        },
-        { type: 'input', label: '印刷数量', prop: 'printNum' },
-        {
-            type: 'textarea',
-            label: '图书短评',
-            prop: 'shortReview',
-            colProps: { span: 24 }
-        },
-        {
-            type: 'editor',
-            label: '书嗨推荐',
-            prop: 'shuhiRecommend',
-            colProps: { span: 24 }
-        },
-        {
-            type: 'editor',
-            label: '书嗨摘要',
-            prop: 'shuhiBlurb',
-            colProps: { span: 24 }
-        },
-        {
-            type: 'editor',
-            label: '内容简介',
-            prop: 'contentBlurb',
-            colProps: { span: 24 }
-        },
-        {
-            type: 'editor',
-            label: '作者简介',
-            prop: 'anthorBlurb',
-            colProps: { span: 24 }
-        },
-        {
-            type: 'editor',
-            label: '图书目录',
-            prop: 'catalog',
-            colProps: { span: 24 }
+        colProps
+    },
+    {
+        type: 'dictSelect',
+        label: '分类标签',
+        prop: 'bookTag',
+        props: { code: 'book_tag' }
+    },
+    { type: 'input', label: '中图法分类', prop: 'chineCateNo', colProps },
+    { type: 'input', label: '丛书提名', prop: 'bookPut' },
+    { type: 'input', label: '其他提名', prop: 'otherPut', colProps },
+    { type: 'input', label: '主题', prop: 'bookTopic' },
+    { type: 'input', label: '语种', prop: 'lang', colProps },
+    { type: 'input', label: '开本尺寸', prop: 'bookFormat' },
+    { type: 'input', label: '装帧', prop: 'bookPack', colProps },
+    { type: 'input', label: '翻译人', prop: 'translator' },
+    {
+        type: 'dictSelect',
+        label: '是否套装',
+        prop: 'suit',
+        props: { code: 'is_common_yes' }
+    },
+    { type: 'input', label: '中图法分类名称', prop: 'chineCateName' },
+    { type: 'input', label: '总页数', prop: 'pageTotal' },
+    {
+        type: 'dictSelect',
+        label: '人工核实',
+        prop: 'perCheck',
+        props: { code: 'is_common_yes' }
+    },
+    { type: 'input', label: '字数', prop: 'worldCount' },
+    { type: 'input', label: '出版地', prop: 'putAddress' },
+    { type: 'input', label: '读者对象', prop: 'readers' },
+    { type: 'input', label: '版本', prop: 'bookVersion' },
+    { type: 'input', label: '印刷厂', prop: 'printHouse' },
+    {
+        type: 'date',
+        label: '印刷时间',
+        prop: 'printTime',
+        props: {
+            format: 'YYYY-MM-DD',
+            valueFormat: 'YYYY-MM-DD'
         }
-    ]);
-    //默认值
-    const baseUrl = reactive({
-        add: '/book/bookInfo/save',
-        update: '/book/bookInfo/update',
-        detail: '/book/bookInfo/getDetail'
-    });
-    const formData = ref({ perCheck: '1', suit: '0', bookTag: '1' });
-    const editRef = ref(null);
+    },
+    { type: 'input', label: '印刷数量', prop: 'printNum' },
+    {
+        type: 'textarea',
+        label: '图书短评',
+        prop: 'shortReview',
+        colProps: { span: 24 }
+    },
+    {
+        type: 'editor',
+        label: '书嗨推荐',
+        prop: 'shuhiRecommend',
+        colProps: { span: 24 }
+    },
+    {
+        type: 'editor',
+        label: '书嗨摘要',
+        prop: 'shuhiBlurb',
+        colProps: { span: 24 }
+    },
+    {
+        type: 'editor',
+        label: '内容简介',
+        prop: 'contentBlurb',
+        colProps: { span: 24 }
+    },
+    {
+        type: 'editor',
+        label: '作者简介',
+        prop: 'anthorBlurb',
+        colProps: { span: 24 }
+    },
+    {
+        type: 'editor',
+        label: '图书目录',
+        prop: 'catalog',
+        colProps: { span: 24 }
+    }
+]);
+//默认值
+const baseUrl = reactive({
+    add: '/book/bookInfo/save',
+    update: '/book/bookInfo/update',
+    detail: '/book/bookInfo/getDetail'
+});
+const formData = ref({});
+const editRef = ref(null);
 
-    function handleOpen(data = {}) {
-        title.value = data && data.id ? '编辑图书' : '新增图书';
-        // Reset formData to default values if adding a new book
-        if (!data || !data.id) {
-            formData.value = {
-                perCheck: '1',
-                suit: '0',
-                bookTag: '1',
-                cover: ''
-            };
-        } else {
-            formData.value = Object.assign(
-                {},
-                { perCheck: '1', suit: '0', bookTag: '1' },
-                data
-            );
-        }
-        console.log(formData.value, 'formData.value');
-        editRef.value?.handleOpen(formData.value);
+function handleOpen(data = {}) {
+    title.value = data && data.id ? '编辑图书' : '新增图书';
+    // Reset formData to default values if adding a new book
+    if (!data || !data.id) {
+        formData.value = {};
+    } else {
+        formData.value = Object.assign({}, data);
     }
+    editRef.value?.handleOpen(formData.value);
+}
 
-    //格式化数据
-    function formatData(data) {
-        let values = JSON.parse(JSON.stringify(data));
-        let bookBlurb = {
-            isbn: data.isbn,
-            shuhiRecommend: data.shuhiRecommend,
-            shuhiBlurb: data.shuhiBlurb,
-            contentBlurb: data.contentBlurb,
-            anthorBlurb: data.anthorBlurb,
-            catalog: data.catalog
-        };
+//格式化数据
+function formatData(data) {
+    let values = JSON.parse(JSON.stringify(data));
+    let bookBlurb = {
+        isbn: data.isbn,
+        shuhiRecommend: data.shuhiRecommend,
+        shuhiBlurb: data.shuhiBlurb,
+        contentBlurb: data.contentBlurb,
+        anthorBlurb: data.anthorBlurb,
+        catalog: data.catalog
+    };
 
-        // Only include bookId if it exists (editing mode)
-        if (data.id) {
-            bookBlurb.bookId = data.id;
-        }
-
-        values.bookBlurb = bookBlurb;
-        values.cover = formData.value.cover;
-        return values;
+    // Only include bookId if it exists (editing mode)
+    if (data.id) {
+        bookBlurb.bookId = data.id;
     }
 
-    //回填数据
-    function fallbackData(data) {
-        let values = JSON.parse(JSON.stringify(data));
-        if (data.bookBlurb) {
-            values.shuhiRecommend = data.bookBlurb.shuhiRecommend;
-            values.shuhiBlurb = data.bookBlurb.shuhiBlurb;
-            values.contentBlurb = data.bookBlurb.contentBlurb;
-            values.anthorBlurb = data.bookBlurb.anthorBlurb;
-            values.catalog = data.bookBlurb.catalog;
-        }
-        formData.value.cover = data.cover;
-        values.perCheck = data.perCheck == 1 ? '1' : '0';
-        values.suit = data.suit == 1 ? '1' : '0';
-        values.bookTag = data.bookTag == 1 ? '1' : '0';
-        return values;
+    values.bookBlurb = bookBlurb;
+    values.cover = formData.value.cover;
+    return values;
+}
+
+//回填数据
+function fallbackData(data) {
+    let values = JSON.parse(JSON.stringify(data));
+    if (data.bookBlurb) {
+        values.shuhiRecommend = data.bookBlurb.shuhiRecommend;
+        values.shuhiBlurb = data.bookBlurb.shuhiBlurb;
+        values.contentBlurb = data.bookBlurb.contentBlurb;
+        values.anthorBlurb = data.bookBlurb.anthorBlurb;
+        values.catalog = data.bookBlurb.catalog;
     }
+    formData.value.cover = data.cover;
+    values.perCheck = String(data.perCheck)
+    values.suit = String(data.suit)
+    values.bookTag = String(data.bookTag);
+    return values;
+}
 
-    defineExpose({ handleOpen });
+defineExpose({ handleOpen });
 </script>
 <style lang="scss">
-    .image-pos {
-        position: absolute;
-        right: 40px;
-        top: 16px;
-        z-index: 10;
-    }
+.image-pos {
+    position: absolute;
+    right: 40px;
+    top: 16px;
+    z-index: 10;
+}
 </style>

+ 6 - 0
src/views/data/productPush/components/page-search.vue

@@ -81,6 +81,9 @@
                             createTimeRange: initKeys.createTimeRange
                         });
                     }
+                },
+                colProps: {
+                    span: 8
                 }
             },
             {
@@ -102,6 +105,9 @@
                             pushTimeRange: initKeys.pushTimeRange
                         });
                     }
+                },
+                colProps: {
+                    span: 8
                 }
             }
         ];

+ 4 - 4
src/views/recycle/independentParameter/index.vue

@@ -248,7 +248,7 @@
             label: '回收价格',
             prop: 'recyclePrice',
             sortable: true,
-            columnKey: 'recyclePrice',
+            columnKey: '5',
             minWidth: 100
         },
         {
@@ -256,20 +256,20 @@
             minWidth: 120,
             prop: 'recycleMax',
             sortable: true,
-            columnKey: 'recycleMax'
+            columnKey: '6'
         },
         {
             label: '当前剩余回收量',
             minWidth: 140,
             prop: 'restRecycleNum',
             sortable: true,
-            columnKey: 'restRecycleNum'
+            columnKey: '7'
         },
         {
             label: '销量',
             prop: 'salesNum',
             sortable: true,
-            columnKey: 'salesNum'
+            columnKey: '8'
         },
         {
             label: '查看',

+ 9 - 1
src/views/recycle/pending/index.vue

@@ -175,9 +175,17 @@
 
     //一键检测
     function handleOneDetection() {
+        //需要 ids 传参, 需要获取当前表格的选中项
+        const selections = pageRef.value?.getSelections();
+        if (selections.length === 0) {
+            return ElMessage.warning('请先选中要检测的记录');
+        }
+        const ids = selections.map((item) => item.id);
+
         pageRef.value?.messageBoxConfirm({
             message: '确定要执行一键检测吗?',
-            fetch: () => request.post('/book/bookNoData/unDispose/check')
+            fetch: () =>
+                request.post('/book/bookNoData/unDispose/check', { ids })
         });
     }
 

+ 4 - 4
src/views/recycle/specifiedBooks/index.vue

@@ -254,7 +254,7 @@
             label: '回收价格',
             prop: 'recyclePrice',
             sortable: true,
-            columnKey: 'recyclePrice',
+            columnKey: '5',
             minWidth: 100
         },
         {
@@ -262,20 +262,20 @@
             minWidth: 120,
             prop: 'recycleMax',
             sortable: true,
-            columnKey: 'recycleMax'
+            columnKey: '6'
         },
         {
             label: '当前剩余回收量',
             minWidth: 140,
             prop: 'restRecycleNum',
             sortable: true,
-            columnKey: 'restRecycleNum'
+            columnKey: '7'
         },
         {
             label: '销量',
             prop: 'salesNum',
             sortable: true,
-            columnKey: 'salesNum'
+            columnKey: '8'
         },
         {
             label: '查看',

+ 25 - 7
src/views/recycleOrder/components/audit-screenshot.vue

@@ -1,16 +1,21 @@
 <!-- 编辑弹窗 -->
 <template>
-    <ele-modal :width="560" v-model="visible" title="审核截图">
-        <template v-if="imageList.length">
+    <ele-modal :width="700" v-model="visible" title="审核截图">
+        <div v-if="imageList.length" class="flex flex-row gap-6 flex-wrap">
             <div
                 class="demo-image__preview"
                 v-for="(item, index) in imageList"
                 :key="index"
             >
-                <div class="demo-image__info" style="margin-bottom: 6px">{{
-                    item.remark
-                }}</div>
+                <div class="demo-image__info" style="margin-bottom: 6px">
+                    说明:{{ item.remark || '--' }}
+                </div>
+                <div class="no-pic" v-if="!item.imgInfo.length">
+                    暂无图片
+                </div>
+
                 <el-image
+                    v-else
                     v-for="(url, idx) in item.imgInfo"
                     :key="idx"
                     style="width: 100px; height: 100px; margin-right: 10px"
@@ -19,8 +24,10 @@
                     :initial-index="idx"
                     fit="cover"
                 />
+
+
             </div>
-        </template>
+        </div>
         <el-empty v-else description="暂无审核截图" />
 
         <template #footer>
@@ -47,7 +54,7 @@
         proxy.$http
             .get(`/order/orderInfo/getOrderAnnexList?orderId=${orderId}`)
             .then((res) => {
-                imageList.value = res.data;
+                imageList.value = res.data.data || [];
             });
     }
 
@@ -61,3 +68,14 @@
         handleOpen
     });
 </script>
+<style>
+.no-pic {
+    width: 100px;
+    height: 100px;
+    background-color: #f5f7fa;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+</style>

+ 1 - 1
src/views/recycleOrder/needReturned/components/order-status.vue

@@ -5,7 +5,7 @@
         align-center
         finish-status="success"
     >
-        <el-step v-for="item in stepList" :title="item.label">
+        <el-step v-for="item in stepList" :title="item.label" :key="item.time">
             <template #description>
                 <div>{{ item.time }}</div>
                 <div>{{ item.createdBy }}</div>

+ 208 - 257
src/views/recycleOrder/needReturned/index.vue

@@ -4,23 +4,12 @@
         <return-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: '需退回订单' }"
-                cache-key="needReturnedTable"
-            >
+            <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: '需退回订单' }" cache-key="needReturnedTable">
                 <template #toolbar>
                     <!-- 0-创建(待付款) 1-已付款 2-已推送 3-已发货 4-已签收 5-已完成 6-已取消 7-超时取消 -->
-                    <el-radio-group
-                        v-model="status"
-                        @change="handleStatusChange"
-                    >
+                    <el-radio-group v-model="status" @change="handleStatusChange">
                         <el-radio-button label="全部" value="0" />
                         <el-radio-button label="待发货" value="1" />
                         <el-radio-button label="已发货" value="2" />
@@ -30,24 +19,14 @@
                 </template>
 
                 <template #status="{ row }">
-                    <dict-data
-                        code="refund_status"
-                        type="text"
-                        :model-value="row.status"
-                    />
+                    <dict-data code="refund_status" type="text" :model-value="row.status" />
                 </template>
                 <template #isPush="{ row }">
-                    <el-tag type="success" v-if="row.checkStatus == 1"
-                        >已推送</el-tag
-                    >
+                    <el-tag type="success" v-if="row.checkStatus == 1">已推送</el-tag>
                     <el-tag type="danger" v-else>未推送</el-tag>
                 </template>
                 <template #isFirstOrder="{ row }">
-                    <dict-data
-                        code="is_first_order"
-                        type="tag"
-                        :model-value="row.firstOrder"
-                    />
+                    <dict-data code="is_first_order" type="tag" :model-value="row.firstOrder" />
                 </template>
                 <template #orderNumber="{ row }">
                     <order-number :row="row" isReturn />
@@ -58,84 +37,47 @@
                 <template #amount="{ row }">
                     <div class="common-text flex flex-col">
                         <el-text>余额</el-text>
-                        <el-text
-                            >邮费:¥ {{ row.expressMoney || '0' }}
+                        <el-text>邮费:¥ {{ row.expressMoney || '0' }}
                         </el-text>
                     </div>
                 </template>
                 <template #remarks="{ row }">
-                    <el-popover
-                        trigger="hover"
-                        width="240px"
-                        @show="handleShowPopover(row)"
-                        @hide="showOrderId = ''"
-                    >
+                    <el-popover trigger="hover" width="240px" @show="handleShowPopover(row)" @hide="showOrderId = ''">
                         <template #reference>
-                            <el-icon
-                                style="cursor: pointer"
-                                :size="24"
-                                :color="row.remarkLabel || '#777777'"
-                                @click="handleRemarks(row)"
-                            >
+                            <el-icon style="cursor: pointer" :size="24" :color="row.remarkLabel || '#777777'"
+                                @click="handleRemarks(row)">
                                 <Flag />
                             </el-icon>
                         </template>
-                        <orderTimeline
-                            :orderId="showOrderId"
-                            title="备注历史记录"
-                            ref="remarkPopoverRef"
-                        />
+                        <orderTimeline :orderId="showOrderId" title="备注历史记录" ref="remarkPopoverRef" />
                     </el-popover>
                 </template>
 
                 <template #action="{ row }">
                     <div class="flex flex-wrap flex-col">
-                        <el-button
-                            type="success"
-                            link
-                            v-permission="'recycleOrder:needReturned:detail'"
-                            @click="toOrderDetail(row)"
-                        >
+                        <el-button type="success" link v-permission="'recycleOrder:needReturned:detail'"
+                            @click="toOrderDetail(row)">
                             [订单详情]
                         </el-button>
-                        <el-button
-                            color="#7728f5"
-                            v-if="row.status !== '3'"
-                            link
-                            plain
-                            v-permission="
-                                'recycleOrder:needReturned:manualDelivery'
-                            "
-                            @click="handleManualDelivery(row)"
-                        >
+                        <el-button color="#7728f5" v-if="row.status !== '3'" link plain v-permission="'recycleOrder:needReturned:manualDelivery'
+                            " @click="handleManualDelivery(row)">
                             [手工发货]
                         </el-button>
-                        <el-button
-                            type="danger"
-                            link
-                            v-if="row.status < 3"
-                            v-permission="'recycleOrder:needReturned:cancel'"
-                            @click="cancelOrder(row)"
-                        >
+                        <el-button type="primary" link v-if="row.status * 1 < 3"
+                            v-permission="'recycleOrder:needReturned:modifyAddress'" @click="handleModifyAddr(row)">
+                            [修改地址]
+                        </el-button>
+
+                        <el-button type="danger" link v-if="row.status < 3"
+                            v-permission="'recycleOrder:needReturned:cancel'" @click="cancelOrder(row)">
                             [取消订单]
                         </el-button>
-                        <el-button
-                            type="danger"
-                            link
-                            v-if="row.status == '6'"
-                            v-permission="
-                                'recycleOrder:needReturned:cancelRecover'
-                            "
-                            @click="cancelRecover(row)"
-                        >
+                        <el-button type="danger" link v-if="row.status == '6'" v-permission="'recycleOrder:needReturned:cancelRecover'
+                            " @click="cancelRecover(row)">
                             [恢复订单]
                         </el-button>
-                        <el-button
-                            type="warning"
-                            link
-                            v-permission="'recycleOrder:needReturned:log'"
-                            @click="openOrderLog(row)"
-                        >
+                        <el-button type="warning" link v-permission="'recycleOrder:needReturned:log'"
+                            @click="openOrderLog(row)">
                             [订单日志]
                         </el-button>
                     </div>
@@ -148,196 +90,205 @@
         <orderLog ref="logRef" type="refund" />
         <manualDelivery ref="deliveryRef" @success="reload()" />
         <orderRefundDetail ref="orderDetailRef" />
+        <modifyAddress ref="modifyAddressRef"  />
     </ele-page>
 </template>
 
 <script setup>
-    import { ref, getCurrentInstance } from 'vue';
-    import { EleMessage } from 'ele-admin-plus/es';
-    import { ElMessageBox } from 'element-plus/es';
-    import { Flag } from '@element-plus/icons-vue';
-    import returnSearch from './return-search.vue';
-    import OrderNumber from '@/views/recycleOrder/components/order-number.vue';
-    import RefundCustomer from '@/views/recycleOrder/components/refund-customer.vue';
-    import { useDictData } from '@/utils/use-dict-data';
-    import orderRemarks from '@/views/recycleOrder/components/order-remarks.vue';
-    import orderTimeline from '@/views/recycleOrder/components/order-timeline.vue';
-    import orderLog from '@/views/recycleOrder/components/order-log.vue';
-    import manualDelivery from '@/views/recycleOrder/components/manual-delivery.vue';
-    //订单详情
-    import orderRefundDetail from '@/views/recycleOrder/needReturned/order-refund-detail.vue';
-    const status = ref('0');
+import { ref, getCurrentInstance, nextTick } from 'vue';
+import { EleMessage } from 'ele-admin-plus/es';
+import { ElMessageBox } from 'element-plus/es';
+import { Flag } from '@element-plus/icons-vue';
+import returnSearch from './return-search.vue';
+import OrderNumber from '@/views/recycleOrder/components/order-number.vue';
+import RefundCustomer from '@/views/recycleOrder/components/refund-customer.vue';
+import { useDictData } from '@/utils/use-dict-data';
+import orderRemarks from '@/views/recycleOrder/components/order-remarks.vue';
+import orderTimeline from '@/views/recycleOrder/components/order-timeline.vue';
+import orderLog from '@/views/recycleOrder/components/order-log.vue';
+import manualDelivery from '@/views/recycleOrder/components/manual-delivery.vue';
+import modifyAddress from "@/views/recycleOrder/components/modify-address.vue";
 
-    let props = defineProps({
-        pageConfig: {
-            type: Object,
-            default: () => ({
-                cacheKey: 'recycleOrderTable',
-                fileName: '需退回订单'
-            })
-        },
-        pageUrl: { type: String, default: '/order/orderInfo/refund/pageList' }
-    });
-    let { proxy } = getCurrentInstance();
-    /** 字典数据 */
-    const [statusDicts] = useDictData(['sys_normal_disable']);
+//订单详情
+import orderRefundDetail from '@/views/recycleOrder/needReturned/order-refund-detail.vue';
+const status = ref('0');
 
-    /** 表格实例 */
-    const tableRef = ref(null);
+let props = defineProps({
+    pageConfig: {
+        type: Object,
+        default: () => ({
+            cacheKey: 'recycleOrderTable',
+            fileName: '需退回订单'
+        })
+    },
+    pageUrl: { type: String, default: '/order/orderInfo/refund/pageList' }
+});
+let { proxy } = getCurrentInstance();
+/** 字典数据 */
+const [statusDicts] = useDictData(['sys_normal_disable']);
 
-    function handleStatusChange(val) {
-        status.value = val;
-        reload();
-    }
+/** 表格实例 */
+const tableRef = ref(null);
 
-    /** 表格列配置 */
-    const columns = ref([
-        {
-            type: 'selection',
-            columnKey: 'selection',
-            width: 50,
-            align: 'center',
-            fixed: 'left'
-        },
-        {
-            label: '单号',
-            prop: 'refundOrderId',
-            slot: 'orderNumber',
-            minWidth: 180
-        },
-        { label: '客户', prop: 'userNick', slot: 'customer', minWidth: 380 },
-        { label: '金额', prop: 'balanceMoney', slot: 'amount', minWidth: 100 },
-        { label: '是否推送', prop: 'plat', slot: 'isPush' },
-        {
-            label: '订单状态',
-            prop: 'status',
-            slot: 'status',
-            formatter: (row) =>
-                statusDicts.value.find((d) => d.dictValue == row.status)
-                    ?.dictLabel
-        },
-        {
-            label: '入库状态',
-            prop: 'stockStatus',
-            formatter: (row) =>
-                row.stockStatus == 1
-                    ? '已入库'
-                    : row.stockStatus == 0
-                      ? '未入库'
-                      : '-'
-        },
-        { label: '是否首单', prop: 'firstOrder', slot: 'isFirstOrder' },
-        { label: '创建时间', prop: 'createTime', width: 120 },
-        { label: '备注', prop: 'remarkLabel', slot: 'remarks' },
-        {
-            columnKey: 'action',
-            label: '操作',
-            width: 120,
-            align: 'center',
-            slot: 'action',
-            hideInPrint: true,
-            hideInExport: true
-        }
-    ]);
+function handleStatusChange(val) {
+    status.value = val;
+    reload();
+}
 
-    /** 表格选中数据 */
-    const selections = ref([]);
+/** 表格列配置 */
+const columns = ref([
+    {
+        type: 'selection',
+        columnKey: 'selection',
+        width: 50,
+        align: 'center',
+        fixed: 'left'
+    },
+    {
+        label: '单号',
+        prop: 'refundOrderId',
+        slot: 'orderNumber',
+        minWidth: 180
+    },
+    { label: '客户', prop: 'userNick', slot: 'customer', minWidth: 380 },
+    { label: '金额', prop: 'balanceMoney', slot: 'amount', minWidth: 100 },
+    { label: '是否推送', prop: 'plat', slot: 'isPush' },
+    {
+        label: '订单状态',
+        prop: 'status',
+        slot: 'status',
+        formatter: (row) =>
+            statusDicts.value.find((d) => d.dictValue == row.status)
+                ?.dictLabel
+    },
+    {
+        label: '入库状态',
+        prop: 'stockStatus',
+        formatter: (row) =>
+            row.stockStatus == 1
+                ? '已入库'
+                : row.stockStatus == 0
+                    ? '未入库'
+                    : '-'
+    },
+    { label: '是否首单', prop: 'firstOrder', slot: 'isFirstOrder' },
+    { label: '创建时间', prop: 'createTime', width: 120 },
+    { label: '备注', prop: 'remarkLabel', slot: 'remarks' },
+    {
+        columnKey: 'action',
+        label: '操作',
+        width: 120,
+        align: 'center',
+        slot: 'action',
+        hideInPrint: true,
+        hideInExport: true
+    }
+]);
 
-    async function queryPage(params) {
-        const res = await proxy.$http.get(props.pageUrl, { params });
-        if (res.data.code === 200) {
-            return res.data;
-        }
-        return Promise.reject(new Error(res.data.msg));
+/** 表格选中数据 */
+const selections = ref([]);
+
+async function queryPage(params) {
+    const res = await proxy.$http.get(props.pageUrl, { params });
+    if (res.data.code === 200) {
+        return res.data;
     }
+    return Promise.reject(new Error(res.data.msg));
+}
 
-    /** 表格数据源 */
-    const datasource = ({ pages, where, orders }) => {
-        return queryPage({
-            ...where,
-            ...orders,
-            ...pages,
-            tabStatus: status.value
-        });
-    };
+/** 表格数据源 */
+const datasource = ({ pages, where, orders }) => {
+    return queryPage({
+        ...where,
+        ...orders,
+        ...pages,
+        tabStatus: status.value
+    });
+};
 
-    /** 搜索 */
-    const reload = (where) => {
-        let data = where && where.search ? { page: 1, where } : { where };
-        delete data.where?.search;
-        delete data.where?.isReset;
-        tableRef.value?.reload?.(data);
-    };
+/** 搜索 */
+const reload = (where) => {
+    let data = where && where.search ? { page: 1, where } : { where };
+    delete data.where?.search;
+    delete data.where?.isReset;
+    tableRef.value?.reload?.(data);
+};
 
-    //订单详情
-    const orderDetailRef = ref(null);
-    function toOrderDetail(row) {
-        orderDetailRef.value?.handleOpen(row);
-    }
+//订单详情
+const orderDetailRef = ref(null);
+function toOrderDetail(row) {
+    orderDetailRef.value?.handleOpen(row);
+}
 
-    //弹窗确认
-    function messageBoxConfirm({ message, url, row }) {
-        ElMessageBox.confirm(message, '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '关闭',
-            type: 'warning'
-        }).then(() => {
-            proxy.$http
-                .post(url, { orderIds: [row.refundOrderId] })
-                .then((res) => {
-                    if (res.data.code === 200) {
-                        EleMessage.success('操作成功');
-                        reload();
-                    } else {
-                        EleMessage.error(res.data.msg || '操作失败');
-                    }
-                });
-        });
-    }
+//修改地址
+const modifyAddressRef = ref(null);
+function handleModifyAddr(row) {
+    modifyAddressRef.value?.handleOpen(row);
+}
 
-    //取消订单
-    function cancelOrder(row) {
-        messageBoxConfirm({
-            message: '确认取消?',
-            url: '/order/orderInfo/refund/cancel',
-            row
-        });
-    }
-    //恢复订单
-    function cancelRecover(row) {
-        messageBoxConfirm({
-            message: '确认恢复?',
-            url: '/order/orderInfo/refund/cancelRecover',
-            row
-        });
-    }
-    //人工发货
-    const deliveryRef = ref(null);
-    function handleManualDelivery(row) {
-        deliveryRef.value?.handleOpen(row);
-    }
-    //订单日志
-    const logRef = ref(null);
-    const openOrderLog = (row) => {
-        logRef.value?.handleOpen(row.refundOrderId);
-    };
+//弹窗确认
+function messageBoxConfirm({ message, url, row }) {
+    ElMessageBox.confirm(message, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+    }).then(() => {
+        proxy.$http
+            .post(url, { orderIds: [row.refundOrderId] })
+            .then((res) => {
+                if (res.data.code === 200) {
+                    EleMessage.success('操作成功');
+                    reload();
+                } else {
+                    EleMessage.error(res.data.msg || '操作失败');
+                }
+            });
+    });
+}
 
-    //修改备注
-    const remarksRef = ref(null);
-    function handleRemarks(row) {
-        remarksRef.value?.handleOpen(row);
-    }
+//取消订单
+function cancelOrder(row) {
+    messageBoxConfirm({
+        message: '确认取消?',
+        url: '/order/orderInfo/refund/cancel',
+        row
+    });
+}
+//恢复订单
+function cancelRecover(row) {
+    messageBoxConfirm({
+        message: '确认恢复?',
+        url: '/order/orderInfo/refund/cancelRecover',
+        row
+    });
+}
+//人工发货
+const deliveryRef = ref(null);
+function handleManualDelivery(row) {
+    deliveryRef.value?.handleOpen(row);
+}
+//订单日志
+const logRef = ref(null);
+const openOrderLog = (row) => {
+    logRef.value?.handleOpen(row.refundOrderId);
+};
 
-    //备注弹窗显示
-    const showOrderId = ref();
-    const remarkPopoverRef = ref(null);
-    function handleShowPopover(row) {
-        nextTick(() => {
-            remarkPopoverRef.value?.getRemarks(row.refundOrderId, true);
-        });
+//修改备注
+const remarksRef = ref(null);
+function handleRemarks(row) {
+    remarksRef.value?.handleOpen(row);
+}
+
+//备注弹窗显示
+const showOrderId = ref();
+const remarkPopoverRef = ref(null);
+function handleShowPopover(row) {
+    nextTick(() => {
+        remarkPopoverRef.value?.getRemarks(row.refundOrderId, true);
+    });
 
-        if (showOrderId.value !== row.refundOrderId) {
-            showOrderId.value = row.refundOrderId;
-        }
+    if (showOrderId.value !== row.refundOrderId) {
+        showOrderId.value = row.refundOrderId;
     }
+}
 </script>

+ 79 - 98
src/views/recycleService/stockOff/components/stock-off-detail.vue

@@ -1,30 +1,15 @@
 <template>
-    <el-dialog
-        v-model="visible"
-        title="任务详情"
-        width="80%"
-        :close-on-click-modal="false"
-        destroy-on-close
-        :body-style="{ padding: '0px' }"
-    >
+    <el-dialog v-model="visible" title="任务详情" width="80%" :close-on-click-modal="false" destroy-on-close
+        :body-style="{ padding: '0px' }">
         <el-tabs v-model="activeTab">
             <el-tab-pane label="任务详情" name="detail">
-                <common-table
-                    :pageConfig="detailConfig"
-                    :columns="detailColumns"
-                    :tools="false"
-                    :body-style="{ padding: '10px' }"
-                >
+                <common-table :pageConfig="detailConfig" :columns="detailColumns" :tools="false"
+                    :body-style="{ padding: '10px' }">
 
                     <template #action="{ row }">
                         <div>
-                            <el-button
-                                type="danger"
-                                link
-                                v-permission="'recycleService:stockOff:close'"
-                                @click="handleOperate(row, 3)"
-                                v-if="row.status == 1"
-                            >
+                            <el-button type="danger" link v-permission="'recycleService:stockOff:close'"
+                                @click="handleOperate(row, 3)" v-if="row.status == 1">
                                 关闭
                             </el-button>
                         </div>
@@ -32,96 +17,92 @@
                 </common-table>
             </el-tab-pane>
             <el-tab-pane label="操作记录" name="log">
-                <common-table
-                    :pageConfig="logConfig"
-                    :columns="logColumns"
-                    :tools="false"
-                    :body-style="{ padding: '10px' }"
-                />
+                <common-table :pageConfig="logConfig" :columns="logColumns" :tools="false"
+                    :body-style="{ padding: '10px' }" />
             </el-tab-pane>
         </el-tabs>
     </el-dialog>
 </template>
 
 <script setup>
-    import { ref, reactive } from 'vue';
-    import CommonTable from '@/components/CommonPage/CommonTable.vue';
-    import { useDictData } from '@/utils/use-dict-data';
+import { ref, reactive } from 'vue';
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
+import { useDictData } from '@/utils/use-dict-data';
 
-    const visible = ref(false);
-    const activeTab = ref('detail');
-    const currentTask = ref(null);
+const visible = ref(false);
+const activeTab = ref('detail');
+const currentTask = ref(null);
 
-    const statusDicts = ref([
-        { label: '待处理', value: 1 },
-        { label: '已完成', value: 2 },
-        { label: '已关闭', value: 3 }
-    ]);
+const statusDicts = ref([
+    { label: '待处理', value: 1 },
+    { label: '已完成', value: 2 },
+    { label: '已关闭', value: 3 }
+]);
 
-    const detailColumns = ref([
-        {
-            label: '操作',
-            prop: 'operation',
-            align: 'center',
-            slot: 'action',
-            width: 100
-        },
-        {
-            label: '作业状态',
-            prop: 'status',
-            align: 'center',
-            width: 120,
-            formatter: (row) =>
-                statusDicts.value.find((d) => d.value == row.status)?.label
-        },
-        { label: '仓库', prop: 'godownName', align: 'center', width: 100 },
-        { label: '下架库位', prop: 'positionCode', align: 'center' },
-        { label: '订单编号', prop: 'orderId', align: 'center' },
-        { label: '物流单号', prop: 'waybillCode', align: 'center' },
-        { label: '不良本数', prop: 'badNum', align: 'center', width: 100 },
-        { label: '计划数量', prop: 'planNum', align: 'center', width: 100 },
-        { label: '已下数量', prop: 'finishNum', align: 'center', width: 100 }
-    ]);
+const detailColumns = ref([
+    {
+        label: '操作',
+        prop: 'operation',
+        align: 'center',
+        slot: 'action',
+        width: 100
+    },
+    {
+        label: '作业状态',
+        prop: 'status',
+        align: 'center',
+        width: 120,
+        formatter: (row) =>
+            statusDicts.value.find((d) => d.value == row.status)?.label
+    },
+    { label: '仓库', prop: 'godownName', align: 'center', width: 100 },
+    { label: '下架库位', prop: 'positionCode', align: 'center' },
+    { label: '订单编号', prop: 'orderId', align: 'center' },
+    { label: '物流单号', prop: 'waybillCode', align: 'center' },
+    { label: '不良本数', prop: 'badNum', align: 'center', width: 100 },
+    { label: '计划数量', prop: 'planNum', align: 'center', width: 100, formatter: (row) => row.planNum || 1 },
+    { label: '已下数量', prop: 'finishNum', align: 'center', width: 100, formatter: (row) => row.status == 2 ? 1 : 0 }
+]);
 
-    const logColumns = ref([
-        { label: '操作时间', prop: 'createTime', align: 'center', width: 160 },
-        { label: '操作人', prop: 'createName', align: 'center', width: 100 },
-        { label: '操作内容', prop: 'content', align: 'center' }
-    ]);
+const logColumns = ref([
+    { label: '操作时间', prop: 'createTime', align: 'center', width: 160 },
+    { label: '操作人', prop: 'createName', align: 'center', width: 100 },
+    { label: '操作内容', prop: 'content', align: 'center' }
+]);
 
-    const detailConfig = reactive({
-        pageUrl: '/baseinfo/stocktask/stockDetail',
-        params: computed(() => ({
-            taskCode: currentTask.value?.taskCode
-        }))
-    });
+const detailConfig = reactive({
+    pageUrl: '/baseinfo/stocktask/stockDetail',
+    params: computed(() => ({
+        taskCode: currentTask.value?.taskCode
+    }))
+});
 
-    const logConfig = reactive({
-        pageUrl: '/baseinfo/stocktask/taskLog',
-        params: computed(() => ({
-            taskCode: currentTask.value?.taskCode
-        }))
-    });
+const logConfig = reactive({
+    pageUrl: '/baseinfo/stocktask/taskLog',
+    params: computed(() => ({
+        taskCode: currentTask.value?.taskCode
+    }))
+});
 
-    const userDicts = ref([]);
-    function handleOpen(row) {
-        currentTask.value = row;
-        visible.value = true;
-        const [UseStatusDicts] = useDictData(['task_status']);
-        userDicts.value = UseStatusDicts.value;
-    }
+const userDicts = ref([]);
+function handleOpen(row) {
+    currentTask.value = row;
+    visible.value = true;
+    const [UseStatusDicts] = useDictData(['task_status']);
+    userDicts.value = UseStatusDicts.value;
+}
 
-    //关闭
-    function handleOperate(row, type) {
-        let data = {
-            taskCode: row.taskCode,
-            operateType: type
-        };
-        pageRef.value?.messageBoxConfirm({
-            message: '当前作业单据状态将变更为已关闭,是否继续?',
-            fetch: () => request.post('/baseinfo/stocktask/operate', data)
-        });
-    }
+//关闭
+function handleOperate(row, type) {
+    let data = {
+        taskCode: row.taskCode,
+        operateType: type
+    };
+    pageRef.value?.messageBoxConfirm({
+        message: '当前作业单据状态将变更为已关闭,是否继续?',
+        fetch: () => request.post('/baseinfo/stocktask/operate', data)
+    });
+}
 
-    defineExpose({ handleOpen });
+defineExpose({ handleOpen });
 </script>

+ 6 - 1
src/views/recycleService/stockOut/index.vue

@@ -50,6 +50,12 @@
                 dayjs(row.outputTime).format('YYYY-MM-DD HH:mm:ss'),
             width: 160
         },
+        {
+            label: '员工姓名',
+            prop: 'outputName',
+            align: 'center',
+            width: 120
+        },
         { label: '仓库', prop: 'godownName', align: 'center', width: 120 },
         {
             label: '出库库位',
@@ -79,7 +85,6 @@
             label: '反馈',
             prop: 'outputRemark',
             align: 'center',
-            minWidth: 200,
             formatter: (row) => row.outputRemark || '--'
         },
         { label: '员工姓名', prop: 'outputName', align: 'center', width: 120 }