Commit 4efb5b05 authored by knight's avatar knight

仓库-路线添加集运配置项

parent 534318aa
......@@ -3771,6 +3771,11 @@
"供应商区域": "Supplier Area",
"会员控货下单要求": "Member Control Order Requirements",
"集运始发仓服务": "Cons Warehouse Service",
"集运服务费": "Cons Service Fee",
"集运验货服务费": "Cons Inspection Service Fee",
"集运重量上限(kg)": "Cons Weight Limit(kg)",
"集运体积上限(m³)": "Cons Volume Limit(m³)",
"在仓预警时长(天)": "stock duration limit(days)",
"系统类型": "System Type",
"请选择系统类型": "Please select a system type",
"强制更新": "Force updates",
......
......@@ -582,7 +582,7 @@
</div>
<br />
<el-form ref="form" :model="lineform" :rules="rules" label-width="160px">
<el-form ref="lineform" :model="lineform" :rules="lineform.rules" label-width="160px">
<el-form-item :label="$t('始发港服务')">
<el-checkbox-group v-model="lineform.otherService">
<el-checkbox
......@@ -649,6 +649,48 @@
<el-input-number :controls="false" v-model="lineform.minPrice">
</el-input-number>
</el-form-item>
<!-- 集运服务费设置 -->
<template>
<el-form-item :label="$t('集运服务费')">
<el-input-number v-model="lineform.consServiceFee" :controls="false" :precision="2" :step="0.1" @change="handleServiceFeeChange"></el-input-number>
<el-select v-model="lineform.consServiceFeeCurrency" style="margin-left: 20px;" clearable :placeholder="$t('请选择币种')">
<el-option
v-for="item in currencyList"
:disabled="item.status === 1"
:label="$l(item, 'title')"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<!-- 集运验货服务费设置 -->
<template>
<el-form-item :label="$t('集运验货服务费')">
<el-input-number v-model="lineform.consInspectionFee" :controls="false" :precision="2" :step="0.1" ></el-input-number>
<el-select v-model="lineform.consInspectionFeeCurrency" style="margin-left: 20px;" clearable :placeholder="$t('请选择币种')">
<el-option
v-for="item in currencyList"
:disabled="item.status === 1"
:label="$l(item, 'title')"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<el-form-item :label="$t('集运重量上限(kg)')">
<el-input-number v-model="lineform.consWeightLimit" :precision="2" :min="0" :step="0.1"></el-input-number>
</el-form-item>
<el-form-item :label="$t('集运体积上限(m³)')">
<el-input-number v-model="lineform.consVolumeLimit" :precision="2" :min="0" :step="0.1"></el-input-number>
</el-form-item>
<el-form-item :label="$t('在仓预警时长(天)')">
<el-input-number v-model="lineform.stockDurationLimit" :min="0" :max="Infinity"></el-input-number>
</el-form-item>
<el-form-item :label="$t('是否支持控货')">
<el-radio-group v-model="lineform.controlStatus">
<el-radio :label="0">支持</el-radio>
......@@ -1043,6 +1085,29 @@ export default {
name: "",
nameEn: "",
},
// 集运设置
consServiceFee: "",
consServiceFeeCurrency: null,
consInspectionFee: "",
consInspectionFeeCurrency: null,
consWeightLimit: "",
consVolumeLimit: "",
stockDurationLimit: "",
rules:{
consServiceFeeCurrency: [
{
validator: (rule, value, callback) => {
if (this.lineform.consServiceFee != null && !value) {
callback(new Error(this.$t('集运服务费币种不能为空')));
} else {
callback();
}
},
trigger: ['blur', 'change']
}
],
}
},
startName: "",
destName: "",
......@@ -1141,6 +1206,7 @@ export default {
trigger: "change",
},
],
},
nodeId: this.$route.query.nodeId,
// 枚举
......@@ -1313,6 +1379,11 @@ export default {
});
},
handleServiceFeeChange() {
// 服务费变化时触发币种字段的校验
this.$refs["lineform"].validateField('consServiceFeeCurrency');
},
delRow(index) {
this.arr.splice(index, 1);
},
......@@ -1477,6 +1548,16 @@ export default {
this.lineform.lkLeft=row.lkLeft;
this.lineform.lkRight=row.lkRight; //lanbm 2024-06-10 add
this.lineform.tzName=row.tzName; //图章配置参数 lanbm 2024-06-12 add
// 设置集运服务 knight 2025-02-20
this.lineform.consServiceFee = row.consServiceFee
this.lineform.consServiceFeeCurrency = row.consServiceFeeCurrency
this.lineform.consInspectionFee = row.consInspectionFee
this.lineform.consInspectionFeeCurrency = row.consInspectionFeeCurrency
this.lineform.consWeightLimit = row.consWeightLimit
this.lineform.consVolumeLimit = row.consVolumeLimit
this.lineform.stockDurationLimit = row.stockDurationLimit
// 先清空 发货人和收货人信息
this.lineform.senderInfo = {
companyAddress: "",
......@@ -1509,40 +1590,62 @@ export default {
},
submitLineForm() {
//ecw_warehouse_line
let otherService = this.lineform.otherService;
// 如果不存在送货上门,则过滤提货异常
if (!otherService.includes("2")) {
otherService = otherService.filter((id) => id !== "5");
}
serviceConfig({
lineId: this.lineform.lineId,
otherService: otherService.join(","),
isClientShow: this.lineform.isClientShow,
makeBillNode: this.lineform.makeBillNode,
controlStatus: this.lineform.controlStatus,
currencyUnit: this.lineform.currencyUnit,
minPrice: this.lineform.minPrice,
senderInfo: this.lineform.senderInfo,
recipientInfo: this.lineform.recipientInfo,
tempTitleZh: this.lineform.tempTitleZh,
tempTitleEn: this.lineform.tempTitleEn,
lkLeft: this.lineform.lkLeft,
lkRight: this.lineform.lkRight, //lanbm 2024-06-10 add
tzName: this.lineform.tzName, //图章配置参数 lanbm 2024-06-12 add
}).then((res) => {
this.$modal.msgSuccess(this.$t("操作成功"));
this.getRouteList();
for (let index in this.routeList) {
let routeItem = this.routeList[index];
if (routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
// routeItem.otherService = otherService;
this.$set(routeItem, "otherService", otherService);
this.$refs["lineform"].validate((valid,errors) => {
if (valid) {
// 校验通过,执行保存逻辑
//ecw_warehouse_line
let otherService = this.lineform.otherService;
// 如果不存在送货上门,则过滤提货异常
if (!otherService.includes("2")) {
otherService = otherService.filter((id) => id !== "5");
}
// 点击保存线路配置
serviceConfig({
lineId: this.lineform.lineId,
otherService: otherService.join(","),
isClientShow: this.lineform.isClientShow,
makeBillNode: this.lineform.makeBillNode,
controlStatus: this.lineform.controlStatus,
currencyUnit: this.lineform.currencyUnit,
minPrice: this.lineform.minPrice,
senderInfo: this.lineform.senderInfo,
recipientInfo: this.lineform.recipientInfo,
tempTitleZh: this.lineform.tempTitleZh,
tempTitleEn: this.lineform.tempTitleEn,
lkLeft: this.lineform.lkLeft,
lkRight: this.lineform.lkRight, //lanbm 2024-06-10 add
tzName: this.lineform.tzName, //图章配置参数 lanbm 2024-06-12 add
// 集运服务设置 knight 2025-02-20
consServiceFee: this.lineform.consServiceFee,
consServiceFeeCurrency: this.lineform.consServiceFeeCurrency,
consInspectionFee: this.lineform.consInspectionFee,
consInspectionFeeCurrency: this.lineform.consInspectionFeeCurrency,
consWeightLimit: this.lineform.consWeightLimit,
consVolumeLimit: this.lineform.consVolumeLimit,
stockDurationLimit: this.lineform.stockDurationLimit,
}).then((res) => {
this.$modal.msgSuccess(this.$t("操作成功"));
this.getRouteList();
for (let index in this.routeList) {
let routeItem = this.routeList[index];
if (routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
// routeItem.otherService = otherService;
this.$set(routeItem, "otherService", otherService);
}
}
this.serviceOpen = false;
});
} else {
// 校验不通过,提示错误
return this.$showFormValidateErrors(errors)
}
this.serviceOpen = false;
});
},
routeStatusClick(row) {
......
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