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

bug修复

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