订单管理
This commit is contained in:
parent
680ac84c2e
commit
19933d2315
@ -20,11 +20,12 @@
|
|||||||
"url": "https://gitee.com/"
|
"url": "https://gitee.com/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ag-grid-community/client-side-row-model": "^32.3.4",
|
||||||
"@element-plus/icons-vue": "2.3.1",
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
"@highlightjs/vue-plugin": "2.1.0",
|
"@highlightjs/vue-plugin": "2.1.0",
|
||||||
"@vueup/vue-quill": "1.2.0",
|
"@vueup/vue-quill": "1.2.0",
|
||||||
"@vueuse/core": "11.3.0",
|
"@vueuse/core": "11.3.0",
|
||||||
"ag-grid-vue3": "^33.1.1",
|
"ag-grid-vue3": "^32.3.4",
|
||||||
"animate.css": "4.1.1",
|
"animate.css": "4.1.1",
|
||||||
"await-to-js": "3.0.0",
|
"await-to-js": "3.0.0",
|
||||||
"axios": "1.7.8",
|
"axios": "1.7.8",
|
||||||
|
@ -108,54 +108,64 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="logisticsOrderDetailList" @selection-change="handleSelectionChange">
|
<!-- <el-table v-loading="loading" :data="logisticsOrderDetailList" @selection-change="handleSelectionChange">-->
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
<!-- <el-table-column label="订单号" align="center" prop="orderId" />-->
|
||||||
<el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />
|
<!-- <el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />-->
|
||||||
<el-table-column label="FBA箱号" align="center" prop="fbaBoxNumber" />
|
<!-- <el-table-column label="FBA箱号" align="center" prop="fbaBoxNumber" />-->
|
||||||
<el-table-column label="物流商ID" align="center" prop="logisticsProviderId" />
|
<!-- <el-table-column label="物流商ID" align="center" prop="logisticsProviderId" />-->
|
||||||
<el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />
|
<!-- <el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />-->
|
||||||
<el-table-column label="物流渠道" align="center" prop="logisticsChannel" />
|
<!-- <el-table-column label="物流渠道" align="center" prop="logisticsChannel" />-->
|
||||||
<el-table-column label="目的地仓库" align="center" prop="destination" />
|
<!-- <el-table-column label="目的地仓库" align="center" prop="destination" />-->
|
||||||
<el-table-column label="计划数量" align="center" prop="plannedQuantity" />
|
<!-- <el-table-column label="计划数量" align="center" prop="plannedQuantity" />-->
|
||||||
<el-table-column label="实际货件数量" align="center" prop="shipmentQuantity" />
|
<!-- <el-table-column label="实际货件数量" align="center" prop="shipmentQuantity" />-->
|
||||||
<el-table-column label="物流追踪号" align="center" prop="trackingNumber" />
|
<!-- <el-table-column label="物流追踪号" align="center" prop="trackingNumber" />-->
|
||||||
<el-table-column label="供应商称重" align="center" prop="supplierWeight" />
|
<!-- <el-table-column label="供应商称重" align="center" prop="supplierWeight" />-->
|
||||||
<el-table-column label="物流商计重" align="center" prop="logisticsWeight" />
|
<!-- <el-table-column label="物流商计重" align="center" prop="logisticsWeight" />-->
|
||||||
<el-table-column label="称重差异" align="center" prop="weightDiff" />
|
<!-- <el-table-column label="称重差异" align="center" prop="weightDiff" />-->
|
||||||
<el-table-column label="物流单价" align="center" prop="pricePerKg" />
|
<!-- <el-table-column label="物流单价" align="center" prop="pricePerKg" />-->
|
||||||
<el-table-column label="物流计价重量" align="center" prop="logisticsCalculationPrice" />
|
<!-- <el-table-column label="物流计价重量" align="center" prop="logisticsCalculationPrice" />-->
|
||||||
<el-table-column label="其他物流费用" align="center" prop="otherFee" />
|
<!-- <el-table-column label="其他物流费用" align="center" prop="otherFee" />-->
|
||||||
<el-table-column label="费用合计" align="center" prop="totalFee" />
|
<!-- <el-table-column label="费用合计" align="center" prop="totalFee" />-->
|
||||||
<el-table-column label="物流状态" align="center" prop="logisticsStatus" />
|
<!-- <el-table-column label="物流状态" align="center" prop="logisticsStatus" />-->
|
||||||
<el-table-column label="预计签收日期" align="center" prop="estimatedDeliveryDate" width="180">
|
<!-- <el-table-column label="预计签收日期" align="center" prop="estimatedDeliveryDate" width="180">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<span>{{ parseTime(scope.row.estimatedDeliveryDate, '{y}-{m}-{d}') }}</span>
|
<!-- <span>{{ parseTime(scope.row.estimatedDeliveryDate, '{y}-{m}-{d}') }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="实际签收日期" align="center" prop="actualDeliveryDate" width="180">
|
<!-- <el-table-column label="实际签收日期" align="center" prop="actualDeliveryDate" width="180">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<span>{{ parseTime(scope.row.actualDeliveryDate, '{y}-{m}-{d}') }}</span>
|
<!-- <span>{{ parseTime(scope.row.actualDeliveryDate, '{y}-{m}-{d}') }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="运输时效" align="center" prop="timeliness" />
|
<!-- <el-table-column label="运输时效" align="center" prop="timeliness" />-->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<el-tooltip content="修改" placement="top">
|
<!-- <el-tooltip content="修改" placement="top">-->
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:logisticsOrderDetail:edit']"></el-button>
|
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:logisticsOrderDetail:edit']"></el-button>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
<el-tooltip content="删除" placement="top">
|
<!-- <el-tooltip content="删除" placement="top">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
link
|
<!-- link-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
icon="Delete"
|
<!-- icon="Delete"-->
|
||||||
@click="handleDelete(scope.row)"
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
v-hasPermi="['amz:logisticsOrderDetail:remove']"
|
<!-- v-hasPermi="['amz:logisticsOrderDetail:remove']"-->
|
||||||
></el-button>
|
<!-- ></el-button>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
<!-- </el-table>-->
|
||||||
|
|
||||||
|
<ag-grid-vue
|
||||||
|
class="ag-theme-alpine"
|
||||||
|
style="height: 700px"
|
||||||
|
:columnDefs="columnDefs"
|
||||||
|
:rowData="logisticsOrderDetailList"
|
||||||
|
:rowSelection="'multiple'"
|
||||||
|
@selection-changed="handleSelectionChange"
|
||||||
|
:overlayLoadingTemplate="loadingTemplate"
|
||||||
|
/>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -257,8 +267,91 @@ import {
|
|||||||
} from '@/api/amz/logisticsOrderDetail';
|
} from '@/api/amz/logisticsOrderDetail';
|
||||||
import { LogisticsOrderDetailVO, LogisticsOrderDetailQuery, LogisticsOrderDetailForm } from '@/api/amz/logisticsOrderDetail/types';
|
import { LogisticsOrderDetailVO, LogisticsOrderDetailQuery, LogisticsOrderDetailForm } from '@/api/amz/logisticsOrderDetail/types';
|
||||||
|
|
||||||
|
import { AgGridVue } from 'ag-grid-vue3';
|
||||||
|
import 'ag-grid-community/styles/ag-grid.css';
|
||||||
|
import 'ag-grid-community/styles/ag-theme-alpine.css';
|
||||||
|
|
||||||
|
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
||||||
|
import { ModuleRegistry } from '@ag-grid-community/core';
|
||||||
|
// 注册必需模块
|
||||||
|
ModuleRegistry.registerModules([ClientSideRowModelModule]);
|
||||||
|
|
||||||
|
// 如果使用其他功能,需要添加对应模块
|
||||||
|
// import { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';
|
||||||
|
// import { ClipboardModule } from '@ag-grid-enterprise/clipboard';
|
||||||
|
|
||||||
|
// ModuleRegistry.registerModules([RowGroupingModule, ClipboardModule]);
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
|
const parseTimeGlobal = (value, format) => {
|
||||||
|
return proxy.$parseTime(value, format);
|
||||||
|
};
|
||||||
|
|
||||||
|
const loadingTemplate = '<span class="ag-overlay-loading-center">加载中...</span>';
|
||||||
|
|
||||||
|
const columnDefs = ref([
|
||||||
|
{
|
||||||
|
headerName: '',
|
||||||
|
field: 'selected',
|
||||||
|
checkboxSelection: true,
|
||||||
|
headerCheckboxSelection: true,
|
||||||
|
width: 55,
|
||||||
|
cellStyle: { 'text-align': 'center' }
|
||||||
|
},
|
||||||
|
{ headerName: '订单号', field: 'orderId', cellStyle: { 'text-align': 'center' } },
|
||||||
|
{ headerName: 'FBA货件编号', field: 'fbaShipmentId', cellStyle: { 'text-align': 'center' } },
|
||||||
|
{ headerName: 'FBA箱号', field: 'fbaBoxNumber', cellStyle: { 'text-align': 'center' } },
|
||||||
|
// 其他普通列...
|
||||||
|
{
|
||||||
|
headerName: '预计签收日期',
|
||||||
|
field: 'estimatedDeliveryDate',
|
||||||
|
width: 180,
|
||||||
|
valueFormatter: (params) => (params.value ? parseTimeGlobal(params.value, '{y}-{m}-{d}') : ''),
|
||||||
|
cellStyle: { 'text-align': 'center' }
|
||||||
|
},
|
||||||
|
// 实际签收日期列同理...
|
||||||
|
{
|
||||||
|
headerName: '操作',
|
||||||
|
cellStyle: { 'text-align': 'center' },
|
||||||
|
cellRenderer: (params) => {
|
||||||
|
// 权限检查
|
||||||
|
const canEdit = checkPermi(['amz:logisticsOrderDetail:edit']);
|
||||||
|
const canDelete = checkPermi(['amz:logisticsOrderDetail:remove']);
|
||||||
|
|
||||||
|
// 动态生成 HTML
|
||||||
|
let buttons = '';
|
||||||
|
if (canEdit) {
|
||||||
|
buttons += `
|
||||||
|
<el-tooltip content="修改">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
@click="ctx.handleUpdate(${JSON.stringify(params.data)})"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
|
<el-tooltip content="删除">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Delete"
|
||||||
|
@click="ctx.handleDelete(${JSON.stringify(params.data)})"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
return `<div class="cell-action">${buttons}</div>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
const logisticsOrderDetailList = ref<LogisticsOrderDetailVO[]>([]);
|
const logisticsOrderDetailList = ref<LogisticsOrderDetailVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user