|
@@ -47,6 +47,7 @@
|
|
|
<el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
|
|
<el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button type="primary" @click="toWord" size="mini">表单下载</el-button>
|
|
<el-button type="primary" @click="toWord" size="mini">表单下载</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="toPdf" size="mini">资质下载</el-button>
|
|
|
<router-link :to="'/oilsupplier/supplier/goodslist'">
|
|
<router-link :to="'/oilsupplier/supplier/goodslist'">
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>
|
|
<el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>
|
|
|
</router-link>
|
|
</router-link>
|
|
@@ -829,8 +830,8 @@
|
|
|
// response
|
|
// response
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ // message: res.data.message
|
|
|
})
|
|
})
|
|
|
let docurl = res.data.item
|
|
let docurl = res.data.item
|
|
|
// 内网服务器专用
|
|
// 内网服务器专用
|
|
@@ -845,6 +846,49 @@
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ //导出准入范围到pdf
|
|
|
|
|
+ toPdf () {
|
|
|
|
|
+ let id = this.formData.Id
|
|
|
|
|
+ dataapi.pdfexport(id, this.$axios)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ // response
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ // message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ let docurl = res.data.item
|
|
|
|
|
+ let pdfurl
|
|
|
|
|
+ // 内网服务器专用
|
|
|
|
|
+ if (process.client && docurl.indexOf('upfile') === 0) {
|
|
|
|
|
+ const myDomain = window.location.host
|
|
|
|
|
+ // location.href = 'http://' + myDomain + '/' + docurl
|
|
|
|
|
+ pdfurl = 'http://' + myDomain + '/' + docurl
|
|
|
|
|
+ let requestParams = {
|
|
|
|
|
+ pdfUrl: pdfurl,
|
|
|
|
|
+ watermark: val.SupplierName
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
|
|
|
|
|
+ .then(function (res) {
|
|
|
|
|
+ window.open('http://' + res.data)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // location.href = 'http://' + docurl
|
|
|
|
|
+ pdfurl = 'http://' + docurl
|
|
|
|
|
+ let requestParams = {
|
|
|
|
|
+ pdfUrl: pdfurl,
|
|
|
|
|
+ watermark: val.SupplierName
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
|
|
|
|
|
+ .then(function (res) {
|
|
|
|
|
+ window.open('http://' + res.data)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
isCanUpdateSupplier(supplierId) {
|
|
isCanUpdateSupplier(supplierId) {
|
|
|
api
|
|
api
|
|
|
.isCanUpdateSupplier(supplierId, this.$axios)
|
|
.isCanUpdateSupplier(supplierId, this.$axios)
|