Commit 68c1f784 authored by dragondean@qq.com's avatar dragondean@qq.com

是否显示提单价格默认值取订单归属人设置

parent d2710fd4
...@@ -1000,6 +1000,20 @@ export default { ...@@ -1000,6 +1000,20 @@ export default {
if(!this.initing){ if(!this.initing){
this.$set(this.form, 'drawee', isCargoControl ? 2 : 2) this.$set(this.form, 'drawee', isCargoControl ? 2 : 2)
} }
this.setBllLandingPrice()
},
'form.type'(){
this.setBllLandingPrice()
},
'form.drawee'(){
this.setBllLandingPrice()
},
'form.consigneeId'(){
this.setBllLandingPrice()
},
'form.consignorId'(){
this.setBllLandingPrice()
}, },
// 目的港清关,1我司,2客户 // 目的港清关,1我司,2客户
'form.portDestCustomsClear'(portDestCustomsClear){ 'form.portDestCustomsClear'(portDestCustomsClear){
...@@ -1515,6 +1529,33 @@ export default { ...@@ -1515,6 +1529,33 @@ export default {
that.$set(that.form, 'offerId', response.data.offerId) that.$set(that.form, 'offerId', response.data.offerId)
}) })
}, },
// 设置默认的提货单是否显示价格
setBllLandingPrice(){
if(this.form.orderId) return
// 海外仓归属发货人
// 控货订单归属发货人
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
let customerId = null
if(this.form.type == 2 || this.form.isCargoControl == 1 || this.form.drawee == 2 ){
customerId = this.form.consignorId
}else{
customerId = this.form.consigneeId
}
if(!customerId) return
console.log('原归属人',this.displayBillLadingPriceFrom, '新归属人', customerId)
// 如果当前的提单价格设置来自同一个客户则不在查询
if(this.displayBillLadingPriceFrom == customerId) return;
this.displayBillLadingPriceFrom = customerId
// 获取客户信息
getCustomer(customerId).then(res => {
console.log('isShowTidanPrice', res)
this.form.displayBillLadingPrice = res.data.isShowTidanPrice
})
},
} }
}; };
</script> </script>
......
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