发票打印问题

dev_ksck2.0
anthonywj 12 months ago
parent 1af061d244
commit fff23823d7

@ -273,7 +273,7 @@ import AcceptOrder from "@/views/inout/DialogReviewOrder";
import DialogInvoice from "@/views/inout/DialogInvoice"; import DialogInvoice from "@/views/inout/DialogInvoice";
import InvoiceRegister from "@/views/inout/InvoiceRegister"; import InvoiceRegister from "@/views/inout/InvoiceRegister";
import {previewImage,previewFile} from "@/api/purchase/supCompany"; import {previewImage, previewFile} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import store from "@/store"; import store from "@/store";
@ -306,7 +306,7 @@ export default {
}, },
data() { data() {
return { return {
check:false, check: false,
idList: [], idList: [],
invoiceRow: [], invoiceRow: [],
statusCode: null, statusCode: null,
@ -485,7 +485,7 @@ export default {
components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer}, components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer},
methods: { methods: {
onSubmit() { onSubmit() {
if (!this.check) { if (this.invoiceRow == null || this.invoiceRow.length == 0) {
this.$message.error("请选择要登记的物资! "); this.$message.error("请选择要登记的物资! ");
return false; return false;
} }
@ -550,14 +550,14 @@ export default {
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
}, },
enterKey(){ enterKey() {
let param={ let param = {
code :this.inputQuery.code code: this.inputQuery.code
} }
parseInvoice(param) parseInvoice(param)
.then((res)=>{ .then((res) => {
if(res.code == 20000){ if (res.code == 20000) {
this.inputQuery=res.data; this.inputQuery = res.data;
} }
}) })
@ -676,7 +676,7 @@ export default {
this.getBizDetailList(row); this.getBizDetailList(row);
}, },
handleSelectionUdiChange(val) { handleSelectionUdiChange(val) {
this.check=!this.check // this.check=!this.check
this.invoiceRow = val; this.invoiceRow = val;
// this.$emit("upData",this.invoiceRow); // this.$emit("upData",this.invoiceRow);
}, },
@ -721,18 +721,18 @@ export default {
showImgViewer(row) { showImgViewer(row) {
this.certFileUrl = this.certFileUrl =
this.BASE_URL + this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+this.inputQuery.licenseUrl; "/udiwms/image/register/file/getImage?type=image2&name=" + this.inputQuery.licenseUrl;
this.imgList = []; this.imgList = [];
this.imgList.push(this.certFileUrl) this.imgList.push(this.certFileUrl)
let index = this.inputQuery.licenseUrl.lastIndexOf('.'); let index = this.inputQuery.licenseUrl.lastIndexOf('.');
if(index===-1){ if (index === -1) {
this.$message.error("文件名异常!") this.$message.error("文件名异常!")
return false return false
} }
if(this.inputQuery.licenseUrl.substr(index+1)==='pdf'){ if (this.inputQuery.licenseUrl.substr(index + 1) === 'pdf') {
let pdf = "application/pdf" let pdf = "application/pdf"
let binaryData = []; let binaryData = [];
previewFile(this.certFileUrl).then(res=>{ previewFile(this.certFileUrl).then(res => {
binaryData.push(res); binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf})); let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL); window.open(URL);

@ -1189,7 +1189,7 @@ export default {
this.Upinvoice = false; this.Upinvoice = false;
this.getBizDetailListInv(); this.getBizDetailListInv();
}, },
printOrder(D,row) { printOrder(_this,row) {
_this.currentManufacturer = row; _this.currentManufacturer = row;
_this.Upinvoice = true; _this.Upinvoice = true;
}, },

Loading…
Cancel
Save