Commit 9947dbb4 authored by dragondean@qq.com's avatar dragondean@qq.com

空运提单刷新

parent 65ac2ad3
......@@ -410,3 +410,11 @@ export function exportSettlementExcel(params) {
params,
});
}
// 刷新空运提单
export function updateAirBill(id) {
return request({
url: "/shipment/make-bill-of-lading/updateAirBill?ids=" + id,
method: "get"
});
}
......@@ -101,7 +101,7 @@
<el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.visible" :width="dialogCfg.width" :fullscreen="dialogCfg.fullscreen" append-to-body class="shippingSea-dialog" @closed="dialogclosed">
<makeLadingBill v-if="dialogCfg.visible && ['makeBill','queryBill','resetBill'].includes(dialogCfg.type)" :currData="currData" :currRow="currRow" :dialogCfg="dialogCfg" @closeDialog="closeDialog" :selfNo="shipmentObj.selfNo" />
<previewBill v-if="dialogCfg.type === 'previewBill'" :contentHtml="currData.billContent" :currRow="currRow" :type="dialogCfg.type" />
<previewBill v-if="dialogCfg.type === 'previewBill'" :contentHtml="currData.billContent" :currRow="currRow" :type="dialogCfg.type" :air="type === 'air'" />
</el-dialog>
</el-row>
</template>
......
......@@ -63,7 +63,7 @@ export default {
currData: Object,
currRow: Object,
dialogCfg: Object,
selfNo: String
selfNo: String,
},
data() {
return {
......
......@@ -4,7 +4,7 @@
<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="print">{{$t('打印')}}</el-button>
<el-button type="primary" @click="createPdf">{{$t('刷新提单文件')}}</el-button>
<el-button type="primary" @click="update">{{$t('刷新提单文件')}}</el-button>
</el-row>
</el-row>
</template>
......@@ -16,6 +16,7 @@ import FileSaver from "file-saver";
import html2canvas from 'html2canvas';
import { jsPDF } from "jspdf";
import {uploadFile} from '@/api/infra/file'
import {updateAirBill} from "@/api/ecw/box";
export default {
name: "previewBill",
......@@ -23,8 +24,22 @@ export default {
contentHtml: String,
currRow: Object,
type: String,
// 是否是空运
air: Boolean,
},
methods: {
// 刷新提单
update(){
if(this.air){
let loading = this.$loading()
return updateAirBill(this.currRow.orderId).then(res => {
this.$message.success(this.$t('刷新成功'))
}).finally(() => {
loading.close()
})
}
this.createPdf()
},
download() {
_BOX["downloadBillService"]({ id: this.currRow.id }).then((res) => {
if (res.data && res.data.imgUrl) {
......@@ -46,9 +61,9 @@ export default {
}
const _left = (595.28-_w)/2;
doc.addImage(canvas, 'PNG', _left, 0, _w,_h, '', 'FAST');
return _BOX["downloadBillService"]({ id: this.currRow.id })
}).then(res => {
let form = new FormData()
let pathname = (new URL(res.data.imgUrl)).pathname
......
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