Commit 80831dd3 authored by 我在何方's avatar 我在何方

bug修复

parent e32b9b84
......@@ -22,50 +22,50 @@
</div>
<el-descriptions :column="3" border class="card">
<el-descriptions-item :label="$t('发货人:')">
{{consigneeData.length>0?consigneeData[0].customerName||$t(''):$t('')}}
{{consignorData.contactsName||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('手机号:')">
{{consigneeData.length>0?(checkCode(consigneeData[0].areaCode)+consigneeData[0].phoneNew)||$t(''):$t('')}}
{{consignorData?(checkCode(consignorData.areaCode)+consignorData.phoneNew)||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址:')">
{{consigneeData.length>0?consigneeData[0].address||$t(''):$t('')}}
{{consignorData.address||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户来源:')">
{{consigneeData.length>0?consigneeData[0].source||$t(''):$t('')}}
{{consignorData.source||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称:')">
{{consigneeData.length>0?consigneeData[0].company||$t(''):$t('')}}
{{consignorData.company||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('社交软件:')">
{{consigneeData.length>0?consigneeData[0].social||$t(''):$t('')+' '+consigneeData.length>0?consigneeData[0].socialNumber||'':''}}
{{consignorData.social||$t('')+' '+consignorData.socialNumber||''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border class="card">
<el-descriptions-item :label="$t('收货人:')">
{{consigneeData.length>1?consigneeData[1].customerName||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('手机号:')">
{{consigneeData.length>1?(checkCode(consigneeData[1].areaCode)+consigneeData[1].phoneNew)||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址:')">
{{consigneeData.length>1?consigneeData[1].address||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户来源:')">
{{consigneeData.length>1?consigneeData[1].source||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司名称:')">
{{consigneeData.length>1?consigneeData[1].company||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('社交软件:')">
{{consigneeData.length>1?consigneeData[1].social||$t(''):$t('')+' '+consigneeData.length>1?consigneeData[1].socialNumber||'':''}}
</el-descriptions-item>
{{consigneeData.contactsName||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('手机号:')">
{{consigneeData?(checkCode(consigneeData.areaCode)+consigneeData.phoneNew)||$t(''):$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址:')">
{{consigneeData.address||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户来源:')">
{{consigneeData.source||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称:')">
{{consigneeData.company||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('社交软件:')">
{{consigneeData.social||$t('')+' '+consigneeData.socialNumber||''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
<el-descriptions-item :label="$t('出货渠道')" v-if="[3,4].indexOf(list.transportId) > -1">
{{channelName}}
</el-descriptions-item>
</el-descriptions>
......@@ -339,7 +339,7 @@
</template>
<script>
import {DICT_TYPE} from '@/utils/dict'
import {DICT_TYPE,getDictDatas} from '@/utils/dict'
import {getOffer,deleteOffer} from '@/api/ecw/offer'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getCustomerList,getCustomer} from '@/api/ecw/customer'
......@@ -364,7 +364,7 @@
productAttrList:[],
offerId:0,
//发货/收货人信息
consigneeData:[],
consigneeData:{},
routerList:[],
channelName:'/',
tradeCityList:[],
......@@ -372,6 +372,8 @@
currencyList:[],
unitList:[],
orderData:[],
consignorData:{},
customerSource: getDictDatas(DICT_TYPE.CUSTOMER_SOURCE),
couponAvailableGroupDtoList: [], // 可用优惠
couponTotalAmountList: [], // 优惠总额
};
......@@ -391,7 +393,6 @@
})
return map
},
// 总有优惠金额
couponList(){
let arr = []
......@@ -414,7 +415,11 @@
},
// 计算返回的费用清单
feeDtoList(){
return this.list.estCostVO.feeDtoList || []
if(this.list&&this.list.estCostVO){
return this.list.estCostVO.feeDtoList || []
}else{
return []
}
},
// 清关费
clearanceFeeList(){
......@@ -466,7 +471,16 @@
}
},
methods: {
sourceLabel(data){
let label=''
var source = this.customerSource.find(item=>item.value==data)
if(source) label = source.label
return label
},
checkCode(data){
if(!data){
return ''
}
if(data.indexOf('+')==-1){
return '+'+data
}
......@@ -524,9 +538,11 @@
if(that.list.orderId){
that.getOrderData(that.list.orderId)
}
getCustomerContactsSelect({ids: [that.list.consigneeId, that.list.consignorId].join(',')}).then((res) => {
that.consigneeData.push(res.data.list.find(item => item.customerContactsId == that.list.consignorId))
that.consigneeData.push(res.data.list.find(item => item.customerContactsId == that.list.consigneeId))
getCustomerContactsSelect({ids: [that.list.consignorId, that.list.consigneeId].join(',')}).then((res) => {
let consignor = res.data.list.find(item => item.customerContactsId == that.list.consignorId)
if(consignor) that.consignorData=consignor
let consignee = res.data.list.find(item => item.customerContactsId == that.list.consigneeId)
if(consignee) that.consigneeData=consignee
that.getCnsigneeData()
})
that.list.offerProdRespVOList.forEach((item)=>{
......@@ -588,12 +604,19 @@
// 获取发货/收货人
getCnsigneeData(){
let that = this
if(that.consigneeData.length>0){
getCustomer(that.consigneeData[0].customerId).then(result=>{
that.consigneeData[0] = Object.assign(that.consigneeData[0],result.data)
if(that.consigneeData&&that.consigneeData.customerId){
getCustomer(that.consigneeData.customerId).then(result=>{
result.data.source = this.sourceLabel(result.data.source)
that.$set(that.consigneeData,'source',result.data.source)
that.$set(that.consigneeData,'address',result.data.address)
})
getCustomer(that.consigneeData[1].customerId).then(ress=>{
that.consigneeData[1] = Object.assign(that.consigneeData[1],ress.data)
}
if(that.consignorData&&that.consignorData.customerId){
getCustomer(that.consignorData.customerId).then(ress=>{
ress.data.source = this.sourceLabel(ress.data.source)
that.$set(that.consignorData,'source',ress.data.source)
that.$set(that.consignorData,'address',ress.data.address)
})
}
},
......
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