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

Merge branch 'fix/price_query' into dev

parents add76b69 79ad5b69
......@@ -1047,12 +1047,13 @@
:placeholder="$t('整数或者两位小数')"
class="w100"
/>
<span
>{{ currencyMap[scope.row.seaFreightCurrency] }} /
{{ unitMap[scope.row.seaFreightVolume] }}</span
>
<!-- <selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> -->
{{ currencyMap[scope.row.seaFreightCurrency] }} /
{{ unitMap[scope.row.seaFreightVolume] }}
<!--template v-else>
<selector v-model="scope.row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" class="w100" />
/
<selector v-model="scope.row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" class="w100" />
</template-->
</div>
</div>
<div v-else class="channel">
......@@ -1100,12 +1101,12 @@
:placeholder="$t('整数或者两位小数')"
class="w100"
/>
<span
>{{ currencyMap[scope.row.clearanceFreightCurrency] }} /
{{ unitMap[scope.row.clearanceFreightVolume] }}</span
>
<!-- <selector v-model="scope.row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" />
/ <selector v-model="scope.row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 class="w100" /> -->
{{ currencyMap[scope.row.clearanceFreightCurrency] }} /
{{ unitMap[scope.row.clearanceFreightVolume] }}
<!--
<selector v-model="scope.row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" class="w100" />
/ <selector v-model="scope.row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" class="w100" />
-->
</div>
</div>
<div v-else>
......@@ -1193,12 +1194,14 @@
type="number"
:placeholder="$t('整数或者两位小数')"
/>
<span
>{{ currencyMap[row.seaFreightCurrency] }} /
{{ unitMap[row.seaFreightVolume] }}</span
>
<!-- <selector style="width:100px" v-model="row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
/ <selector style="width:100px" v-model="row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 /> -->
<span v-if="!unitChangable">
{{ currencyMap[row.seaFreightCurrency] }} /
{{ unitMap[row.seaFreightVolume] }}
</span>
<template v-else>
<selector style="width:100px" v-model="row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
/ <selector style="width:100px" v-model="row.seaFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 />
</template>
</div>
</div>
</div>
......@@ -1221,12 +1224,14 @@
type="number"
:placeholder="$t('整数或者两位小数')"
/>
<span
>{{ currencyMap[row.clearanceFreightCurrency] }} /
{{ unitMap[row.clearanceFreightVolume] }}</span
>
<!-- <selector style="width:100px" v-model="row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
/ <selector style="width:100px" v-model="row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 /> -->
<span v-if="!unitChangable">
{{ currencyMap[row.clearanceFreightCurrency] }} /
{{ unitMap[row.clearanceFreightVolume] }}
</span>
<template v-else>
<selector style="width:100px" v-model="row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" />
/ <selector style="width:100px" v-model="row.clearanceFreightVolume" :options="unitList" :label-field="$l('title')" value-field="id" />
</template>
</div>
</div>
</div>
......@@ -2280,6 +2285,8 @@ export default {
selectLine: null,
calculating: false, // 是否正在计算费用,防止频繁重新请求,
loopOrderItem: [], //线路单询异常清关费,
// 単询异常是否可以更改单位
unitChangable: false
};
},
activated() {
......@@ -2331,7 +2338,7 @@ export default {
this.orderExceptionData.orderExceptionAmountCurrencyId
);
}
if (
this.orderExceptionData.orderExceptionType ==
"not_shipping_channel_exception"
......@@ -2493,6 +2500,7 @@ export default {
that.loading = true;
getExceptionById(that.orderExceptionId).then((response) => {
that.orderExceptionData = response.data;
that.loading = false;
that.orderId = response.data.orderId;
that.getOrderData();
......@@ -2578,6 +2586,19 @@ export default {
//not_shipping_channel_exception 不可出渠道异常
getOrder(this.orderId).then((response) => {
this.orderData = response.data;
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId === this.orderExceptionData.orderItemId)
console.log("uniChangable", this.orderExceptionData.orderExceptionStatus,
this.orderExceptionData.orderExceptionType,
orderItem?.oneSeaFreight, orderItem?.oneClearanceFreight)
// 待处理 且 単询异常 且 清关费和运费为0则可以修改单位
if(
this.orderExceptionData.orderExceptionStatus == 0 &&
this.orderExceptionData.orderExceptionType === "line_loop_exception" &&
orderItem && orderItem.oneSeaFreight === 0 && orderItem.oneClearanceFreight === 0
){
this.unitChangable = true
}else this.unitChangable = false
if (this.orderData.channelId != 0) {
this.channelList.map((v) => {
if (v.channelId == this.orderData.channelId) {
......
......@@ -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