fix
pyt
2025-04-21 f7bb5c78d220b2db2239c79e9905ba17d5f0c05e
src/view/Home.vue
@@ -142,6 +142,21 @@
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="cargoType" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>柜型</div>
                            <div class="header-en">Container Type</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="SOC" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>SOC</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="mail" align="center">
                    <template #header>
                        <div class="custom-header">
@@ -155,6 +170,13 @@
                        <div class="custom-header">
                            <div>收件人地址</div>
                            <div class="header-en">Consignee's Address</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="hold" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>Hold</div>
                        </div>
                    </template>
                </el-table-column>
@@ -182,21 +204,7 @@
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="cargoType" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>柜型</div>
                            <div class="header-en">Container Type</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="SOC" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>SOC</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="realSchedule" align="center">
                    <template #header>
                        <div class="custom-header">
@@ -250,13 +258,7 @@
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="200" prop="hold" align="center">
                    <template #header>
                        <div class="custom-header">
                            <div>Hold</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="option" align="center" fixed="right">
                    <template #header>
                        <div class="custom-header">
@@ -287,7 +289,7 @@
import UserInfo from '@/component/userInfo.vue'
import Header from '@/component/Header.vue'
import NoticeComponent from '@/component/Notice.vue'
import { getList, iptOrder, exportList } from './home'
import { getList, iptOrder, exportList, getModoul } from './home'
import * as XLSX from 'xlsx'
export default {
    name: "Home",
@@ -365,14 +367,6 @@
                    id: '已取消',
                    label: '已取消 | Cancelled'
                },
                {
                    id: '预约中',
                    label: '预约中 | Booking'
                },
                {
                    id: '预约完成',
                    label: '预约完成 | Appt Confirmed'
                }
            ],
            tableData: [],
            option1: [
@@ -399,7 +393,9 @@
    },
    methods: {
        downloadTemplate() {
            window.open('http://47.108.239.173/compass_template.xlsx', '_blank')
            getModoul().then(res => {
                window.open(res.data.url, '_blank')
            })
        },
        handleClick(e, type) {
            this.$router.push({
@@ -508,9 +504,9 @@
                    '是否超重 | Overweight': item.overweight === '是' ? 'Y' : (item.overweight === '否' ? 'N' : ''),
                    '是否查验 | Exam/Inspection': item.exam === '是' ? 'Y' : (item.exam === '否' ? 'N' : ''),
                    'DROP/LIVE': item.dropOrLive,
                    'Hold': item.hold === '等国内通知派送' ? '等国内通知派送|Client Hold' :
                           (item.hold === '扣柜放行' ? '扣柜放行|Client Release' :
                           (item.hold === '正常' ? '正常|Normal' : '')),
                    'Hold': item.hold === '等国内通知派送' ? '等国内通知派送|Client Hold' :
                        (item.hold === '扣柜放行' ? '扣柜放行|Client Release' :
                            (item.hold === '正常' ? '正常|Normal' : '')),
                    '客户单号 | Customer Ref. No.': item.customerRefNo,
                    '品名 | Commodity': item.commodity,
                    '数量 | QTY': item.qty,
@@ -529,11 +525,11 @@
                }));
            }
            // 准备导出数据
            // 创建工作簿
            const wb = XLSX.utils.book_new();
            const ws = XLSX.utils.json_to_sheet(exportData);
            // 设置列宽
            const colWidths = [
                { wch: 25 }, // 集装箱号
@@ -601,7 +597,7 @@
                        // 获取表头并打印日志
                        const headers = jsonData[2];
                        console.log(jsonData);
                        // 验证模板格式
                        const requiredFields = [
                            '集装箱号 | Container No.',
@@ -682,8 +678,8 @@
                        });
                        // 使用post方法直接传递数组
                        iptOrder(transformedData).then(res => {
                            console.log(res,transformedData);
                            console.log(res, transformedData);
                            if (res) {
                                this.$message({
                                    message: '导入成功',