运营段修改
This commit is contained in:
parent
59f490f323
commit
2cc637b129
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { InquiryRequestVO, InquiryRequestForm, InquiryRequestQuery } from '@/api/amz/inquiryRequest/types';
|
||||
import { InquiryRequestVO, InquiryRequestForm, InquiryRequestQuery, InquiryRequestItemVO } from '@/api/amz/inquiryRequest/types';
|
||||
import { LogisticsChannelVO } from '@/api/amz/logisticsChannel/types';
|
||||
import { LogisticsQuoteVO } from '@/api/amz/logisticsQuote/types';
|
||||
|
||||
@ -29,13 +29,29 @@ export const getInquiryRequest = (id: string | number): AxiosPromise<InquiryRequ
|
||||
});
|
||||
};
|
||||
|
||||
export const createWithDesAndChannel = (destination: string | number, channelId: string, date: string): AxiosPromise<void> => {
|
||||
export const createWithDesAndChannel = (destination: string | number, channelId: string | number, date: string): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: '/amz/inquiryRequest/create/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const createBatch = (items: InquiryRequestItemVO[]): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: '/amz/inquiryRequest/create/batch',
|
||||
method: 'post',
|
||||
data: items
|
||||
});
|
||||
};
|
||||
|
||||
export const insertList = (items: (string | number)[]): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: '/amz/inquiryBlacklist/insert',
|
||||
method: 'post',
|
||||
data: items
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据目的地仓库和渠道查询物流询价列表
|
||||
* @returns {*}
|
||||
@ -44,7 +60,7 @@ export const createWithDesAndChannel = (destination: string | number, channelId:
|
||||
* @param date
|
||||
*/
|
||||
|
||||
export const queryWithDesAndChannel = (destination: string | number, channelId: string, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
export const queryWithDesAndChannel = (destination: string | number, channelId: string | number, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
return request({
|
||||
url: '/amz/inquiryRequest/query/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
|
@ -64,6 +64,19 @@ export interface InquiryRequestVO {
|
||||
effectiveEndTime: string;
|
||||
}
|
||||
|
||||
export interface InquiryRequestItemVO {
|
||||
/**
|
||||
* 目的地(存储四级行政编码,如CN310115)
|
||||
*/
|
||||
destination: string;
|
||||
/**
|
||||
* 渠道ID(system=dict_code,custom=自定义渠道ID)
|
||||
*/
|
||||
channelId: string | number;
|
||||
|
||||
quoteDate: string;
|
||||
}
|
||||
|
||||
export interface InquiryRequestForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID(自增序列)
|
||||
|
@ -55,7 +55,7 @@ export interface LogisticsOrderDetailVO {
|
||||
trackingNumber: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
* 供应商称重-总重量(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight: number;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface LogisticsOrderDetailVO {
|
||||
logisticsWeight: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重-总重量)
|
||||
*/
|
||||
weightDiff: number;
|
||||
|
||||
@ -167,7 +167,7 @@ export interface LogisticsOrderDetailForm extends BaseEntity {
|
||||
trackingNumber?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
* 供应商称重-总重量(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight?: number;
|
||||
|
||||
@ -177,7 +177,7 @@ export interface LogisticsOrderDetailForm extends BaseEntity {
|
||||
logisticsWeight?: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重-总重量)
|
||||
*/
|
||||
weightDiff?: number;
|
||||
|
||||
@ -274,7 +274,7 @@ export interface LogisticsOrderDetailQuery extends PageQuery {
|
||||
trackingNumber?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,由供应商提供)
|
||||
* 供应商称重-总重量(单位:KG,由供应商提供)
|
||||
*/
|
||||
supplierWeight?: number;
|
||||
|
||||
@ -284,7 +284,7 @@ export interface LogisticsOrderDetailQuery extends PageQuery {
|
||||
logisticsWeight?: number;
|
||||
|
||||
/**
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||
* 称重差异(应用层计算:物流商计重 - 供应商称重-总重量)
|
||||
*/
|
||||
weightDiff?: number;
|
||||
|
||||
|
75
src/api/amz/logisticsOrderQuotation/index.ts
Normal file
75
src/api/amz/logisticsOrderQuotation/index.ts
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LogisticsOrderQuotationVO, LogisticsOrderQuotationForm, LogisticsOrderQuotationQuery } from '@/api/amz/logisticsOrderQuotation/types';
|
||||
|
||||
/**
|
||||
* 查询物流订单确认列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listLogisticsOrderQuotation = (query?: LogisticsOrderQuotationQuery): AxiosPromise<LogisticsOrderQuotationVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询物流订单确认详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLogisticsOrderQuotation = (id: string | number): AxiosPromise<LogisticsOrderQuotationVO> => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增物流订单确认
|
||||
* @param data
|
||||
*/
|
||||
export const addLogisticsOrderQuotation = (data: LogisticsOrderQuotationForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增物流订单确认
|
||||
* @param data
|
||||
*/
|
||||
export const createLogisticsOrderQuotation = (data: LogisticsOrderQuotationForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation/quotationOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改物流订单确认
|
||||
* @param data
|
||||
*/
|
||||
export const updateLogisticsOrderQuotation = (data: LogisticsOrderQuotationForm) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除物流订单确认
|
||||
* @param id
|
||||
*/
|
||||
export const delLogisticsOrderQuotation = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/amz/logisticsOrderQuotation/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
161
src/api/amz/logisticsOrderQuotation/types.ts
Normal file
161
src/api/amz/logisticsOrderQuotation/types.ts
Normal file
@ -0,0 +1,161 @@
|
||||
export interface LogisticsOrderQuotationVO {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId: string | number;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
channelName: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity: number;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
quoteOrderId: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface LogisticsOrderQuotationForm extends BaseEntity {
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
channelName?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity?: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
quoteOrderId?: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface LogisticsOrderQuotationQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
fbaShipmentId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
orderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商ID(关联物流商信息表)
|
||||
*/
|
||||
logisticsProviderId?: string | number;
|
||||
|
||||
/**
|
||||
* 物流商名称(冗余存储,避免高频联表查询)
|
||||
*/
|
||||
logisticsProviderName?: string | number;
|
||||
|
||||
/**
|
||||
* 物流渠道(如空运/海运/快递等)
|
||||
*/
|
||||
channelName?: string;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
destination?: string;
|
||||
|
||||
/**
|
||||
* 总箱子数量(此订单包含的箱子总数)
|
||||
*/
|
||||
boxQuantity?: number;
|
||||
|
||||
/**
|
||||
* 总货件数量(商品件数总和)
|
||||
*/
|
||||
shipmentQuantity?: number;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
quoteOrderId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,13 +26,20 @@ export const listLogisticsQuote = (query?: LogisticsQuoteQuery): AxiosPromise<Lo
|
||||
* @param date
|
||||
*/
|
||||
|
||||
export const queryLogisticsQuote = (destination: string | number, channelId: string, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
export const queryLogisticsQuote = (destination: string | number, channelId: string | number, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsQuote/query/' + destination + '/' + channelId + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const queryLogisticsQuoteWithDes = (destination: string | number, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
||||
return request({
|
||||
url: '/amz/logisticsQuote/queryWithDes/' + destination + '/' + date,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询物流报价详细
|
||||
* @param id
|
||||
|
@ -224,6 +224,11 @@ export interface LogisticsMostQuoteForm extends BaseEntity {
|
||||
* 单位
|
||||
*/
|
||||
unit?: string;
|
||||
|
||||
/**
|
||||
* 后端物流类型
|
||||
*/
|
||||
backLogisticsType?: string;
|
||||
}
|
||||
|
||||
export interface LogisticsQuoteQuery extends PageQuery {
|
||||
|
@ -81,6 +81,14 @@ export const updateShipmentPlan = (data: ShipmentPlanForm) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const updateShipmentPlanList = (data: string[]) => {
|
||||
return request({
|
||||
url: '/amz/shipmentPlan/update/list/send',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除货件计划
|
||||
* @param id
|
||||
|
@ -129,7 +129,7 @@ export interface ShipmentPlanVO {
|
||||
boxSize: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,物流商实际测量值)
|
||||
* 供应商称重-总重量(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
vendorWeight: number;
|
||||
|
||||
@ -276,7 +276,7 @@ export interface ShipmentPlanOrderVO {
|
||||
boxSize: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,物流商实际测量值)
|
||||
* 供应商称重-总重量(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
logisticsWeight: number;
|
||||
|
||||
@ -431,7 +431,7 @@ export interface ShipmentPlanForm extends BaseEntity {
|
||||
boxSize?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重
|
||||
* 供应商称重-总重量
|
||||
*/
|
||||
vendorWeight?: number;
|
||||
|
||||
@ -573,7 +573,7 @@ export interface ShipmentPlanQuery extends PageQuery {
|
||||
boxSize?: string;
|
||||
|
||||
/**
|
||||
* 供应商称重(单位:KG,物流商实际测量值)
|
||||
* 供应商称重-总重量(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
logisticsWeight?: number;
|
||||
|
||||
|
245
src/components/FileCustomUpload/index.vue
Normal file
245
src/components/FileCustomUpload/index.vue
Normal file
@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<div class="upload-file">
|
||||
<el-upload
|
||||
ref="fileUploadRef"
|
||||
multiple
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
class="upload-file-uploader"
|
||||
:data="fileData"
|
||||
>
|
||||
<!-- 上传按钮 -->
|
||||
<el-button type="primary">{{ titleName }}</el-button>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div v-if="showTip" class="el-upload__tip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
<!-- 文件列表 -->
|
||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||
<li v-for="(file, index) in fileList" :key="file.uid" class="el-upload-list__item ele-upload-list__item-content">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action">
|
||||
<el-button type="danger" link @click="handleDelete(index)">删除</el-button>
|
||||
</div>
|
||||
</li>
|
||||
</transition-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { propTypes } from '@/utils/propTypes';
|
||||
import { delOss, listByIds } from '@/api/system/oss';
|
||||
import { globalHeaders } from '@/utils/request';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: [String, Object, Array],
|
||||
default: () => []
|
||||
},
|
||||
// 数量限制
|
||||
limit: propTypes.number.def(5),
|
||||
// 大小限制(MB)
|
||||
fileSize: propTypes.number.def(5),
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']),
|
||||
// 是否显示提示
|
||||
isShowTip: propTypes.bool.def(true),
|
||||
fileData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
titleName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
const number = ref(0);
|
||||
const uploadList = ref<any[]>([]);
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const uploadFileUrl = ref(baseUrl + '/amz/logisticsOrder/uploadPod'); // 上传文件服务器地址
|
||||
const headers = ref(globalHeaders());
|
||||
|
||||
const fileList = ref<any[]>([]);
|
||||
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
|
||||
|
||||
const fileUploadRef = ref<ElUploadInstance>();
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
async (val) => {
|
||||
if (val) {
|
||||
let temp = 1;
|
||||
// 首先将值转为数组
|
||||
let list: any[] = [];
|
||||
if (Array.isArray(val)) {
|
||||
list = val;
|
||||
} else {
|
||||
const res = await listByIds(val);
|
||||
list = res.data.map((oss) => {
|
||||
return {
|
||||
name: oss.originalName,
|
||||
url: oss.url,
|
||||
ossId: oss.ossId
|
||||
};
|
||||
});
|
||||
}
|
||||
// 然后将数组转为对象数组
|
||||
fileList.value = list.map((item) => {
|
||||
item = { name: item.name, url: item.url, ossId: item.ossId };
|
||||
item.uid = item.uid || new Date().getTime() + temp++;
|
||||
return item;
|
||||
});
|
||||
} else {
|
||||
fileList.value = [];
|
||||
return [];
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
// 上传前校检格式和大小
|
||||
const handleBeforeUpload = (file: any) => {
|
||||
// 校检文件类型
|
||||
if (props.fileType.length) {
|
||||
const fileName = file.name.split('.');
|
||||
const fileExt = fileName[fileName.length - 1];
|
||||
const isTypeOk = props.fileType.indexOf(fileExt) >= 0;
|
||||
if (!isTypeOk) {
|
||||
proxy?.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join('/')}格式文件!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 校检文件名是否包含特殊字符
|
||||
if (file.name.includes(',')) {
|
||||
proxy?.$modal.msgError('文件名不正确,不能包含英文逗号!');
|
||||
return false;
|
||||
}
|
||||
// 校检文件大小
|
||||
if (props.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < props.fileSize;
|
||||
if (!isLt) {
|
||||
proxy?.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
proxy?.$modal.loading('正在上传文件,请稍候...');
|
||||
number.value++;
|
||||
return true;
|
||||
};
|
||||
|
||||
// 文件个数超出
|
||||
const handleExceed = () => {
|
||||
proxy?.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`);
|
||||
};
|
||||
|
||||
// 上传失败
|
||||
const handleUploadError = () => {
|
||||
proxy?.$modal.msgError('上传文件失败');
|
||||
};
|
||||
|
||||
// 上传成功回调
|
||||
const handleUploadSuccess = (res: any, file: UploadFile) => {
|
||||
if (res.code === 200) {
|
||||
// uploadList.value.push({
|
||||
// name: res.data.fileName,
|
||||
// url: res.data.url,
|
||||
// ossId: res.data.ossId
|
||||
// });
|
||||
// uploadedSuccessfully();
|
||||
ElMessage.success('上传文件成功');
|
||||
proxy?.$modal.closeLoading();
|
||||
} else {
|
||||
number.value--;
|
||||
proxy?.$modal.closeLoading();
|
||||
proxy?.$modal.msgError(res.msg);
|
||||
fileUploadRef.value?.handleRemove(file);
|
||||
uploadedSuccessfully();
|
||||
}
|
||||
};
|
||||
|
||||
// 删除文件
|
||||
const handleDelete = (index: number) => {
|
||||
let ossId = fileList.value[index].ossId;
|
||||
delOss(ossId);
|
||||
fileList.value.splice(index, 1);
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
};
|
||||
|
||||
// 上传结束处理
|
||||
const uploadedSuccessfully = () => {
|
||||
if (number.value > 0 && uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
|
||||
uploadList.value = [];
|
||||
number.value = 0;
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
proxy?.$modal.closeLoading();
|
||||
}
|
||||
};
|
||||
|
||||
// 获取文件名称
|
||||
const getFileName = (name: string) => {
|
||||
// 如果是url那么取最后的名字 如果不是直接返回
|
||||
if (name.lastIndexOf('/') > -1) {
|
||||
return name.slice(name.lastIndexOf('/') + 1);
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
const listToString = (list: any[], separator?: string) => {
|
||||
let strs = '';
|
||||
separator = separator || ',';
|
||||
list.forEach((item) => {
|
||||
if (item.ossId) {
|
||||
strs += item.ossId + separator;
|
||||
}
|
||||
});
|
||||
return strs != '' ? strs.substring(0, strs.length - 1) : '';
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.upload-file-uploader {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.upload-file-list .el-upload-list__item {
|
||||
border: 1px solid #e4e7ed;
|
||||
line-height: 2;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.upload-file-list .ele-upload-list__item-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.ele-upload-list__item-content-action .el-link {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
@ -101,6 +101,11 @@
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleBlock" v-hasRoles="['wuliu']" v-hasPermi="['amz:inquiryRequest:export']"
|
||||
>屏蔽报价
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -108,9 +113,11 @@
|
||||
<el-table v-loading="loading" :data="inquiryRequestList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="询价单号" align="center" prop="inquiryNo" />
|
||||
<el-table-column label="发起人" align="center" prop="requesterName" />
|
||||
<!-- <el-table-column label="发起人" align="center" prop="requesterName" />-->
|
||||
<!-- <el-table-column label="目标物流商ID列表" align="center" prop="targetProviders" />-->
|
||||
<el-table-column label="目的地" align="center" prop="destination" />
|
||||
<el-table-column label="国家" align="center" prop="shipToAddress.countryCode" />
|
||||
<el-table-column label="邮编" align="center" prop="shipToAddress.postalCode" />
|
||||
<el-table-column label="运输方式" align="center" prop="transportChannel">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="biz_shipping_method" :value="scope.row.transportChannel" />
|
||||
@ -138,9 +145,9 @@
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasRoles="['superadmin']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="提交报价" placement="top">
|
||||
<el-button link type="primary" icon="CircleCheck" @click="handleSubmit(scope.row)" v-hasRoles="['wuliu']"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-button size="small" link type="primary" @click="handleSubmit(scope.row)" v-hasRoles="['wuliu']"> 提交报价 </el-button>
|
||||
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
@ -232,6 +239,12 @@
|
||||
</el-input-number>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="6"></el-col>
|
||||
<el-col :span="12">
|
||||
<el-tag class="mb5" type="warning">请提供从收货到签收的时效,并非开船后时效</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时效" prop="leadTime">
|
||||
<div class="kgprice">
|
||||
<el-input-number v-model="minDay" :min="1" :max="100">
|
||||
@ -248,7 +261,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="附加费" prop="surcharge">
|
||||
<el-input-number v-model="quoteForm.surcharge" :precision="2" :step="0.1" :min="1" :max="100">
|
||||
<el-input-number v-model="quoteForm.surcharge" :precision="2" :step="0.1" :min="0" :max="100">
|
||||
<template #suffix>
|
||||
<span>元</span>
|
||||
</template>
|
||||
@ -262,7 +275,6 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="choeseDate"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报价备注" prop="remark">
|
||||
@ -273,6 +285,9 @@
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="后端物流类型" prop="backLogisticsType">
|
||||
<el-input v-model="quoteForm.backLogisticsType" placeholder="请输入后端物流类型" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -286,10 +301,18 @@
|
||||
</template>
|
||||
|
||||
<script setup name="InquiryRequest" lang="ts">
|
||||
import { listInquiryRequest, getInquiryRequest, delInquiryRequest, addInquiryRequest, updateInquiryRequest } from '@/api/amz/inquiryRequest';
|
||||
import {
|
||||
listInquiryRequest,
|
||||
getInquiryRequest,
|
||||
delInquiryRequest,
|
||||
addInquiryRequest,
|
||||
updateInquiryRequest,
|
||||
insertList
|
||||
} from '@/api/amz/inquiryRequest';
|
||||
import { InquiryRequestVO, InquiryRequestQuery, InquiryRequestForm } from '@/api/amz/inquiryRequest/types';
|
||||
import { LogisticsMostQuoteForm, LogisticsQuoteForm } from '@/api/amz/logisticsQuote/types';
|
||||
import { addMostLogisticsQuote, checkPriceQuoteByBo, getTodayQuoteStatus } from '@/api/amz/logisticsQuote';
|
||||
import { ShipmentPlanVO } from '@/api/amz/shipmentPlan/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -340,7 +363,7 @@ const initQuoteForm: LogisticsMostQuoteForm = {
|
||||
transportChannel: undefined,
|
||||
price: 10,
|
||||
leadTime: 10,
|
||||
surcharge: undefined,
|
||||
surcharge: 0,
|
||||
channelName: undefined,
|
||||
quoteStartDate: undefined,
|
||||
quoteEndDate: undefined,
|
||||
@ -350,7 +373,8 @@ const initQuoteForm: LogisticsMostQuoteForm = {
|
||||
channelType: undefined,
|
||||
channelId: undefined,
|
||||
isDdp: 'Y',
|
||||
unit: 'kg'
|
||||
unit: 'kg',
|
||||
backLogisticsType: '快递'
|
||||
};
|
||||
const data = reactive<PageData<InquiryRequestForm, InquiryRequestQuery>>({
|
||||
form: { ...initFormData },
|
||||
@ -444,6 +468,18 @@ const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
const selectionDatas = ref<InquiryRequestVO[]>();
|
||||
|
||||
const handleBlock = async () => {
|
||||
console.log('selectionDatas', selectionDatas);
|
||||
const ids = selectionDatas.value.map((item) => item.id);
|
||||
const res = await insertList(ids);
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('批量屏蔽成功');
|
||||
getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
@ -456,6 +492,7 @@ const handleSelectionChange = (selection: InquiryRequestVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
selectionDatas.value = selection;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
|
@ -3,8 +3,8 @@
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="80px">
|
||||
<el-form-item label="FBA货件" prop="fbaShipmentId">
|
||||
<el-input v-model="queryParams.fbaShipmentId" placeholder="请输入FBA货件编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
@ -61,12 +61,12 @@
|
||||
<el-table-column label="目的地仓库名称或编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="总货件数量" align="center" prop="shipmentQuantity" />
|
||||
<el-table-column label="亚马逊仓库实际上架日期" align="center" prop="amazonShelfDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.amazonShelfDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上架时效" align="center" prop="shelfTimeliness" />
|
||||
<!-- <el-table-column label="亚马逊仓库实际上架日期" align="center" prop="amazonShelfDate" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.amazonShelfDate, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="上架时效" align="center" prop="shelfTimeliness" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
@ -80,7 +80,14 @@
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['amz:logisticsOrder:remove']"></el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasRoles="['manager']"
|
||||
v-hasPermi="['amz:logisticsOrder:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-button link size="small" type="primary" @click="openDetail(scope.row)" v-hasRoles="['wuliu']"> 编辑订单明细 </el-button>
|
||||
</template>
|
||||
@ -153,6 +160,17 @@
|
||||
<el-col :span="1.5">
|
||||
<OrderDetailFileUpload :file-type="['xlsx', 'xls']" :file-size="20" />
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<file-custom-upload
|
||||
:title-name="'上传POD单号'"
|
||||
v-model="fileList"
|
||||
:limit="1"
|
||||
:file-size="1"
|
||||
:file-type="['pdf', 'doc', 'docx']"
|
||||
:is-show-tip="true"
|
||||
:file-data="orderData"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<HotTable class="hot-container" ref="hotTable" :settings="hotSettings" :data="processedData" :key="tableKey"></HotTable>
|
||||
<pagination
|
||||
@ -208,6 +226,8 @@ const processedData = computed(() => {
|
||||
}));
|
||||
});
|
||||
|
||||
const fileList = ref([]);
|
||||
|
||||
const hotTableDrawer = ref(false);
|
||||
|
||||
const statusOptions = computed(() => biz_logistics_status.value.map((item) => item.label));
|
||||
@ -227,6 +247,10 @@ const labelTovalueMap = computed(() => {
|
||||
}, {});
|
||||
});
|
||||
|
||||
const orderData = ref({
|
||||
order: ''
|
||||
});
|
||||
|
||||
// 表格配置-------
|
||||
const hotSettings = ref({
|
||||
licenseKey: 'non-commercial-and-evaluation',
|
||||
@ -290,14 +314,14 @@ const hotSettings = ref({
|
||||
'订单号',
|
||||
'FBA货件编号',
|
||||
'FBA箱号',
|
||||
'物流商名称',
|
||||
// '物流商名称',
|
||||
'物流渠道',
|
||||
'目的地仓库',
|
||||
'计划数量',
|
||||
'实际数量',
|
||||
'数量',
|
||||
// '实际数量',
|
||||
'物流追踪号',
|
||||
'物流商计重',
|
||||
'称重差异',
|
||||
// '称重差异',
|
||||
'物流单价',
|
||||
'物流计价重量',
|
||||
'其他物流费用',
|
||||
@ -305,7 +329,7 @@ const hotSettings = ref({
|
||||
'物流状态',
|
||||
'预计签收日期',
|
||||
'实际签收日期',
|
||||
'运输时效',
|
||||
'报价时效',
|
||||
'操作'
|
||||
],
|
||||
columns: [
|
||||
@ -318,13 +342,12 @@ const hotSettings = ref({
|
||||
},
|
||||
{ data: 'orderId', className: 'htCenter', readOnly: true },
|
||||
{ data: 'fbaShipmentId', className: 'htCenter', readOnly: true },
|
||||
// ... 其他数据列配置
|
||||
{ data: 'fbaBoxNumber', className: 'htCenter', readOnly: true }, // FBA箱号
|
||||
{ data: 'logisticsProviderName', className: 'htCenter', readOnly: true }, // 物流商名称
|
||||
// { data: 'logisticsProviderName', className: 'htCenter', readOnly: true }, // 物流商名称
|
||||
{ data: 'logisticsChannel', className: 'htCenter', readOnly: true }, // 物流渠道
|
||||
{ data: 'destinationWarehouse', className: 'htCenter', readOnly: true }, // 目的地仓库
|
||||
{ data: 'plannedQuantity', className: 'htCenter', readOnly: true }, // 计划数量
|
||||
{ data: 'shipmentQuantity', className: 'htCenter', readOnly: false, type: 'numeric' }, // 实际数量
|
||||
// { data: 'shipmentQuantity', className: 'htCenter', readOnly: false, type: 'numeric' }, // 实际数量
|
||||
{ data: 'trackingNumber', className: 'htCenter', readOnly: false }, // 物流追踪号
|
||||
{
|
||||
data: 'logisticsWeight',
|
||||
@ -342,19 +365,19 @@ const hotSettings = ref({
|
||||
return td;
|
||||
}
|
||||
}, // 物流商计重
|
||||
{
|
||||
data: 'weightDiff', // 称重差异
|
||||
className: 'htCenter',
|
||||
readOnly: true,
|
||||
type: 'numeric',
|
||||
renderer: (instance, td) => {
|
||||
// 添加差异颜色标识
|
||||
const value = instance.getDataAtCell(td.row, td.col);
|
||||
td.style.color = value > 0 ? '#67C23A' : '#F56C6C';
|
||||
td.innerText = value;
|
||||
return td;
|
||||
}
|
||||
},
|
||||
// {
|
||||
// data: 'weightDiff', // 称重差异
|
||||
// className: 'htCenter',
|
||||
// readOnly: true,
|
||||
// type: 'numeric',
|
||||
// renderer: (instance, td) => {
|
||||
// // 添加差异颜色标识
|
||||
// const value = instance.getDataAtCell(td.row, td.col);
|
||||
// td.style.color = value > 0 ? '#67C23A' : '#F56C6C';
|
||||
// td.innerText = value;
|
||||
// return td;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
data: 'pricePerKg',
|
||||
className: 'htCenter',
|
||||
@ -410,6 +433,7 @@ const hotSettings = ref({
|
||||
correctFormat: true, // 自动纠正格式
|
||||
// locale: 'zh-CN', // 本地化(中文)
|
||||
// className: 'htCenter', // 单元格内容居中
|
||||
readOnly: true,
|
||||
validator: (value, callback) => {
|
||||
if (value === '') {
|
||||
callback(true); // 允许空值
|
||||
@ -443,7 +467,7 @@ const hotSettings = ref({
|
||||
},
|
||||
{
|
||||
data: 'timeliness',
|
||||
readOnly: false,
|
||||
readOnly: true,
|
||||
width: 150,
|
||||
type: 'numeric',
|
||||
renderer: function (instance, td, row, col, prop, value, cellProperties) {
|
||||
@ -702,6 +726,7 @@ const openDetail = async (row?: LogisticsOrderVO) => {
|
||||
// logisticsOrderDetailList.value = res.rows;
|
||||
// detailTotal.value = res.total;
|
||||
// detailLoading.value = false;
|
||||
orderData.value.order = queryDetailParams.value.orderId;
|
||||
getDetailList();
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
||||
<el-table-column label="计划数量" align="center" prop="plannedQuantity" />
|
||||
<el-table-column label="实际货件数量" align="center" prop="shipmentQuantity" />
|
||||
<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="weightDiff" />
|
||||
<el-table-column label="物流单价" align="center" prop="pricePerKg" />
|
||||
@ -192,8 +192,8 @@
|
||||
<el-form-item label="物流追踪号" prop="trackingNumber">
|
||||
<el-input v-model="form.trackingNumber" placeholder="请输入物流追踪号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商称重" prop="supplierWeight">
|
||||
<el-input v-model="form.supplierWeight" placeholder="请输入供应商称重" />
|
||||
<el-form-item label="供应商称重-总重量" prop="supplierWeight">
|
||||
<el-input v-model="form.supplierWeight" placeholder="请输入供应商称重-总重量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商计重" prop="logisticsWeight">
|
||||
<el-input v-model="form.logisticsWeight" placeholder="请输入物流商计重" />
|
||||
@ -354,7 +354,7 @@ const hotSettings = ref({
|
||||
'计划数量',
|
||||
'实际货件数量',
|
||||
'物流追踪号',
|
||||
'供应商称重',
|
||||
'供应商称重-总重量',
|
||||
'物流商计重',
|
||||
'称重差异',
|
||||
'物流单价',
|
||||
@ -385,7 +385,7 @@ const hotSettings = ref({
|
||||
{ data: 'plannedQuantity', className: 'htCenter', readOnly: true }, // 计划数量
|
||||
{ data: 'actualShipmentQuantity', className: 'htCenter', readOnly: true }, // 实际货件数量
|
||||
{ data: 'trackingNumber', className: 'htCenter', readOnly: false }, // 物流追踪号
|
||||
{ data: 'supplierWeight', className: 'htCenter', readOnly: true }, // 供应商称重
|
||||
{ data: 'supplierWeight', className: 'htCenter', readOnly: true }, // 供应商称重-总重量
|
||||
{ data: 'logisticsWeight', className: 'htCenter', readOnly: true }, // 物流商计重
|
||||
{
|
||||
data: 'weightDiff', // 称重差异
|
||||
@ -595,7 +595,7 @@ const data = reactive<PageData<LogisticsOrderDetailForm, LogisticsOrderDetailQue
|
||||
plannedQuantity: [{ required: true, message: '计划数量不能为空', trigger: 'blur' }],
|
||||
shipmentQuantity: [{ required: true, message: '实际货件数量不能为空', trigger: 'blur' }],
|
||||
trackingNumber: [{ required: true, message: '物流追踪号不能为空', trigger: 'blur' }],
|
||||
supplierWeight: [{ required: true, message: '供应商称重不能为空', trigger: 'blur' }],
|
||||
supplierWeight: [{ required: true, message: '供应商称重-总重量不能为空', trigger: 'blur' }],
|
||||
logisticsWeight: [{ required: true, message: '物流商计重不能为空', trigger: 'blur' }],
|
||||
weightDiff: [{ required: true, message: '称重差异不能为空', trigger: 'blur' }],
|
||||
pricePerKg: [{ required: true, message: '物流单价不能为空', trigger: 'blur' }],
|
||||
|
350
src/views/amz/logisticsOrderQuotation/index.vue
Normal file
350
src/views/amz/logisticsOrderQuotation/index.vue
Normal file
@ -0,0 +1,350 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="80px">
|
||||
<el-form-item label="FBA货件" prop="fbaShipmentId">
|
||||
<el-input v-model="queryParams.fbaShipmentId" placeholder="请输入FBA货件编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="物流商ID" prop="logisticsProviderId">-->
|
||||
<!-- <el-input v-model="queryParams.logisticsProviderId" placeholder="请输入物流商ID" clearable @keyup.enter="handleQuery" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="物流商名称" prop="logisticsProviderName">-->
|
||||
<!-- <el-input v-model="queryParams.logisticsProviderName" placeholder="请输入物流商名称" clearable @keyup.enter="handleQuery" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="物流渠道" prop="channelName">
|
||||
<el-input v-model="queryParams.channelName" placeholder="请输入物流渠道" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地" prop="destination">
|
||||
<el-input v-model="queryParams.destination" placeholder="请输入目的地仓库名称或编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="总箱子数量" prop="boxQuantity">-->
|
||||
<!-- <el-input v-model="queryParams.boxQuantity" placeholder="请输入总箱子数量" clearable @keyup.enter="handleQuery" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="总货件数量" prop="shipmentQuantity">-->
|
||||
<!-- <el-input v-model="queryParams.shipmentQuantity" placeholder="请输入总货件数量" clearable @keyup.enter="handleQuery" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="报价单" prop="quoteOrderId">
|
||||
<el-input v-model="queryParams.quoteOrderId" placeholder="请输入根据哪个报价单生成的订单" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['amz:logisticsOrderQuotation:add']">新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['amz:logisticsOrderQuotation:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['amz:logisticsOrderQuotation:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['amz:logisticsOrderQuotation:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="logisticsOrderQuotationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderId" />
|
||||
<!-- <el-table-column label="物流商ID" align="center" prop="logisticsProviderId" />-->
|
||||
<!-- <el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />-->
|
||||
<el-table-column label="物流渠道" align="center" prop="channelName" />
|
||||
<el-table-column label="目的地仓库名称或编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="总货件数量" align="center" prop="shipmentQuantity" />
|
||||
<el-table-column label="报价单" align="center" prop="quoteOrderId" />
|
||||
<el-table-column label="是否已经确认" align="center" prop="isSta">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_zero_one" :value="scope.row.confirm" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<!-- <el-tooltip content="修改" placement="top">-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="Edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['amz:logisticsOrderQuotation:edit']"-->
|
||||
<!-- ></el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- <el-tooltip content="删除" placement="top">-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="Delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['amz:logisticsOrderQuotation:remove']"-->
|
||||
<!-- ></el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
|
||||
<el-button v-if="scope.row.confirm == '0'" link type="primary" size="small" @click="handleQuotation(scope.row)" v-hasRoles="['wuliu']">
|
||||
确认订单
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改物流订单确认对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="logisticsOrderQuotationFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="主键" prop="id">
|
||||
<el-input v-model="form.id" placeholder="请输入主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="FBA货件编号" prop="fbaShipmentId">
|
||||
<el-input v-model="form.fbaShipmentId" placeholder="请输入FBA货件编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商ID" prop="logisticsProviderId">
|
||||
<el-input v-model="form.logisticsProviderId" placeholder="请输入物流商ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流商名称" prop="logisticsProviderName">
|
||||
<el-input v-model="form.logisticsProviderName" placeholder="请输入物流商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流渠道" prop="channelName">
|
||||
<el-input v-model="form.channelName" placeholder="请输入物流渠道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地仓库名称或编码" prop="destination">
|
||||
<el-input v-model="form.destination" placeholder="请输入目的地仓库名称或编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总箱子数量" prop="boxQuantity">
|
||||
<el-input v-model="form.boxQuantity" placeholder="请输入总箱子数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总货件数量" prop="shipmentQuantity">
|
||||
<el-input v-model="form.shipmentQuantity" placeholder="请输入总货件数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="根据哪个报价单生成的订单" prop="quoteOrderId">
|
||||
<el-input v-model="form.quoteOrderId" placeholder="请输入根据哪个报价单生成的订单" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LogisticsOrderQuotation" lang="ts">
|
||||
import {
|
||||
listLogisticsOrderQuotation,
|
||||
getLogisticsOrderQuotation,
|
||||
delLogisticsOrderQuotation,
|
||||
addLogisticsOrderQuotation,
|
||||
updateLogisticsOrderQuotation,
|
||||
createLogisticsOrderQuotation
|
||||
} from '@/api/amz/logisticsOrderQuotation';
|
||||
import { LogisticsOrderQuotationVO, LogisticsOrderQuotationQuery, LogisticsOrderQuotationForm } from '@/api/amz/logisticsOrderQuotation/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { sys_zero_one } = toRefs<any>(proxy?.useDict('sys_zero_one'));
|
||||
|
||||
const logisticsOrderQuotationList = ref<LogisticsOrderQuotationVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const logisticsOrderQuotationFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: LogisticsOrderQuotationForm = {
|
||||
id: undefined,
|
||||
fbaShipmentId: undefined,
|
||||
orderId: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
channelName: undefined,
|
||||
destination: undefined,
|
||||
boxQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
quoteOrderId: undefined
|
||||
};
|
||||
const data = reactive<PageData<LogisticsOrderQuotationForm, LogisticsOrderQuotationQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fbaShipmentId: undefined,
|
||||
orderId: undefined,
|
||||
logisticsProviderId: undefined,
|
||||
logisticsProviderName: undefined,
|
||||
channelName: undefined,
|
||||
destination: undefined,
|
||||
boxQuantity: undefined,
|
||||
shipmentQuantity: undefined,
|
||||
quoteOrderId: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
|
||||
fbaShipmentId: [{ required: true, message: 'FBA货件编号不能为空', trigger: 'blur' }],
|
||||
orderId: [{ required: true, message: '订单编号不能为空', trigger: 'blur' }],
|
||||
logisticsProviderId: [{ required: true, message: '物流商ID不能为空', trigger: 'blur' }],
|
||||
logisticsProviderName: [{ required: true, message: '物流商名称不能为空', trigger: 'blur' }],
|
||||
channelName: [{ required: true, message: '物流渠道不能为空', trigger: 'blur' }],
|
||||
destination: [{ required: true, message: '目的地仓库名称或编码不能为空', trigger: 'blur' }],
|
||||
boxQuantity: [{ required: true, message: '总箱子数量不能为空', trigger: 'blur' }],
|
||||
shipmentQuantity: [{ required: true, message: '总货件数量不能为空', trigger: 'blur' }],
|
||||
quoteOrderId: [{ required: true, message: '根据哪个报价单生成的订单不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询物流订单确认列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listLogisticsOrderQuotation(queryParams.value);
|
||||
logisticsOrderQuotationList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
const handleQuotation = async (row?: LogisticsOrderQuotationVO) => {
|
||||
loading.value = true;
|
||||
const res = await createLogisticsOrderQuotation(row);
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('确认成功,已经创建订单');
|
||||
getList();
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
logisticsOrderQuotationFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: LogisticsOrderQuotationVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加物流订单确认';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: LogisticsOrderQuotationVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getLogisticsOrderQuotation(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物流订单确认';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
logisticsOrderQuotationFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateLogisticsOrderQuotation(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addLogisticsOrderQuotation(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: LogisticsOrderQuotationVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除物流订单确认编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delLogisticsOrderQuotation(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'amz/logisticsOrderQuotation/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`logisticsOrderQuotation_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -131,7 +131,7 @@
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasRoles="['wuliu']"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:logisticsQuote:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
|
@ -113,7 +113,7 @@
|
||||
<!-- <el-descriptions-item label="货件状态">{{ props.row.shipmentStatus }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输模式">{{ props.row.shippingMode }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输方案">{{ props.row.shippingSolution }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="创建时间">{{ parseTime(props.row.gmtCreate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="计划发货日期">{{ parseTime(props.row.staShipmentDate, '{y}-{m}-{d}') }} </el-descriptions-item>-->
|
||||
@ -267,61 +267,11 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="channelDialogVisible" title="查询报价" width="60%">
|
||||
<!-- <el-radio-group v-model="form.status">-->
|
||||
<!-- <el-radio v-for="dict in biz_transport_channel" :key="dict.value" :value="dict.value">-->
|
||||
<!-- {{ dict.label }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
|
||||
<!-- <el-radio-group v-model="form.status">-->
|
||||
<!-- <!– 按国家分组循环 –>-->
|
||||
<!-- <div v-for="(transportDict, country) in groupedChannels" :key="country">-->
|
||||
<!-- <!– 国家标题 –>-->
|
||||
<!-- <div class="country-title">{{ country }}</div>-->
|
||||
|
||||
<!-- <!– 运输方式子分组 –>-->
|
||||
<!-- <div-->
|
||||
<!-- v-for="(channels, transport) in transportDict"-->
|
||||
<!-- :key="transport"-->
|
||||
<!-- class="transport-group"-->
|
||||
<!-- >-->
|
||||
<!-- <el-radio-->
|
||||
<!-- v-for="dict in channels"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- border-->
|
||||
<!-- class="channel-item"-->
|
||||
<!-- >-->
|
||||
<!-- {{ transport }} - {{ getChannelName(dict.label) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<el-form :model="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item label="目的地仓库">
|
||||
<el-input v-model="currentDes" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道选择">
|
||||
<!-- <el-collapse v-model="activeCollapse">-->
|
||||
<!-- <!– 遍历国家分组 –>-->
|
||||
<!-- <el-collapse-item v-for="(countryGroup, country) in groupedChannels" :key="country" :title="getCountryName(country)" :name="country">-->
|
||||
<!-- <!– 遍历运输方式 –>-->
|
||||
<!-- <div v-for="(methodGroup, method) in countryGroup" :key="method">-->
|
||||
<!-- <div class="shipping-method-title">-->
|
||||
<!-- {{ getShippingMethodName(method) }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="selectedChannel" @change="handleChannelSelect">-->
|
||||
<!-- <!– 遍历具体渠道 –>-->
|
||||
<!-- <div v-for="channel in methodGroup" :key="channel.id" class="channel-item">-->
|
||||
<!-- <el-radio :label="channel.id">-->
|
||||
<!-- {{ getChannelLabel(channel.channelName) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- <div class="channel-description">{{ channel.description }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-collapse-item>-->
|
||||
<!-- </el-collapse>-->
|
||||
<el-cascader
|
||||
v-model="selectedChannel"
|
||||
placeholder="请选择渠道"
|
||||
|
@ -48,11 +48,23 @@
|
||||
>同步今天的货件
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="channelDialogVisibleAction" v-hasPermi="['amz:shipmentPlan:export']"
|
||||
>批量提交询价
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="shipmentPlanList" @current-change="handleCurrentChange" highlight-current-row ref="singleTableRef">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="shipmentPlanList"
|
||||
@selection-change="fbaDataSelectionChange"
|
||||
@current-change="handleCurrentChange"
|
||||
highlight-current-row
|
||||
ref="singleTableRef"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<el-descriptions size="small" border title="货件详情">
|
||||
@ -60,7 +72,7 @@
|
||||
<!-- <el-descriptions-item label="货件状态">{{ props.row.shipmentStatus }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输模式">{{ props.row.shippingMode }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输方案">{{ props.row.shippingSolution }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="创建时间">{{ parseTime(props.row.gmtCreate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="计划发货日期">{{ parseTime(props.row.staShipmentDate, '{y}-{m}-{d}') }} </el-descriptions-item>-->
|
||||
@ -69,7 +81,8 @@
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货日期" align="center" prop="gmtCreate" width="180">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="创建日期" align="center" prop="gmtCreate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.staShipmentDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
@ -78,22 +91,25 @@
|
||||
<el-table-column label="货件编号" align="center" prop="shipmentId" />
|
||||
<el-table-column label="商品详情" align="center">
|
||||
<template #default="scope">
|
||||
<el-popover placement="top" :width="600" trigger="hover" @show="showPop(scope.row)">
|
||||
<el-popover placement="top" :width="750" trigger="hover" @show="showPop(scope.row)">
|
||||
<template #reference>
|
||||
<el-button style="margin-right: 16px">查看</el-button>
|
||||
</template>
|
||||
<el-table :data="scope.row.itemVoList">
|
||||
<el-table-column width="200" property="productName" label="品名" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
<el-table-column width="150" property="asin" label="asin" />
|
||||
<el-table-column width="150" property="fnsku" label="fnsku" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
</el-table>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="国家" align="center" prop="shipToAddress.countryCode" />
|
||||
|
||||
<el-table-column label="物流中心编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="箱子尺寸" align="center" prop="boxSize" />
|
||||
<el-table-column label="供应商称重" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="供应商称重-总重量" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="套数" align="center" prop="setTotal" />
|
||||
<!-- <el-table-column label="渠道ID" align="center" prop="channelId" />-->
|
||||
|
||||
@ -112,13 +128,13 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:shipmentPlan:edit']"></el-button>
|
||||
<el-button link type="primary" size="small" @click="handleUpdate(scope.row)" v-hasPermi="['amz:shipmentPlan:edit']">询 价 </el-button>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip content="删除" placement="top">-->
|
||||
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['amz:shipmentPlan:remove']"></el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
|
||||
<el-button link type="primary" size="small" @click="handleSend(scope.row)" v-hasPermi="['amz:shipmentPlan:remove']">询价 </el-button>
|
||||
<!-- <el-button link type="primary" size="small" @click="handleSend(scope.row)" v-hasPermi="['amz:shipmentPlan:remove']">询价 </el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -128,6 +144,9 @@
|
||||
<!-- 添加或修改货件计划对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="shipmentPlanFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="shipDate" disabled type="date" placeholder="选择指定日期" value-format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货件编号" prop="shipmentId">
|
||||
<el-input v-model="form.shipmentId" placeholder="请输入货件编号" disabled />
|
||||
</el-form-item>
|
||||
@ -141,7 +160,7 @@
|
||||
<el-cascader
|
||||
ref="channelCascaderRef"
|
||||
v-model="selectedChannel"
|
||||
:props="{ emitPath: false }"
|
||||
:props="props"
|
||||
placeholder="请选择渠道"
|
||||
:options="groupedChannels"
|
||||
@change="cascaderChange"
|
||||
@ -153,10 +172,20 @@
|
||||
<el-input v-model="form.boxQuantity" placeholder="请输入总箱子数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="箱子尺寸" prop="boxSize">
|
||||
<el-input v-model="form.boxSize" placeholder="请输入箱子尺寸" />
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="plength" placeholder="请输入长" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="pwidth" placeholder="请输入宽" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="pheight" placeholder="请输入高" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商称重" prop="vendorWeight">
|
||||
<el-input v-model="form.vendorWeight" placeholder="请输入供应商称重" />
|
||||
<el-form-item label="供应商称重-总重量" prop="vendorWeight">
|
||||
<el-input v-model="form.vendorWeight" placeholder="请输入供应商称重-总重量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="套数" prop="setTotal">
|
||||
<el-input v-model="form.setTotal" placeholder="请输入套数" />
|
||||
@ -164,7 +193,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">提 交</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -177,76 +206,24 @@
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="channelDialogVisible" title="查询报价" width="60%">
|
||||
<!-- <el-radio-group v-model="form.status">-->
|
||||
<!-- <el-radio v-for="dict in biz_transport_channel" :key="dict.value" :value="dict.value">-->
|
||||
<!-- {{ dict.label }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
|
||||
<!-- <el-radio-group v-model="form.status">-->
|
||||
<!-- <!– 按国家分组循环 –>-->
|
||||
<!-- <div v-for="(transportDict, country) in groupedChannels" :key="country">-->
|
||||
<!-- <!– 国家标题 –>-->
|
||||
<!-- <div class="country-title">{{ country }}</div>-->
|
||||
|
||||
<!-- <!– 运输方式子分组 –>-->
|
||||
<!-- <div-->
|
||||
<!-- v-for="(channels, transport) in transportDict"-->
|
||||
<!-- :key="transport"-->
|
||||
<!-- class="transport-group"-->
|
||||
<!-- >-->
|
||||
<!-- <el-radio-->
|
||||
<!-- v-for="dict in channels"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- border-->
|
||||
<!-- class="channel-item"-->
|
||||
<!-- >-->
|
||||
<!-- {{ transport }} - {{ getChannelName(dict.label) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<el-form :model="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item label="目的地仓库">
|
||||
<el-input v-model="currentDes" disabled />
|
||||
<el-dialog v-model="channelDialogVisible" title="批量提交询价" width="60%">
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="shipDate" disabled type="date" placeholder="选择指定日期" value-format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
<el-form :model="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item label="渠道选择">
|
||||
<!-- <el-collapse v-model="activeCollapse">-->
|
||||
<!-- <!– 遍历国家分组 –>-->
|
||||
<!-- <el-collapse-item v-for="(countryGroup, country) in groupedChannels" :key="country" :title="getCountryName(country)" :name="country">-->
|
||||
<!-- <!– 遍历运输方式 –>-->
|
||||
<!-- <div v-for="(methodGroup, method) in countryGroup" :key="method">-->
|
||||
<!-- <div class="shipping-method-title">-->
|
||||
<!-- {{ getShippingMethodName(method) }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-radio-group v-model="selectedChannel" @change="handleChannelSelect">-->
|
||||
<!-- <!– 遍历具体渠道 –>-->
|
||||
<!-- <div v-for="channel in methodGroup" :key="channel.id" class="channel-item">-->
|
||||
<!-- <el-radio :label="channel.id">-->
|
||||
<!-- {{ getChannelLabel(channel.channelName) }}-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- <div class="channel-description">{{ channel.description }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-collapse-item>-->
|
||||
<!-- </el-collapse>-->
|
||||
<el-cascader
|
||||
v-model="selectedChannel"
|
||||
placeholder="请选择渠道"
|
||||
:props="{ emitPath: false }"
|
||||
:props="{ emitPath: false, multiple: true }"
|
||||
:options="groupedChannels"
|
||||
@change="cascaderChange"
|
||||
@change="batchCascaderChange"
|
||||
:show-all-levels="false"
|
||||
filterable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期选择">
|
||||
<el-date-picker v-model="shipDate" type="date" placeholder="Pick a day" value-format="YYYY-MM-DD" :size="size" />
|
||||
</el-form-item>
|
||||
<el-button :loading="buttonLoading" type="primary" @click="checkPrice()">查询报价</el-button>
|
||||
|
||||
<el-button :loading="buttonLoading" type="primary" @click="batchSendRest()">批量提交询价</el-button>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
@ -351,7 +328,7 @@ import {
|
||||
} from '@/api/amz/shipmentPlan';
|
||||
import { listAllLogisticsChannel } from '@/api/amz/logisticsChannel';
|
||||
import type { DrawerProps } from 'element-plus';
|
||||
import { createWithDesAndChannel, queryWithDesAndChannel } from '@/api/amz/inquiryRequest';
|
||||
import { createBatch, createWithDesAndChannel, queryWithDesAndChannel } from '@/api/amz/inquiryRequest';
|
||||
|
||||
import { queryLogisticsQuote } from '@/api/amz/logisticsQuote';
|
||||
|
||||
@ -360,6 +337,7 @@ import { ElTable } from 'element-plus';
|
||||
import { LogisticsQuoteVO } from '@/api/amz/logisticsQuote/types';
|
||||
import { createOrderForm } from '@/api/amz/logisticsOrder/types';
|
||||
import { createLogisticsOrder } from '@/api/amz/logisticsOrder';
|
||||
import { InquiryRequestItemVO } from '@/api/amz/inquiryRequest/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { biz_transport_channel } = toRefs<any>(proxy?.useDict('biz_transport_channel'));
|
||||
@ -375,6 +353,8 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const props = { emitPath: false, multiple: true };
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const shipmentPlanFormRef = ref<ElFormInstance>();
|
||||
|
||||
@ -464,7 +444,21 @@ const data = reactive<PageData<ShipmentPlanForm, ShipmentPlanQuery>>({
|
||||
shipToAddress: [{ required: true, message: '收货地址不能为空', trigger: 'blur' }],
|
||||
referenceId: [{ required: true, message: '参考编号不能为空', trigger: 'blur' }],
|
||||
staInboundPlanId: [{ required: true, message: '入库计划ID不能为空', trigger: 'blur' }],
|
||||
isSta: [{ required: true, message: '是否STA计划不能为空', trigger: 'blur' }]
|
||||
isSta: [{ required: true, message: '是否STA计划不能为空', trigger: 'blur' }],
|
||||
boxSize: [
|
||||
{
|
||||
required: true,
|
||||
message: '长宽高都不能为空',
|
||||
validator: (rule, value, callback) => {
|
||||
if (!plength.value || !pwidth.value || !pheight.value) {
|
||||
callback(new Error('长宽高都不能为空'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@ -492,9 +486,14 @@ const createOrder = async (row: ShipmentPlanVO) => {
|
||||
};
|
||||
|
||||
const dialogTableVisible = ref(false);
|
||||
const plength = ref<string | number>();
|
||||
const pheight = ref<string | number>();
|
||||
const pwidth = ref<string | number>();
|
||||
|
||||
const logisticsQuoteList = ref<LogisticsQuoteVO[]>([]);
|
||||
|
||||
const inquiryRequestItemVOList = ref<InquiryRequestItemVO[]>([]);
|
||||
|
||||
const tableData = ref([
|
||||
{
|
||||
channelId: '1902912289404719106',
|
||||
@ -513,6 +512,34 @@ const tableData = ref([
|
||||
}
|
||||
]);
|
||||
|
||||
const batchSendRest = async () => {
|
||||
console.log('selectionDatas=', selectionDatas);
|
||||
console.log('selectedChannel=', selectedChannel);
|
||||
channelDialogVisible.value = false;
|
||||
selectionDatas.value.forEach((item) => {
|
||||
selectedChannel.value.forEach((channel) => {
|
||||
const inquiryRequestItemVO = {
|
||||
destination: item.destination,
|
||||
channelId: channel,
|
||||
quoteDate: shipDate.value,
|
||||
shipToAddress: item.shipToAddress,
|
||||
shipmentId: item.shipmentId
|
||||
};
|
||||
inquiryRequestItemVOList.value.push(inquiryRequestItemVO);
|
||||
});
|
||||
});
|
||||
console.log('inquiryRequestItemVOList=', inquiryRequestItemVOList);
|
||||
|
||||
const res = await createBatch(inquiryRequestItemVOList.value);
|
||||
console.log('res', res);
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('批量发送成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error('批量发送失败');
|
||||
}
|
||||
};
|
||||
|
||||
// 时间格式化方法
|
||||
const formatTime = (timeString) => {
|
||||
return timeString.replace(' ', '\n'); // 换行显示日期时间
|
||||
@ -552,11 +579,33 @@ function cancelClick() {
|
||||
const channelCascaderRef = ref(null);
|
||||
const cascaderChange = (value) => {
|
||||
console.log(value);
|
||||
console.log('selectedChannel', selectedChannel);
|
||||
console.log('selectedChannel', selectedChannel.value);
|
||||
console.log('groupedChannels', groupedChannels);
|
||||
|
||||
// console.log('channelCascaderRef', channelCascaderRef);
|
||||
console.log('label====', channelCascaderRef.value.getCheckedNodes()[0].label);
|
||||
console.log('label====', channelCascaderRef.value.getCheckedNodes());
|
||||
};
|
||||
|
||||
const batchCascaderChange = (value) => {
|
||||
console.log(value);
|
||||
console.log('selectedChannel', selectedChannel.value);
|
||||
console.log('groupedChannels', groupedChannels);
|
||||
console.log('selectionDatas', selectionDatas.value);
|
||||
// console.log('channelCascaderRef', channelCascaderRef);
|
||||
// console.log('label====', channelCascaderRef.value.getCheckedNodes());
|
||||
};
|
||||
|
||||
const channelDialogVisibleAction = () => {
|
||||
if (selectionDatas.value === undefined || selectionDatas.value?.length === 0) {
|
||||
ElMessage.error('请选择需要批量提交的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
channelDialogVisible.value = true;
|
||||
console.log('channelDialogVisibleAction', selectionDatas.value.length);
|
||||
selectionDatas.value.forEach((item) => {
|
||||
console.log(item.channelId);
|
||||
});
|
||||
};
|
||||
|
||||
function confirmClick() {
|
||||
@ -723,6 +772,13 @@ const handleSelectionChange = (selection: ShipmentPlanVO[]) => {
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
const selectionDatas = ref<ShipmentPlanVO[]>();
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const fbaDataSelectionChange = (selection: ShipmentPlanVO[]) => {
|
||||
selectionDatas.value = selection;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
@ -736,13 +792,13 @@ const checkPrice = async () => {
|
||||
console.log('checkPrice', currentDes.value, selectedChannel.value);
|
||||
//查询报价单
|
||||
console.log('sshipDate.value', shipDate.value);
|
||||
if (currentFBAData.value.channelId == null) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请先设置渠道!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (currentFBAData.value.channelId == null) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '请先设置渠道!'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
const updateForm = ref({
|
||||
id: currentFBAData.value.id,
|
||||
@ -750,41 +806,66 @@ const checkPrice = async () => {
|
||||
});
|
||||
await updateShipmentPlan(updateForm.value).finally(() => (buttonLoading.value = false));
|
||||
|
||||
const res = await queryLogisticsQuote(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
console.log('查询报价单', res);
|
||||
if (res.total == 0) {
|
||||
//查询询价单
|
||||
const requestQuote = await queryWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
console.log('查询询价单', requestQuote);
|
||||
if (requestQuote.total == 0) {
|
||||
console.log('询价单也没数据');
|
||||
console.log('selectionDatas=', selectionDatas);
|
||||
console.log('selectedChannel=', selectedChannel);
|
||||
channelDialogVisible.value = false;
|
||||
const res2 = await createWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
console.log('checkPriceEnd2', res2);
|
||||
if (res2.code == 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '询价单创建成功'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
//显示询价单
|
||||
// channelDialogVisible.value = false;
|
||||
// dialogTableVisible.value = true;
|
||||
// tableData.value = requestQuote.rows;
|
||||
// console.log('requestQuote.rows', requestQuote.rows);
|
||||
// console.log('tableData', tableData.value);
|
||||
ElMessage.success('已经有人询价了');
|
||||
}
|
||||
} else {
|
||||
//显示报价单
|
||||
ElMessage.success('已经有人报价了');
|
||||
|
||||
// channelDialogVisible.value = false;
|
||||
// drawer.value = true;
|
||||
// logisticsQuoteList.value = res.rows;
|
||||
}
|
||||
selectedChannel.value.forEach((channel) => {
|
||||
const inquiryRequestItemVO = {
|
||||
destination: currentFBAData.value.destination,
|
||||
channelId: channel,
|
||||
quoteDate: shipDate.value,
|
||||
shipToAddress: currentFBAData.value.shipToAddress,
|
||||
shipmentId: currentFBAData.value.shipmentId
|
||||
};
|
||||
inquiryRequestItemVOList.value.push(inquiryRequestItemVO);
|
||||
});
|
||||
|
||||
console.log('inquiryRequestItemVOList=', inquiryRequestItemVOList);
|
||||
|
||||
const res = await createBatch(inquiryRequestItemVOList.value);
|
||||
console.log('res', res);
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('提交成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error('提交失败');
|
||||
}
|
||||
|
||||
// const res = await queryLogisticsQuote(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
// console.log('查询报价单', res);
|
||||
// if (res.total == 0) {
|
||||
// //查询询价单
|
||||
// const requestQuote = await queryWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
// console.log('查询询价单', requestQuote);
|
||||
// if (requestQuote.total == 0) {
|
||||
// console.log('询价单也没数据');
|
||||
// channelDialogVisible.value = false;
|
||||
// const res2 = await createWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
// console.log('checkPriceEnd2', res2);
|
||||
// if (res2.code == 200) {
|
||||
// ElMessage({
|
||||
// type: 'success',
|
||||
// message: '询价单创建成功'
|
||||
// });
|
||||
// }
|
||||
// } else {
|
||||
// //显示询价单
|
||||
// // channelDialogVisible.value = false;
|
||||
// // dialogTableVisible.value = true;
|
||||
// // tableData.value = requestQuote.rows;
|
||||
// // console.log('requestQuote.rows', requestQuote.rows);
|
||||
// // console.log('tableData', tableData.value);
|
||||
// ElMessage.success('已经有人询价了');
|
||||
// }
|
||||
// } else {
|
||||
// //显示报价单
|
||||
// ElMessage.success('已经有人报价了');
|
||||
//
|
||||
// // channelDialogVisible.value = false;
|
||||
// // drawer.value = true;
|
||||
// // logisticsQuoteList.value = res.rows;
|
||||
// }
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
@ -794,10 +875,22 @@ const handleUpdate = async (row?: ShipmentPlanVO) => {
|
||||
const res = await getShipmentPlan(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
console.log('form.value', form.value);
|
||||
|
||||
if (res.data.boxSize != null) {
|
||||
const arr: string[] = res.data.boxSize.split('*');
|
||||
if (arr.length > 0) {
|
||||
plength.value = arr[0];
|
||||
pwidth.value = arr[1];
|
||||
pheight.value = arr[2];
|
||||
}
|
||||
}
|
||||
selectedChannel.value = res.data.channelId;
|
||||
console.log('selectedChannel', selectedChannel);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改货件计划';
|
||||
dialog.title = '编辑货件计划开始询价';
|
||||
console.log(row);
|
||||
currentFBAData.value = row;
|
||||
currentDes.value = row.destination;
|
||||
};
|
||||
|
||||
const handleSend = async (row?: ShipmentPlanVO) => {
|
||||
@ -829,15 +922,15 @@ const submitForm = () => {
|
||||
// console.log('channelCascaderRef', channelCascaderRef);
|
||||
console.log('label====', channelCascaderRef.value.getCheckedNodes()[0].label);
|
||||
form.value.channelName = channelCascaderRef.value.getCheckedNodes()[0].label;
|
||||
form.value.channelId = selectedChannel;
|
||||
// form.value.channelId = selectedChannel;
|
||||
const updateForm = ref({
|
||||
id: form.value.id,
|
||||
boxQuantity: form.value.boxQuantity,
|
||||
boxSize: form.value.boxSize,
|
||||
boxSize: plength.value + '*' + pwidth.value + '*' + pheight.value,
|
||||
vendorWeight: form.value.vendorWeight,
|
||||
setTotal: form.value.setTotal,
|
||||
channelId: selectedChannel,
|
||||
channelName: channelCascaderRef.value.getCheckedNodes()[0].label
|
||||
setTotal: form.value.setTotal
|
||||
// channelId: selectedChannel,
|
||||
// channelName: channelCascaderRef.value.getCheckedNodes()[0].label
|
||||
});
|
||||
shipmentPlanFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
@ -849,7 +942,9 @@ const submitForm = () => {
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
// await getList();
|
||||
|
||||
checkPrice();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -65,21 +65,21 @@
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<el-descriptions size="small" border title="货件详情">
|
||||
<el-descriptions-item label="货件名称">{{ props.row.shipmentName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="货件名称">{{ props.row.shipmentName }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="货件状态">{{ props.row.shipmentStatus }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输模式">{{ props.row.shippingMode }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输方案">{{ props.row.shippingSolution }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="创建时间">{{ props.row.gmtCreate }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="计划发货日期">{{ parseTime(props.row.staShipmentDate, '{y}-{m}-{d}') }} </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="预计到货开始日">{{ parseTime(props.row.staDeliveryStartDate, '{y}-{m}-{d}') }} </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="预计到货截止日">{{ parseTime(props.row.staDeliveryEndDate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
-->
|
||||
<el-descriptions-item label="时效">{{ props.row.quote.leadTime + ' 天' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单创建时间">{{ props.row.order.createTime }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="时效">{{ props.row.quote.leadTime + ' 天' }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="订单创建时间">{{ props.row.order.createTime }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="亚马逊接收日期">{{ props.row.receivingTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="亚马逊接收时间">{{ props.row.receivingTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="上架天数">{{ props.row.order.createTime }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
@ -93,15 +93,15 @@
|
||||
<el-table-column label="货件编号" align="center" prop="shipmentId" />
|
||||
<el-table-column label="商品详情" align="center">
|
||||
<template #default="scope">
|
||||
<el-popover placement="top" :width="600" trigger="hover" @show="showPop(scope.row)">
|
||||
<el-popover placement="top" :width="750" trigger="hover" @show="showPop(scope.row)">
|
||||
<template #reference>
|
||||
<el-button style="margin-right: 16px">查看</el-button>
|
||||
</template>
|
||||
<el-table :data="scope.row.itemVoList">
|
||||
<el-table-column width="200" property="productName" label="品名" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
<el-table-column width="150" property="asin" label="asin" />
|
||||
|
||||
<el-table-column width="150" property="fnsku" label="fnsku" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
</el-table>
|
||||
</el-popover>
|
||||
</template>
|
||||
@ -111,14 +111,14 @@
|
||||
<el-button @click="openDetailDialog(row.detailList)"> 查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="物流中心编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="箱子尺寸" align="center" prop="boxSize" />
|
||||
<el-table-column label="供应商称重" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="套数" align="center" prop="setTotal" />
|
||||
<!-- <el-table-column label="箱子尺寸" align="center" prop="boxSize" />-->
|
||||
<el-table-column label="供应商称重-总重量" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="物流称重-总重量" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="称重差异" align="center" prop="vendorWeight" />
|
||||
<!-- <el-table-column label="渠道ID" align="center" prop="channelId" />-->
|
||||
|
||||
<el-table-column width="150" label="仓库配送地址" align="center" prop="shipToAddress">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="openAddressDialog(row.shipToAddress)"> 查看详情</el-button>
|
||||
@ -214,15 +214,15 @@
|
||||
<el-table-column label="FBA货件编号" align="center" prop="fbaShipmentId" />
|
||||
<el-table-column label="FBA箱号" align="center" prop="fbaBoxNumber" />
|
||||
<el-table-column label="物流商名称" align="center" prop="logisticsProviderName" />
|
||||
<el-table-column label="实际货件数量" align="center" prop="shipmentQuantity" />
|
||||
<el-table-column label="物流称重" align="center" prop="logisticsWeight">
|
||||
<template #default="scope">
|
||||
{{ scope.row.logisticsWeight != null ? `${scope.row.logisticsWeight} kg` : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物流渠道" align="center" prop="channelName" />
|
||||
<!-- <el-table-column label="物流称重" align="center" prop="logisticsWeight">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ scope.row.logisticsWeight != null ? `${scope.row.logisticsWeight} kg` : '' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="物流追踪号" align="center" prop="trackingNumber">
|
||||
<template #default="scope">
|
||||
<el-link :underline="true" type="success" :href="`https://t.17track.net/zh-cn#nums=${scope.row.trackingNumber}`" target="_blank">
|
||||
<el-link type="success" :href="`https://t.17track.net/zh-cn#nums=${scope.row.trackingNumber}`" target="_blank">
|
||||
{{ scope.row.trackingNumber }}
|
||||
</el-link>
|
||||
</template>
|
||||
|
@ -69,7 +69,7 @@
|
||||
<!-- <el-descriptions-item label="货件状态">{{ props.row.shipmentStatus }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输模式">{{ props.row.shippingMode }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="运输方案">{{ props.row.shippingSolution }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="入库计划ID">{{ props.row.staInboundPlanId }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="创建时间">{{ parseTime(props.row.gmtCreate, '{y}-{m}-{d}') }} </el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="计划发货日期">{{ parseTime(props.row.staShipmentDate, '{y}-{m}-{d}') }} </el-descriptions-item>-->
|
||||
@ -78,23 +78,24 @@
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货日期" align="center" prop="gmtCreate" width="180">
|
||||
<el-table-column label="创建日期" align="center" prop="gmtCreate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.staShipmentDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="店铺名称" align="center" prop="sellerName" />
|
||||
<el-table-column label="货件编号" align="center" prop="shipmentId" />
|
||||
<el-table-column label="商品详情" align="center">
|
||||
<template #default="scope">
|
||||
<el-popover placement="top" :width="600" trigger="hover" @show="showPop(scope.row)">
|
||||
<el-popover placement="top" :width="750" trigger="hover" @show="showPop(scope.row)">
|
||||
<template #reference>
|
||||
<el-button style="margin-right: 16px">查看</el-button>
|
||||
</template>
|
||||
<el-table :data="scope.row.itemVoList">
|
||||
<el-table-column width="200" property="productName" label="品名" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
<el-table-column width="150" property="asin" label="asin" />
|
||||
<el-table-column width="150" property="fnsku" label="fnsku" />
|
||||
<el-table-column width="200" property="msku" label="msku" />
|
||||
</el-table>
|
||||
</el-popover>
|
||||
</template>
|
||||
@ -102,7 +103,7 @@
|
||||
<el-table-column label="物流中心编码" align="center" prop="destination" />
|
||||
<el-table-column label="总箱子数量" align="center" prop="boxQuantity" />
|
||||
<el-table-column label="箱子尺寸" align="center" prop="boxSize" />
|
||||
<el-table-column label="供应商称重" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="供应商称重-总重量" align="center" prop="vendorWeight" />
|
||||
<el-table-column label="套数" align="center" prop="setTotal" />
|
||||
<!-- <el-table-column label="渠道ID" align="center" prop="channelId" />-->
|
||||
|
||||
@ -116,12 +117,24 @@
|
||||
<el-tag>{{ scope.row.shipmentStatus }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物流渠道" align="center" prop="channelName" />
|
||||
<!-- <el-table-column label="物流渠道" align="center" prop="channelName" />-->
|
||||
<el-table-column label="物流状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag>未确认</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['amz:shipmentPlan:edit']"></el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasRoles="['superadmin']"
|
||||
v-hasPermi="['amz:shipmentPlan:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip content="删除" placement="top">-->
|
||||
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['amz:shipmentPlan:remove']"></el-button>-->
|
||||
@ -164,8 +177,8 @@
|
||||
<el-form-item label="箱子尺寸" prop="boxSize">
|
||||
<el-input v-model="form.boxSize" placeholder="请输入箱子尺寸" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商称重" prop="vendorWeight">
|
||||
<el-input v-model="form.vendorWeight" placeholder="请输入供应商称重" />
|
||||
<el-form-item label="供应商称重-总重量" prop="vendorWeight">
|
||||
<el-input v-model="form.vendorWeight" placeholder="请输入供应商称重-总重量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="套数" prop="setTotal">
|
||||
<el-input v-model="form.setTotal" placeholder="请输入套数" />
|
||||
@ -362,7 +375,7 @@ import { listAllLogisticsChannel } from '@/api/amz/logisticsChannel';
|
||||
import type { DrawerProps } from 'element-plus';
|
||||
import { createWithDesAndChannel, queryWithDesAndChannel } from '@/api/amz/inquiryRequest';
|
||||
|
||||
import { queryLogisticsQuote } from '@/api/amz/logisticsQuote';
|
||||
import { queryLogisticsQuote, queryLogisticsQuoteWithDes } from '@/api/amz/logisticsQuote';
|
||||
|
||||
import { ShipmentPlanVO, ShipmentPlanQuery, ShipmentPlanForm } from '@/api/amz/shipmentPlan/types';
|
||||
import { ElTable } from 'element-plus';
|
||||
@ -756,15 +769,15 @@ const checkPrice = async () => {
|
||||
console.log('checkPrice', currentDes.value, selectedChannel.value);
|
||||
//查询报价单
|
||||
console.log('sshipDate.value', shipDate.value);
|
||||
if (currentFBAData.value.channelId == null) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请先设置渠道!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (currentFBAData.value.channelId == null) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '请先设置渠道!'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
const res = await queryLogisticsQuote(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
const res = await queryLogisticsQuoteWithDes(currentDes.value, shipDate.value);
|
||||
console.log('查询报价单', res);
|
||||
if (res.total == 0) {
|
||||
// //查询询价单
|
||||
@ -777,12 +790,6 @@ const checkPrice = async () => {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// .then(async () => {
|
||||
// const res2 = await createWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
// console.log('checkPriceEnd2', res2);
|
||||
// if (res2.code == 200) {
|
||||
// ElMessage({
|
||||
// type: 'success',
|
||||
// message: '询价单创建成功'
|
||||
// });
|
||||
@ -802,7 +809,13 @@ const checkPrice = async () => {
|
||||
// // console.log('requestQuote.rows', requestQuote.rows);
|
||||
// // console.log('tableData', tableData.value);
|
||||
// ElMessage.success('已经有人询价了');
|
||||
// }
|
||||
// } // })
|
||||
// .then(async () => {
|
||||
// const res2 = await createWithDesAndChannel(currentDes.value, currentFBAData.value.channelId, shipDate.value);
|
||||
// console.log('checkPriceEnd2', res2);
|
||||
// if (res2.code == 200) {
|
||||
// ElMessage({
|
||||
|
||||
ElMessage.warning('暂时没有物流商报价');
|
||||
} else {
|
||||
//显示报价单
|
||||
@ -833,7 +846,6 @@ const handleSend = async (row?: ShipmentPlanVO) => {
|
||||
checkPrice();
|
||||
};
|
||||
|
||||
|
||||
const showPop = async (row: any) => {
|
||||
console.log('row', row);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user