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

修复几个bug

parent ecbeca95
......@@ -93,7 +93,7 @@
<div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" class="w-200"/>
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" class="w-200"/>
</el-form-item>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" prop="channelId">
<selector
......@@ -102,7 +102,6 @@
:options="channelList"
value-field="channelId"
label-field="nameZh"
@input="calculationPrice"
class="w-200"
></selector>
</el-form-item>
......@@ -801,8 +800,7 @@ export default {
'form.objectiveId'(){
this.getOpenedRouterList()
},
'form.transportId'(transportId){
'form.transportId'(transportId, oldTransportId){
// 海空联运默认数据
if(transportId == 4){
this.$set(this.form.transportVO, Object.assign(this.form.transportVO, {
......@@ -815,15 +813,27 @@ export default {
}))
}
this.getOpenedRouterList()
// 更换运输方式之后,之前选择的路线会失效,需要重新选择
if(oldTransportId && oldTransportId != transportId && transportId != this.selectedRouter?.transportType){
console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType)
this.$set(this.form, 'lineId', undefined)
}
},
'form.channelId'(){
this.getOpenedRouterList()
this.calculationPrice('form.channelId')
},
'form.lineId'(lineId){
let router = this.routerList.find(item => item.id == lineId)
if(!router) return
if(router){
this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId)
}
this.$nextTick(() => {
this.calculationPrice('form.lineId')
})
},
'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(','))
......@@ -922,17 +932,17 @@ export default {
})
}
this.calculationPrice()
this.calculationPrice('onProductChange')
},
onLineChange(row){
/* onLineChange(row){
this.calculationPrice()
// this.updateEnabledTransports()
},
}, */
onChannelChange(row){
this.calculationPrice()
this.calculationPrice('onChannelChange')
},
onProductAttrChange(row, attr){
this.calculationPrice()
this.calculationPrice('onProductAttrChange')
},
addProduct(data){
this.form.prodCreateReqVOList.push(data || {prodAttrArr:[]})
......@@ -1027,7 +1037,8 @@ export default {
})
},
// 计算商品运费
calculationPrice(){
calculationPrice(tag){
console.log('calculationPrice@', tag)
let calcable = true
if(!this.form.prodCreateReqVOList.length) return
this.form.prodCreateReqVOList.forEach(item => {
......@@ -1037,7 +1048,14 @@ export default {
}
item.brandType = item.brand
})
if(this.calculating || !calcable) return false
if(this.calculating || !calcable){
console.log('不满足费用计算条件,清空已获取的费用信息')
this.form.prodCreateReqVOList.forEach(item => {
delete item.fee
})
this.fee = {}
return false
}
this.calculating = true
console.log('calculationPrice')
......@@ -1045,7 +1063,7 @@ export default {
calculationPrice({
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
channelId: [3,4].indexOf(this.form.transportId) > -1 ? this.form.channelId : undefined,
prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.form.consigneeCustomerContactsId,
consignorCustomerContactsId: this.form.consignorCustomerContactsId,
......
......@@ -791,7 +791,7 @@ export default {
// 勾选外部仓则添加一个默认的,取消则删除默认的空的
if(!isExternalWarehouse){
this.$set(this.form, 'externalWarehouseDtoList', [])
}else if(!this.form.externalWarehouseDtoList.length){
}else if(!this.form.externalWarehouseDtoList || !this.form.externalWarehouseDtoList.length){
this.$set(this.form, 'externalWarehouseDtoList', [{}])
}
},
......
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('管理折扣')">
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="title">
<el-form ref="form" :model="form" label-width="120px" :rules="rules">
<!-- 海运是重货,空运是泡货 -->
......@@ -72,6 +72,11 @@ export default {
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
computed:{
title(){
return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
......
......@@ -15,7 +15,7 @@
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户名称" prop="username">
<el-input v-model="queryParams.username" placeholder="请输入用户名称" clearable style="width: 240px"
<el-input v-model="queryParams.username" placeholder="请输入用户名或昵称" clearable style="width: 240px"
@keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="手机号码" prop="mobile">
......
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