Commit 6a79db31 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents dc66a6d9 9cf52d03
...@@ -326,3 +326,12 @@ export function updateAbnormalOrder(data) { ...@@ -326,3 +326,12 @@ export function updateAbnormalOrder(data) {
data, data,
}); });
} }
// 更新提单URL
export function updateUrl(data) {
return request({
url: "/shipment/make-bill-of-lading/updateUrl",
method: "put",
data,
});
}
\ No newline at end of file
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
let form = new FormData() let form = new FormData()
let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf' let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'})) form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', file) form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
/* let blob = new Blob([doc.output('arraybuffer')], {type: "application/pdf"}) /* let blob = new Blob([doc.output('arraybuffer')], {type: "application/pdf"})
FileSaver.saveAs(blob, file); FileSaver.saveAs(blob, file);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-row v-if="currRow.status === 2 && type === 'previewBill'" style="text-align: center;"> <el-row v-if="currRow.status === 2 && type === 'previewBill'" style="text-align: center;">
<el-button type="primary" @click="download">{{$t('下载')}}</el-button> <el-button type="primary" @click="download">{{$t('下载')}}</el-button>
<el-button type="primary" @click="print">{{$t('打印')}}</el-button> <el-button type="primary" @click="print">{{$t('打印')}}</el-button>
<el-button type="primary" @click="createPdf">{{$t('刷新')}}</el-button> <el-button type="primary" @click="createPdf">{{$t('刷新提单文件')}}</el-button>
</el-row> </el-row>
</el-row> </el-row>
</template> </template>
...@@ -51,12 +51,15 @@ export default { ...@@ -51,12 +51,15 @@ export default {
}).then(res => { }).then(res => {
let form = new FormData() let form = new FormData()
let file = (new URL(res.data.imgUrl)).pathname let pathname = (new URL(res.data.imgUrl)).pathname
if(file.substring(0, 1) == '/')file = file.substring(1) // 替换掉最前面的/ let fileName = pathname.substring(pathname.lastIndexOf('/')).substring(1)
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'})) let selfNo = fileName.split('-')[0]
form.append('path', file) form.append('file', new File([doc.output('arraybuffer')], fileName, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${selfNo}/pdf/${fileName}`) // 最前面不能有/,否则返回的url会有两个/
return uploadFile(form) return uploadFile(form)
}).then(res => {
_BOX['updateUrl']({id: this.currRow.id, imgUrl: res.data})
}).finally(res => { }).finally(res => {
loading.close() loading.close()
}) })
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('品牌')"> <el-table-column :label="$t('品牌')">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -186,10 +186,10 @@ ...@@ -186,10 +186,10 @@
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.charging ==1"> <template v-if="row.charging ==1">
<template v-if="!row.seaFreight">{{ $t('未报价') }}</template> <template v-if="!row.oneSeaFreight">{{ $t('未报价') }}</template>
<el-link type="primary" @click="showFeeDetail(row, 'clearance')" v-else>{{$t('全包价')}} {{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</el-link> <el-link type="primary" @click="showFeeDetail(row, 'clearance')" v-else>{{$t('全包价')}} {{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</el-link>
</template> </template>
<template v-else-if="!row.seaFreight && !row.clearanceFreight">{{ $t('未报价') }}</template> <template v-else-if="!row.oneSeaFreight && !row.oneClearanceFreight">{{ $t('未报价') }}</template>
<template v-else> <template v-else>
<el-link type="primary" @click="showFeeDetail(row, 'freight')"> <el-link type="primary" @click="showFeeDetail(row, 'freight')">
{{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}} {{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
......
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