Commit 51b586ce authored by zhoutong's avatar zhoutong
parents 91cb0418 90f81a1c
...@@ -19,5 +19,5 @@ export function download(id){ ...@@ -19,5 +19,5 @@ export function download(id){
// 获取文件二进制 // 获取文件二进制
export function downloadFileResponse(url){ export function downloadFileResponse(url){
return axios.get(url) return axios.get(url, {responseType: 'blob'})
} }
...@@ -884,8 +884,8 @@ export default { ...@@ -884,8 +884,8 @@ export default {
this.$set(this.form, 'channelId', null) this.$set(this.form, 'channelId', null)
} }
console.log('form.transportId', this.form.transportId, this.initing)
if(transportId == 3){ if(!this.initing && transportId == 3){
// 如果是专线空运默认目的港清关选择我司 // 如果是专线空运默认目的港清关选择我司
this.$set(this.form, 'portDestCustomsClear', 1) this.$set(this.form, 'portDestCustomsClear', 1)
} }
...@@ -1119,6 +1119,15 @@ export default { ...@@ -1119,6 +1119,15 @@ export default {
}) })
}) })
} }
// 在初始化结束后transportId还会发生一次变化导致目的港清关被重置,所以需要延迟一下。暂不清楚原因
setTimeout(() =>{
console.log('transportId', this.form.transportId)
console.log('portDestCustomsClear', this.form.portDestCustomsClear, res.data.portDestCustomsClear)
if(res.data.portDestCustomsClear){
this.$set(this.form, 'portDestCustomsClear', res.data.portDestCustomsClear)
}
}, 100)
this.initing = false this.initing = false
}) })
...@@ -1425,7 +1434,7 @@ export default { ...@@ -1425,7 +1434,7 @@ export default {
offParams.consignorPhone = that.form.consignorPhone offParams.consignorPhone = that.form.consignorPhone
} }
getOfferSelect(offParams).then((res) => { getOfferSelect(offParams).then((res) => {
that.offerData = res.data that.offerData = res.data || []
if (!that.form.offerId && that.form.orderId) { if (!that.form.offerId && that.form.orderId) {
that.getOfferNumber(that.form.orderId) that.getOfferNumber(that.form.orderId)
} }
...@@ -1434,6 +1443,7 @@ export default { ...@@ -1434,6 +1443,7 @@ export default {
getOfferNumber(id) { getOfferNumber(id) {
const that = this const that = this
getOfferCheck({ orderId: id }).then(response => { getOfferCheck({ orderId: id }).then(response => {
if(!response.data) return
if(that.offerData.length==0){ if(that.offerData.length==0){
that.offerData.push(response.data) that.offerData.push(response.data)
} }
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
return { return {
4: this.$t('重货标准优惠申请'), 4: this.$t('重货标准优惠申请'),
5: this.$t('泡货标准优惠申请'), 5: this.$t('泡货标准优惠申请'),
29: this.$t('泡货优惠申请') 29: this.$t('申请泡重优惠')
}[this.applyType] }[this.applyType]
// return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请') // return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
}, },
......
...@@ -113,9 +113,9 @@ ...@@ -113,9 +113,9 @@
1.海运整柜、海运拼柜显示重货优惠 1,2 1.海运整柜、海运拼柜显示重货优惠 1,2
2.空运专线、海空联运显示泡货优惠 3,4 2.空运专线、海空联运显示泡货优惠 3,4
--> -->
<el-button v-hasPermi="['ecw:order:heavy']" type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button> <el-button v-hasPermi="['ecw:order:heavy']" type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货标准优惠')}}</el-button>
<template v-else> <template v-else>
<el-button v-hasPermi="['ecw:order:bulky2']" type="primary" @click="showPreferentialType=29">{{$t('申请泡优惠')}}</el-button> <el-button v-hasPermi="['ecw:order:bulky2']" type="primary" @click="showPreferentialType=29">{{$t('申请泡优惠')}}</el-button>
<el-button v-hasPermi="['ecw:order:bulky']" type="primary" @click="showPreferentialType=5">{{$t('申请泡货标准优惠')}}</el-button> <el-button v-hasPermi="['ecw:order:bulky']" type="primary" @click="showPreferentialType=5">{{$t('申请泡货标准优惠')}}</el-button>
</template> </template>
<el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button> <el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button>
......
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
download(row.id).then(res => { download(row.id).then(res => {
return downloadFileResponse(res.data) return downloadFileResponse(res.data)
}).then(res => { }).then(res => {
console.log({res})
this.$download.download0(res.data, row.name + row.fileSuffix, res.headers['content-type']) this.$download.download0(res.data, row.name + row.fileSuffix, res.headers['content-type'])
}).finally(() => { }).finally(() => {
loading.close() loading.close()
......
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