|
|
@@ -25,6 +25,11 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import dataapi from "@/api/oilsupplier/dataentry";
|
|
|
export default {
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: "authUser"
|
|
|
+ })
|
|
|
+ },
|
|
|
name: "BasisList",
|
|
|
components: {},
|
|
|
props: {},
|
|
|
@@ -52,9 +57,11 @@ export default {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
- _this.SupplierId = res.data.items[0].SupplierId;
|
|
|
- _this.basisList = res.data.items;
|
|
|
- _this.currentItemCount = res.data.currentItemCount;
|
|
|
+ if (res.data.items != null) {
|
|
|
+ _this.SupplierId = res.data.items[0].SupplierId;
|
|
|
+ _this.basisList = res.data.items;
|
|
|
+ _this.currentItemCount = res.data.currentItemCount;
|
|
|
+ }
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err);
|
|
|
@@ -75,6 +82,13 @@ export default {
|
|
|
this.initData();
|
|
|
},
|
|
|
toPdf() {
|
|
|
+ if (this.SupplierId == "") {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请先准入申请"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
dataapi
|
|
|
.pdfexport(this.SupplierId, "02", this.$axios)
|
|
|
.then(res => {
|
|
|
@@ -93,7 +107,7 @@ export default {
|
|
|
pdfurl = "http://" + myDomain + "/" + docurl;
|
|
|
let requestParams = {
|
|
|
pdfUrl: pdfurl,
|
|
|
- watermark: "猪刚烈烧饼"
|
|
|
+ watermark: this.authUser.Profile.Realname
|
|
|
};
|
|
|
this.$axios
|
|
|
.post("supplierdataentry/word-to-pdf-watermark", requestParams)
|
|
|
@@ -105,7 +119,7 @@ export default {
|
|
|
pdfurl = "http://" + docurl;
|
|
|
let requestParams = {
|
|
|
pdfUrl: pdfurl,
|
|
|
- watermark: "猪刚烈烧饼"
|
|
|
+ watermark: this.authUser.Profile.Realname
|
|
|
};
|
|
|
this.$axios
|
|
|
.post("supplierdataentry/word-to-pdf-watermark", requestParams)
|