修正 npm 二维码

master
xhj 5 months ago
parent 1b58efe168
commit 64452be313

@ -42,11 +42,12 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"pdfjs-dist": "2.0.943",
"pdfjs-dist": "^2.0.943",
"pizzip": "^3.1.1",
"pl-table": "^2.7.5",
"print-js": "^1.6.0",
"qrcode": "^1.5.3",
"qrcodejs2": "0.0.2",
"regenerator-runtime": "^0.13.9",
"screenfull": "4.2.0",
"script-loader": "0.7.2",
@ -62,10 +63,10 @@
"vue-worker": "^1.2.1",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"vxe-table": "^3.7.5",
"vxe-table": "^3.7.8",
"vxe-table-plugin-export-xlsx": "^2.3.1",
"vxe-table-plugin-renderer": "^3.3.0",
"xe-utils": "^3.5.14",
"xe-utils": "^3.5.18",
"xlsx": "^0.14.1"
},
"devDependencies": {
@ -78,7 +79,7 @@
"babel-eslint": "10.1.0",
"babel-jest": "23.6.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"chalk": "^2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "6.7.2",

@ -30,13 +30,14 @@
{
case 'dictFormat':
const dict=window.localStorage.getItem(code);
console.log(dict)
if (!dict){
return code;
}
let dictItems=JSON.parse(dict)
for (const item of dictItems) {
if (item.itemCode===value){
return item.itemValue
if (item.bm===value){
return item.bmsm
}
}
break;

@ -5,15 +5,19 @@
/*border: 1px #000 solid;*/
text-align: center;
font-size: 20px; ">
<div style="width: 20%;" class="ewm"
:id="`patientQrCode_${indexOne}`"
></div>
<div style="text-align: center; padding-top: 20px">
<div style="text-align: center">
<div style="width:100%;">
<h5> </h5>
</div>
<div style="width: 100%">
<div style="height: 20px;width: 50%;" class="base"></div>
<div style="height: 20px;width: 50%;" class="base">打印单据{{item.sllsh}}</div>
<div style="height: 20px;width: 50%;" class="base">制单日期{{item.dyrq}}</div>
</div>
<div style="width: 100%">
@ -75,7 +79,7 @@
<script>
import {mapGetters} from 'vuex'
import QRCode from 'qrcodejs2'
export default {
//
name: 'SljhPrint',
@ -97,7 +101,55 @@ export default {
console.log(11111)
},
methods: {}
methods: {
gegn() {
this.$nextTick(() => {
console.log(this.sljhPrintData)
this.sljhPrintData.forEach((v, i) => {
// let fix=''
// if(v.jhlx==='0201'){
// fix='0201'
// }else if (v.jhlx==='0202'){
// fix='ZJ'
// }else if (v.jhlx==='0203'){
//
// }else if (v.jhlx==='0101'){
//
// }
console.log(v.sllsh)
console.log(v)
let text=v.sllsh
this.qrcode(`patientQrCode_${i}`, text);
if (document.getElementById(`QrCode_${i}`)) {
// this.$nextTick(),
document.getElementById(`QrCode_${i}`).nextElementSibling.href = document.getElementById(`QrCode_${i}`).children[1].src;
}
})
})
// console.log(1111)
},
//
qrcode(qrcode, text) {
if (document.getElementById(qrcode)) {
document.getElementById(qrcode).innerHTML = ''; //
this.$nextTick(function () {
new QRCode(document.getElementById(qrcode), {
text: text, // url_code
width: 95,
height: 95,
colorDark: '#333333', //
colorLight: '#ffffff', //
correctLevel: QRCode.CorrectLevel.L,
})
})
}
},
}
}
</script>
@ -189,6 +241,13 @@ export default {
text-align: center;
font-size: 20px;
}
.ewm{
position: absolute;
left: 10px;
top:-0px;
}
</style>

@ -347,7 +347,7 @@
</el-container>
</el-container>
<div ref="print" id="print" v-show="wgzyprintFlag">
<SljhPrint :sljhPrintData="sljhPrintData"/>
<SljhPrint :sljhPrintData="sljhPrintData" ref="dy"/>
</div>
</el-container>
@ -1063,12 +1063,16 @@ export default {
let selectRecords = this.$refs.xGrid.getCheckboxRecords()
if(selectRecords.length>0){
slPrintD(selectRecords).then(res=>{
this.sljhPrintData=res.data
this.$refs.dy.gegn();
console.log(this.sljhPrintData)
this.wgzyprintFlag=true
setTimeout(() => {
this.$print(this.$refs.print)
this.wgzyprintFlag = false
this.initList()
}, 50)
})
@ -1115,8 +1119,10 @@ export default {
this.sljhPrintData=res.data
console.log(this.sljhPrintData)
this.wgzyprintFlag=true
this.$refs.dy.gegn();
setTimeout(() => {
this.$print(this.$refs.print)
this.wgzyprintFlag = false
this.initList()
}, 50)

Loading…
Cancel
Save