Commit 6cd3037c authored by lanbaoming's avatar lanbaoming

Merge branch 'dev'

parents b0072e23 ac6219d7
import request from '@/utils/request'
// 创建跟进
export function createCustomerFollow(data) {
return request({
url: '/ecw/customer-follow/create',
method: 'post',
data: data
})
}
// 更新跟进
export function updateCustomerFollow(data) {
return request({
url: '/ecw/customer-follow/update',
method: 'put',
data: data
})
}
// 删除跟进
export function deleteCustomerFollow(id) {
return request({
url: '/ecw/customer-follow/delete?id=' + id,
method: 'delete'
})
}
// 获得跟进
export function getCustomerFollow(id) {
return request({
url: '/ecw/customer-follow/get?id=' + id,
method: 'get'
})
}
// 获得跟进分页
export function getCustomerFollowPage(query) {
return request({
url: '/ecw/customer-follow/page',
method: 'get',
params: query
})
}
// 导出跟进 Excel
export function exportCustomerFollowExcel(query) {
return request({
url: '/ecw/customer-follow/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
//
export function getFollowPage(query) {
return request({
url: '/ecw/customer-follow/followPage',
method: 'get',
params: query
})
}
\ No newline at end of file
<template> <template>
<div class="app-container"> <div class="app-container">
<doc-alert :title="$t('工作流')" url="https://doc.iocoder.cn/bpm" />
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('组名')" prop="name"> <el-form-item :label="$t('组名')" prop="name">
......
<template> <template>
<div class="app-container"> <div class="app-container">
<doc-alert :title="$t('工作流')" url="https://doc.iocoder.cn/bpm" />
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('流程标识')" prop="key"> <el-form-item :label="$t('流程标识')" prop="key">
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select <el-select
multiple multiple
clearable
v-model="queryParams.level" v-model="queryParams.level"
:placeholder="$t('请选择客户等级')" :placeholder="$t('请选择客户等级')"
clearable clearable
...@@ -66,7 +65,6 @@ ...@@ -66,7 +65,6 @@
clearable clearable
v-model="queryParams.customerService" v-model="queryParams.customerService"
:placeholder="$t('请选择客户经理')" :placeholder="$t('请选择客户经理')"
clearable
size="small" size="small"
@change="handleQuery" @change="handleQuery"
> >
...@@ -113,11 +111,10 @@ ...@@ -113,11 +111,10 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select <el-select
multiple multiple
clearable clearable
v-model="queryParams.status" v-model="queryParams.status"
:placeholder="$t('请选择客户状态')" :placeholder="$t('请选择客户状态')"
clearable
size="small" size="small"
@change="handleQuery" @change="handleQuery"
> >
......
<template>
<div class="app-container">
<el-card>
<div slot="header" class="card-title">{{$t('报表跟进')}}</div>
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
<el-form-item :label="$t('编号')" prop="followNo">
<el-input type="text" v-model="form.followNo" :placeholder="$t('请输入编号')" />
</el-form-item>
<el-form-item :label="$t('类型')" prop="type" style="width: 46%;display: inline-block;margin-left:8%">
<!-- <el-radio v-model="form.type" label="2">{{$t('商务洽谈')}}</el-radio> -->
<dict-selector ref='dictMethod' v-model="form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector>
</el-form-item>
<el-form-item :label="$t('客户编号')" prop="followNo">
<el-input type="text" v-model="form.followNo" />
</el-form-item>
<el-form-item :label="$t('报价单号')" prop="number" style="width: 46%;display: inline-block;">
<label>{{form.number}}</label>
</el-form-item>
<el-form-item :label="$t('跟进时间')" prop="followUpTime" style="width: 46%;display: inline-block">
<el-date-picker clearable v-model="form.followUpTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('选择跟进时间')" />
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="followUpSalesmanId" style="width: 46%;display: inline-block;;margin-left:8%">
<el-select v-model="form.followUpSalesmanId" :placeholder="$t('请选择跟进业务员')" clearable>
<el-option v-for="item in creatorData"
:key="item.id" :label="item.nickname" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系人')" prop="contacts" style="width: 46%;display: inline-block">
<el-select v-model="form.contacts" :placeholder="$t('请选择联系人')" clearable>
<el-option v-for="item in contactsData" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('跟进方式')" prop="followUpMethod" style="width: 46%;display: inline-block;margin-left:8%">
<dict-selector
:type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
:placeholder="$t('请选择跟进方式')"
v-model="form.followUpMethod"
form-type="select"
:clearable="true"
/>
</el-form-item>
<el-form-item :label="$t('目的')" prop="customerFeedback">
<el-input type="textarea" :rows="3" v-model="form.customerFeedback" maxlength="500" :placeholder="$t('请输入客户反馈')" />
</el-form-item>
<el-form-item :label="$t('情况')" prop="processingResults">
<el-input type="textarea" :rows="3" v-model="form.processingResults" maxlength="500" :placeholder="$t('请输入处理结果')" />
</el-form-item>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
</div>
</div>
</template>
<script>
import { createOfferLog } from "@/api/ecw/offerLog"
import { userList } from "@/api/system/user"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import {DICT_TYPE} from '@/utils/dict'
import {getOffer} from '@/api/ecw/offer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default {
name: "OfferLog",
components: {
},
data() {
return {
// 遮罩层
loading: true,
open: false,
contactsData:[],
creatorData:[],
// 表单参数
form: {
type:'2',
offerId:0,
number:0,
},
relationId:0,
// 表单校验
rules: {
type: [{ required: true, message: this.$t("请选择跟进类型"), trigger: "change" }],
followUpTime: [{ required: true, message: this.$t("跟进时间不能为空"), trigger: "blur" }],
followUpSalesmanId: [{ required: true, message: this.$t("客户经理不能为空"), trigger: "change" }],
contacts: [{ required: true, message: this.$t("联系人不能为空"), trigger: "blur" }],
followUpMethod: [{ required: true, message: this.$t("请选择跟进方式"), trigger: "change" }],
customerFeedback: [{ required: true, message: this.$t("客户反馈不能为空"), trigger: "blur" }],
processingResults: [{ required: true, message: this.$t("处理结果不能为空"), trigger: "blur" }],
},
list:[]
};
},
created() {
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId
this.getList();
}
if(this.$route.query.number){
this.form.number = this.$route.query.number
}
userList('customer service').then(res =>this.creatorData = res.data)
},
methods: {
getList() {
let that = this
// 执行查询
getOffer(that.form.offerId).then(response => {
that.list = response.data;
that.getContactsData()
})
},
getContactsData(){
getCustomerContactsSelect({ids: [this.list.consigneeId, this.list.consignorId].join(',')}).then((res) => {
if(res.data.list.length>0){
this.contactsData.push({name:res.data.list[0].contactsName+'('+this.$t('发货人')+')',id:res.data.list[0].customerContactsId})
this.contactsData.push({name:res.data.list[1].contactsName+'('+this.$t('收货人')+')',id:res.data.list[1].customerContactsId})
}
})
// getCustomerContactsListByCustomer({customerId:this.relationId}).then(response => {
// this.contactsData = response.data
// })
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 添加的提交
this.form.type = parseInt(this.form.type)
this.form.followUpMethod = parseInt(this.form.followUpMethod)
createOfferLog(this.form).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.$store.dispatch('tagsView/delCurrentView')
});
});
},
}
};
</script>
<style scoped>
.dialog-footer{
padding: 40px;
}
</style>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,169 +5,209 @@ ...@@ -5,169 +5,209 @@
append-to-body append-to-body
width="90vw" width="90vw"
> >
<el-table ref="multipleTable" :data="flatList" @selection-change="handleSelectionChange" :span-method="objectSpanMethod" class="table"> <el-table
ref="multipleTable"
:data="flatList"
@selection-change="handleSelectionChange"
:span-method="objectSpanMethod"
class="table"
>
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column :label="$t('品名')" prop="name"> <el-table-column :label="$t('品名')" prop="name">
<template #default="{row}">{{$l(row, "prodName")}}</template> <template #default="{ row }">{{ $l(row, "prodName") }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('品牌')" prop="brand"> <el-table-column :label="$t('品牌')" prop="brand">
<template #default="{row}">{{$l(row, "brandName")}}</template> <template #default="{ row }">{{ $l(row, "brandName") }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('材质')" prop="material"> <el-table-column :label="$t('材质')" prop="material">
<template #default="{row}">{{$l(row, "materialLabel")}}</template> <template #default="{ row }">{{ $l(row, "materialLabel") }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品特性')" prop="attr"> <el-table-column :label="$t('商品特性')" prop="attr">
<template #default="{row}">{{$l(row, "prodAttrNames")}}</template> <template #default="{ row }">{{ $l(row, "prodAttrNames") }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('用途')" prop="unit"> <el-table-column :label="$t('用途')" prop="unit">
<template #default="{row}">{{$l(row, "usageNames")}}</template> <template #default="{ row }">{{ $l(row, "usageNames") }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('总数量')" prop="quantityAll"></el-table-column> <el-table-column
<el-table-column :label="$t('总箱数')" prop="cartonsNum"></el-table-column> :label="$t('总数量')"
prop="quantityAll"
></el-table-column>
<el-table-column
:label="$t('总箱数')"
prop="cartonsNum"
></el-table-column>
<el-table-column :label="$t('包装类型')" prop="specificationType"> <el-table-column :label="$t('包装类型')" prop="specificationType">
<template #default="{row}"> <template #default="{ row }">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType"></dict-tag> <dict-tag
:type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value="row.specificationType"
></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('规格')" prop="boxGauge"></el-table-column> <el-table-column :label="$t('规格')" prop="boxGauge"></el-table-column>
<el-table-column :label="$t('总重量')" prop="weight"></el-table-column> <el-table-column :label="$t('总重量')" prop="weight"></el-table-column>
<el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column> <el-table-column
:label="$t('快递单号')"
prop="expressNo"
></el-table-column>
<el-table-column :label="$t('影像')" prop="quantityAll"> <el-table-column :label="$t('影像')" prop="quantityAll">
<template #default="{row}"> <template #default="{ row }">
<el-button type="text" @click="curPictrues = row.pictureUrls">{{$t('查看影像')}}</el-button> <el-button type="text" @click="curPictrues = row.pictureUrls">{{
$t("查看影像")
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">{{$t('确定')}}</el-button> <el-button type="primary" @click="handleSubmit">{{
<el-button @click="handleClose">{{$t('取消')}}</el-button> $t("确定")
}}</el-button>
<el-button @click="handleClose">{{ $t("取消") }}</el-button>
</div> </div>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog> <media-dialog
v-if="curPictrues"
:value="curPictrues"
@close="curPictrues = null"
></media-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getOrderItemCommonAttr} from "@/api/ecw/order" import { getOrderItemCommonAttr } from "@/api/ecw/order";
import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue"; import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue";
export default { export default {
components: {MediaDialog}, components: { MediaDialog },
props: { props: {
orderId: { orderId: {
type: Number, type: Number,
default: undefined default: undefined,
}, },
warehouseInId:Number warehouseInId: Number,
}, },
data(){ data() {
return { return {
visible: true, visible: true,
// 备选的商品明细 // 备选的商品明细
orderItemDetails: [], orderItemDetails: [],
multipleSelection:[], multipleSelection: [],
curPictrues: null curPictrues: null,
} };
}, },
watch:{ watch: {
visible(val){ visible(val) {
if (!val) { if (!val) {
this.$emit('close') this.$emit("close");
} }
}, },
}, },
computed:{ computed: {
flatList(){ flatList() {
let arr = [] let arr = [];
this.orderItemDetails.forEach(item => { this.orderItemDetails.forEach((item) => {
item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => { item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => {
arr.push({ arr.push({
...item, ...item,
...vo, ...vo,
index, index,
span: index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0, span:
warehouseInId: item.id index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0,
}) warehouseInId: item.id,
}) });
}) });
return arr });
} return arr;
},
}, },
async created() { async created() {
getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).then(res => { getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).then(
this.orderItemDetails = res.data (res) => {
}) this.orderItemDetails = res.data;
}
);
}, },
methods: { methods: {
handleSelectionChange(e){ handleSelectionChange(e) {
console.log("handleSelectionChange", e) console.log("handleSelectionChange", e);
this.multipleSelection = e this.multipleSelection = e;
}, },
handleSubmit(){ handleSubmit() {
// 品名+品牌+材质+商品特性+用途一致的会合并,数量累加 // 品名+品牌+材质+商品特性+用途一致的会合并,数量累加
// https://zentao.test.jdshangmen.com/task-view-3423.html // https://zentao.test.jdshangmen.com/task-view-3423.html
let arr = [] let arr = [];
this.multipleSelection.forEach(item => { this.multipleSelection.forEach((item) => {
let index = arr.findIndex(i => { let index = arr.findIndex((i) => {
return i.prodId == item.prodId && i.brand == item.brand && i.material == item.material && i.prodAttrIds == item.prodAttrIds && i.usageIds == item.usageIds return (
}) i.prodId == item.prodId &&
i.brand == item.brand &&
i.material == item.material &&
i.prodAttrIds == item.prodAttrIds &&
i.usageIds == item.usageIds
);
});
if (index == -1) { if (index == -1) {
arr.push({...item}) arr.push({ ...item });
} else { } else {
arr[index].quantityAll += item.quantityAll arr[index].quantityAll += item.quantityAll;
} }
}) });
// 如果某条入仓记录下的箱明细被全部选中了,则需要将他的快递单号和影像带过去 // 如果某条入仓记录下的箱明细被全部选中了,则需要将他的快递单号和影像带过去
const expressNos = [] const expressNos = [];
const pictureUrls = [] const pictureUrls = [];
this.orderItemDetails.forEach((warehouseIn, index) => { this.orderItemDetails.forEach((warehouseIn, index) => {
// 本条入仓记录被选中的明细数 // 本条入仓记录被选中的明细数
const selectedCount = this.multipleSelection.filter(item => item.warehouseInId == warehouseIn.id).length const selectedCount = this.multipleSelection.filter(
if(selectedCount == warehouseIn.orderWarehouseInCommonAttrVOList?.length){ (item) => item.warehouseInId == warehouseIn.id
if(warehouseIn.expressNo){ ).length;
expressNos.push(warehouseIn.expressNo) if (
selectedCount == warehouseIn.orderWarehouseInCommonAttrVOList?.length
) {
if (warehouseIn.expressNo) {
expressNos.push(warehouseIn.expressNo);
} }
if(warehouseIn.pictureUrls?.length){ if (warehouseIn.pictureUrls?.length) {
pictureUrls.push(...warehouseIn.pictureUrls) pictureUrls.push(...warehouseIn.pictureUrls);
} }
} }
}) });
// 根据warehouseInId 给对应的入仓记录追加快递单号和影像 // 根据warehouseInId 给对应的入仓记录追加快递单号和影像
// 存到全局变量,在调用对应finishPack接口的时候判断追加 // 存到全局变量,在调用对应finishPack接口的时候判断追加
window.ChooseOrderProductsExpressNos = expressNos window.ChooseOrderProductsExpressNos = expressNos;
window.ChooseOrderProductsPictureUrls = pictureUrls window.ChooseOrderProductsPictureUrls = pictureUrls;
this.$emit("success", arr) this.$emit("success", arr);
}, },
handleClose() { handleClose() {
this.visible = false this.visible = false;
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }){ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if(columnIndex > 6){ if (columnIndex > 6) {
return { return {
rowspan: row.span, rowspan: row.span,
colspan: 1 colspan: 1,
} };
} }
return { return {
rowspan: 1, rowspan: 1,
colspan: 1 colspan: 1,
} };
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.table{ .table {
::v-deep{ ::v-deep {
th.el-table__cell.is-leaf, td.el-table__cell{ th.el-table__cell.is-leaf,
border-bottom: 1px solid #9b9b9b; td.el-table__cell {
} border-bottom: 1px solid #9b9b9b;
.el-checkbox__inner{ }
border:2px solid #9b9b9b; .el-checkbox__inner {
} border: 2px solid #9b9b9b;
} }
}
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -293,6 +293,7 @@ ...@@ -293,6 +293,7 @@
}}</el-button> }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--转异对话框 lanbm 2024-06-19 添加注释-->
<el-dialog <el-dialog
:title="order.orderNo + $t('订单转异')" :title="order.orderNo + $t('订单转异')"
center center
......
This diff is collapsed.
...@@ -353,6 +353,7 @@ ...@@ -353,6 +353,7 @@
</el-form-item> </el-form-item>
</template> </template>
<!--是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
<el-form-item :label="$t('是否单询')" prop="inquiry"> <el-form-item :label="$t('是否单询')" prop="inquiry">
<dict-selector <dict-selector
:type="DICT_TYPE.NEED_ORDER_INQUIRY" :type="DICT_TYPE.NEED_ORDER_INQUIRY"
...@@ -361,6 +362,7 @@ ...@@ -361,6 +362,7 @@
formatter="number" formatter="number"
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<!--end 是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
</el-card> </el-card>
</el-form> </el-form>
...@@ -931,12 +933,12 @@ export default { ...@@ -931,12 +933,12 @@ export default {
if (!valid) { if (!valid) {
return; return;
} }
// 只有修改单条路线的时候,不需要选择路线 // 只有修改单条路线的时候,不需要选择路线
/* if (this.$route.query.action !== 'update' && (!this.selectedRoutes || !this.selectedRoutes.length)) { /* if (this.$route.query.action !== 'update' && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路'); this.$message.error('请选择线路');
return; return;
} */ } */
if ( if (
!this.lineList.length && !this.lineList.length &&
(!this.selectedRoutes || !this.selectedRoutes.length) (!this.selectedRoutes || !this.selectedRoutes.length)
...@@ -949,91 +951,96 @@ export default { ...@@ -949,91 +951,96 @@ export default {
// specialList: this.specialProducts, // specialList: this.specialProducts,
isAllProduct: 0, isAllProduct: 0,
}); });
// 阶梯价
if (this.form.stepPrice) {
let isValid = true;
for (let stepPrice of this.$refs.stepPrice) {
if (!stepPrice.validate()) {
isValid = false;
break;
}
}
if (!isValid) return;
// 全包价 if (this.form.needOrderInquiry == 0) {
if (this.form.priceType == 1) { //不是单询价才校验价格参数 lanbm 2024-06-17
data.fullPriceStepList = this.getPriceList( // 阶梯价
this.form.fullPriceStepList if (this.form.stepPrice) {
);
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 {
// 有多个组件则表示清关费 + 运费
if (this.$refs.seaPrice?.length) {
let isValid = true; let isValid = true;
for (let seaPrice of this.$refs.seaPrice) { for (let stepPrice of this.$refs.stepPrice) {
if (!seaPrice.validate()) { if (!stepPrice.validate()) {
isValid = false; isValid = false;
break; break;
} }
} }
if (!isValid) return; if (!isValid) return;
}
// 只有一个海运费组件,全包价
else if (this.$refs.seaPrice && !this.$refs.seaPrice.validate()) {
return;
}
// 格式化 // 全包价
if (this.form.priceType === 1) { if (this.form.priceType == 1) {
data.fullPricePackagingList = this.getPackingPrice( data.fullPriceStepList = this.getPriceList(
data.fullPricePackagingList this.form.fullPriceStepList
); );
delete data.freightPricePackagingList; delete data.clearancePriceStepList;
delete data.clearancePricePackagingList; delete data.freightPriceStepList;
} else { } else {
data.freightPricePackagingList = this.getPackingPrice( data.clearancePriceStepList = this.getPriceList(
data.freightPricePackagingList this.form.clearancePriceStepList
); );
data.clearancePricePackagingList = this.getPackingPrice( data.freightPriceStepList = this.getPriceList(
data.clearancePricePackagingList this.form.freightPriceStepList
); );
delete data.fullPricePackagingList; delete data.fullPriceStepList;
}
} }
//海运非阶梯价校验
else {
// 有多个组件则表示清关费 + 运费
if (this.$refs.seaPrice?.length) {
let isValid = true;
for (let seaPrice of this.$refs.seaPrice) {
if (!seaPrice.validate()) {
isValid = false;
break;
}
}
if (!isValid) return;
}
// 只有一个海运费组件,全包价
else if (this.$refs.seaPrice && !this.$refs.seaPrice.validate()) {
return;
}
// 删除阶梯价字段 // 格式化
delete data.freightPriceStepList; if (this.form.priceType === 1) {
delete data.fullPriceStepList; data.fullPricePackagingList = this.getPackingPrice(
delete data.clearancePriceStepList; 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) { delete data.freightPriceStepList;
let validateEndDate = new Date(this.form.validateEndDate); delete data.fullPriceStepList;
if (validateEndDate.getTime() < Date.now()) { delete data.clearancePriceStepList;
return this.$confirm( }
"您设置的线路价格已过期,确定提交吗?",
"提示", // 设置了有效期,且已过期则给提示
{ if (this.form.validateEndDate && force !== true) {
confirmButtonText: "确认提交", let validateEndDate = new Date(this.form.validateEndDate);
cancelButtonText: "取消提交", if (validateEndDate.getTime() < Date.now()) {
type: "warning", return this.$confirm(
} "您设置的线路价格已过期,确定提交吗?",
).then((res) => { "提示",
this.submitForm(true); {
}); confirmButtonText: "确认提交",
cancelButtonText: "取消提交",
type: "warning",
}
).then((res) => {
this.submitForm(true);
});
}
} }
} }
// 修改单条路线 // 修改单条路线
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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