Commit c886d29c authored by dragondean@qq.com's avatar dragondean@qq.com

海运价格编辑单询不校验价格

parent 77a31264
......@@ -952,10 +952,10 @@ export default {
isAllProduct: 0,
});
if (this.form.needOrderInquiry == 0) {
//不是单询价才校验价格参数 lanbm 2024-06-17
// 阶梯价
if (this.form.stepPrice) {
// 阶梯价
if (this.form.stepPrice) {
// 单询不校验
if (this.form.needOrderInquiry == 0) {
let isValid = true;
for (let stepPrice of this.$refs.stepPrice) {
if (!stepPrice.validate()) {
......@@ -964,26 +964,29 @@ export default {
}
}
if (!isValid) return;
}
// 全包价
if (this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(
this.form.fullPriceStepList
);
delete data.clearancePriceStepList;
delete data.freightPriceStepList;
} else {
data.clearancePriceStepList = this.getPriceList(
this.form.clearancePriceStepList
);
data.freightPriceStepList = this.getPriceList(
this.form.freightPriceStepList
);
delete data.fullPriceStepList;
}
// 全包价
if (this.form.priceType == 1) {
data.fullPriceStepList = this.getPriceList(
this.form.fullPriceStepList
);
delete data.clearancePriceStepList;
delete data.freightPriceStepList;
} else {
data.clearancePriceStepList = this.getPriceList(
this.form.clearancePriceStepList
);
data.freightPriceStepList = this.getPriceList(
this.form.freightPriceStepList
);
delete data.fullPriceStepList;
}
//海运非阶梯价校验
else {
}
//海运非阶梯价校验
else {
// 单询不校验
if (this.form.needOrderInquiry == 0) {
// 有多个组件则表示清关费 + 运费
if (this.$refs.seaPrice?.length) {
let isValid = true;
......@@ -999,48 +1002,47 @@ export default {
else if (this.$refs.seaPrice && !this.$refs.seaPrice.validate()) {
return;
}
}
// 格式化
if (this.form.priceType === 1) {
data.fullPricePackagingList = this.getPackingPrice(
data.fullPricePackagingList
);
delete data.freightPricePackagingList;
delete data.clearancePricePackagingList;
} else {
data.freightPricePackagingList = this.getPackingPrice(
data.freightPricePackagingList
);
data.clearancePricePackagingList = this.getPackingPrice(
data.clearancePricePackagingList
);
delete data.fullPricePackagingList;
}
// 删除阶梯价字段
delete data.freightPriceStepList;
delete data.fullPriceStepList;
delete data.clearancePriceStepList;
// 格式化
if (this.form.priceType === 1) {
data.fullPricePackagingList = this.getPackingPrice(
data.fullPricePackagingList
);
delete data.freightPricePackagingList;
delete data.clearancePricePackagingList;
} else {
data.freightPricePackagingList = this.getPackingPrice(
data.freightPricePackagingList
);
data.clearancePricePackagingList = this.getPackingPrice(
data.clearancePricePackagingList
);
delete data.fullPricePackagingList;
}
// 设置了有效期,且已过期则给提示
if (this.form.validateEndDate && force !== true) {
let validateEndDate = new Date(this.form.validateEndDate);
if (validateEndDate.getTime() < Date.now()) {
return this.$confirm(
"您设置的线路价格已过期,确定提交吗?",
"提示",
{
confirmButtonText: "确认提交",
cancelButtonText: "取消提交",
type: "warning",
}
).then((res) => {
this.submitForm(true);
});
}
// 删除阶梯价字段
delete data.freightPriceStepList;
delete data.fullPriceStepList;
delete data.clearancePriceStepList;
}
// 设置了有效期,且已过期则给提示
if (this.form.validateEndDate && force !== true) {
let validateEndDate = new Date(this.form.validateEndDate);
if (validateEndDate.getTime() < Date.now()) {
return this.$confirm(
"您设置的线路价格已过期,确定提交吗?",
"提示",
{
confirmButtonText: "确认提交",
cancelButtonText: "取消提交",
type: "warning",
}
).then((res) => {
this.submitForm(true);
});
}
}
// 修改单条路线
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment