采购合同查询:新增扫码二维码显示详情
This commit is contained in:
@@ -239,11 +239,8 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.useqrcode()
|
||||
},
|
||||
methods: {
|
||||
useqrcode() {
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
@@ -251,7 +248,8 @@ export default {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
|
||||
const str = 'http://192.168.1.109:8022/searchContract.html?contractNum=' + contractNum
|
||||
QRCode.toDataURL(str, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
@@ -260,7 +258,6 @@ export default {
|
||||
searchPic() {
|
||||
// 读取图片时,查找合同流水号,获取其下所有图片id,根据拼接成的路径,查询图片显示出来。
|
||||
searchFile(this.contract).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length !== 0) {
|
||||
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
|
||||
} else {
|
||||
@@ -335,6 +332,7 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.useqrcode(row.采购合同流水号)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
|
||||
Reference in New Issue
Block a user